简体   繁体   English

身份验证要求输入用户名和密码到http:// www

[英]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: 这是弹出消息:

http://postimg.org/image/4slwg6ywx/

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. 如果要使用表单身份验证,请确保禁用它并启用对网站的匿名访问。

  1. Open IIS Manager and navigate to your website or application. 打开IIS管理器,然后导航到您的网站或应用程序。
  2. In Features View, double-click Authentication. 在“功能视图”中,双击“身份验证”。
  3. On the Authentication page, disable Windows authentication and enable Anonymous authentication. 在“身份验证”页面上,禁用Windows身份验证并启用匿名身份验证。

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

相关问题 使用用户名/密码或客户端证书的基于声明的身份验证 - Claims-based Authentication with Username/Password OR Client Certificate 保存用户名和密码以备将来使用 - Saving username and password for future sessions Windows身份验证-获取Windows用户名 - Windows Authentication - Get windows username TortoiseGit-什么时候要求输入用户名和密码? - TortoiseGit - When does it ask for a username and password? MVC4拦截所有需要身份验证的请求 - MVC4 Intercept ALL Requests that require Authentication 使用带有ADFS2或用户名/密码的SSO的安全令牌服务? - Secure Token Service using SSO with ADFS2 OR username/password? 如何使用简单成员资格在MVC 4应用程序中更改用户名和密码 - How to change username and password in MVC 4 application using Simple membership 如何链接到数据库以验证“忘记密码”选项中的用户名 - How do I link to database for verifying the username in forget password option 管理员使用SimpleMembership中的用户名重置或恢复用户密码 - Reset or recover a user's password by an admin using a username in SimpleMembership 如果UserName密码在MVC 4中不匹配,如何返回错误? - How to return an error if UserName Password does not match in MVC 4?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM