I am developing a web site with using ASP.NET MVC 5 and WEB API template. I use individual accounts feature of this template. However, WEB API has its own account controller and controls authentication mechanism using it. ASP.NET MVC 5 also has its own account controller.
How can i use both staff in the same authentication mechanism. Or are they in the same authentication, although they use different accountcontroller from each other?
The answer to your question is rather simple. You need both account controllers so that clients calling the MVC controller (e.g. browsers) and clients calling the web api controller (e.g. ajax requests, fiddler etc) can authenticate.
If both controllers are part of the same domain and application then they by default use the same authentication mechanism behind the scenes, even though you can still override this behaviour.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다