[英]Authentication Require Enter username and password to http://www
I am getting window authentication window popup on some of my views in mvc4. 我在mvc4中的某些视图上出现窗口身份验证窗口弹出窗口。 It works fine when I host it on local server.
当我将其托管在本地服务器上时,它可以正常工作。 But when I upload my code to my hosting server, all the views works fine except some views.
但是,当我将代码上传到托管服务器时,除某些视图外,所有视图都可以正常工作。
I am using form authentication in my application. 我在应用程序中使用表单身份验证。 And the views which given me such popups their controller class define with
[Authorize]
attribute. 并且为我提供了此类弹出窗口的视图,其控制器类使用
[Authorize]
属性定义。 Is it an issue with IIS on hosted server or something else? 托管服务器上的IIS是否有问题?
This is the popup message: 这是弹出消息:
I suspect that you have Integrated Windows Authentication or Basic Authentication configured in IIS for your website or application (depending on how you are hosting it). 我怀疑您在IIS中为您的网站或应用程序配置了集成Windows身份验证或基本身份验证(取决于您托管它的方式)。 Make sure you disable it and enable anonymous access to the website if you want to use Forms Authentication.
如果要使用表单身份验证,请确保禁用它并启用对网站的匿名访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.