简体   繁体   English

部署在Azure上使用ACS的MVC应用程序

[英]Deploy MVC application that uses ACS on Azure

I am new to Azure Software Development. 我是Azure软件开发的新手。 I have developed a MVC web application. 我开发了一个MVC Web应用程序。 Also I use a simple database implemented via CRUD operations. 我还使用通过CRUD操作实现的简单数据库。 I have deployed my MVC on the Azure cloud using my login. 我使用登录在Azure云上部署了MVC。 I have also migrated my database to the Azure Cloud. 我还将我的数据库迁移到Azure Cloud。 I followed the below link: 我按照以下链接:

https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database https://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database

I also had to implement an authentication that uses ACS. 我还必须实现使用ACS的身份验证。 Accepts google and yahoo credentials. 接受谷歌和雅虎凭证。 I could do it successfully following the below post: 我可以按照以下帖子成功完成:

http://msdn.microsoft.com/en-us/library/windowsazure/gg429779.aspx http://msdn.microsoft.com/en-us/library/windowsazure/gg429779.aspx

But the ACS is implemented on the localhost. 但是ACS是在localhost上实现的。 I mean things work well on emulator, but I am not able to publish the web application that uses ACS on the Azure environment. 我的意思是在模拟器上运行良好,但我无法在Azure环境中发布使用ACS的Web应用程序。

I tried changing all the localhost references I created by changing to my actual web application name that is hosted on cloud, but no luck. 我尝试通过更改为托管在云上的实际Web应用程序名称来更改我创建的所有localhost引用,但没有运气。

Please help me how to deploy an MVC application that uses ACS to be hosted on the Azure cloud environment. 请帮助我部署如何部署使用ACS托管在Azure云环境中的MVC应用程序。

Any links will also help or any information. 任何链接也将有所帮助或任何信息。 Thanks a lot in advance. 非常感谢提前。 I am struck on this for 4 hours... 我被震惊了4个小时......

You'll need to do 2 things: 你需要做两件事:

  • In ACS, make sure the relying party application uses your public URL (your cloudapp.net address or custom DNS). 在ACS中,确保依赖方应用程序使用您的公共URL(您的cloudapp.net地址或自定义DNS)。
  • In your web.config, replace all references from localhost your your public URL (you can also automate this as described here ). 在您的web.config中,将localhost中的所有引用替换为您的公共URL(您也可以按此处所述自动执行此操作)。

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

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