简体   繁体   English

具有本地.NET后端的Azure移动服务身份验证

[英]Azure Mobile Services Authentication with Local .NET Backend

For unimportant reasons I work mainly in an offline development environment, so it is really important to me to be able to do my development 'offline'. 由于不重要的原因,我主要在离线开发环境中工作,因此能够“离线”进行开发对我来说确实很重要。 For this reason I am very keen on the Azure Mobile Services .NET backend project, which allows you to run your Azure Mobile Services from IIS Express locally. 因此,我非常热衷于Azure移动服务.NET后端项目,该项目使您可以从IIS Express在本地运行Azure移动服务。

I have fought very hard to get this working, and have spent many hours trying to make this IIS service properly visible to my Android and IOS emulators (which I have finally managed to achieve). 我为使该工作正常进行了非常艰苦的工作,并花了很多时间试图使此IIS服务对我的Android和IOS模拟器正确可见(我终于设法实现了)。

However, when it comes to authentication I seem to have hit a dead-end. 但是,在身份验证方面,我似乎已经走到了尽头。 I originally tried to implement custom authentication, which was a massive undertaking, and despite several promising leads (including an article on that very same subject published by Microsoft which could never work - very frustrating http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-get-started-custom-authentication/ ). 我最初尝试实施自定义身份验证,这是一项艰巨的任务,尽管有许多有希望的线索(包括有关Microsoft发布的同一主题的文章,但该文章永远行不通-非常令人沮丧, 网址为http://azure.microsoft.com/zh-我们/文档/文章/移动服务-dotnet-backend-get-started-custom-authentication / )。 I drew a blank. 我画了一个空白。

In desperation I tried the more 'traditional' authentication methods (Facebook, Microsoft, Google etc) but none of them work either on the local IIS azure. 无奈之下,我尝试了更多的“传统”身份验证方法(Facebook,Microsoft,Google等),但它们都不在本地IIS天蓝色上工作。

It is beginning to dawn on me that I may have completely wasted my time. 我可能已经完全浪费了我的时间,这开始让我意识到。 Can it be true that the local Azure Mobile project only works in some very limited scenarios. 可以肯定的是,本地Azure Mobile项目仅在某些非常有限的方案中有效。

I would really love someone in the know to confirm what is and isn't possible with the local Azure Mobile .NET backend, as I am starting to become desperate. 我真的很想知道一个人,以确认本地Azure Mobile .NET后端是什么和不可能,因为我开始变得绝望。

Many thanks in anticipation. 非常感谢您的期待。

For me it's the opposite. 对我来说恰恰相反。 I can only get the custom authentication to work 'offline'. 我只能使自定义身份验证“脱机”工作。 I used the same tutorial you used to set up the login provider. 我使用了与设置登录提供程序相同的教程。 Then I used this answer to figure out how to use it on the client. 然后,我使用此答案来弄清楚如何在客户端上使用它。

You might have a problem, like I am, when publishing it to Azure, but for 'offline' use it would work. 将其发布到Azure时,您可能会遇到类似我的问题,但是对于“脱机”使用它将起作用。 I think it's because it uses a local database which it can't see once it's in azure. 我认为这是因为它使用了本地数据库,该数据库一旦处于天蓝色状态就无法看到。

Hopefully this helped. 希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM