How to add Azure AD Authentication to Existing ASP.NET MVC Application?

三世轮回 提交于 2019-12-21 03:42:39

问题


I have an existing ASP.NET MVC application using Visual Studio 2013. I followed this walk-through but it only concerns itself with a new greenfield project while selecting Change Authentication in project template: Developing ASP.NET Apps with Windows Azure Active Directory

I am not interested in using OWIN and OpenID Connect Katana modules as these components have lots of issues so I am waiting for that technology to mature and render out all the current problems.

I aim is understand how to manually add all the components and configuration to my existing ASP.NET MVC application to achieve the same Azure AD authentication model in Rick Anderson's article.


回答1:


The tooling in VS 2013 doesn't support adding this to an existing project. At the bottom of the link you referenced in the More Information section is a deep dive article where I dissect the code and configuration that gets added. So, you could use that as a reference to find the deltas and apply them to your project.

Now, Visual Studio 2015 offers us some hope in this scenario. It's in preview of course, but you may give it a try. In Solution Explorer, right click on your existing project and select the Configure Azure AD Authentication option.




回答2:


In Visual Studio 2017 the option to enable Authentication with Azure Active Directory is in Connected Services:



来源:https://stackoverflow.com/questions/27581744/how-to-add-azure-ad-authentication-to-existing-asp-net-mvc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!