我正在运行MVC3和Windows身份验证Web应用程序.当我部署到IIS6时,它运行良好,直到我点击需要身份验证的页面.然后,当我在我的应用程序中没有跟踪它并且我的web.config配置为windows auth时,它会自动重定向到/ Account/Login.
有任何想法吗?
这是我的整个web.config文件:http://pastie.org/1568510
asp.net-mvc iis-6 windows-authentication sharp-architecture asp.net-mvc-3
从MVC 4升级到MVC 5后,我的应用程序(从Visual Studio中启动时)会出现以下错误.值得注意的是,我在同一个项目中托管MVC5和WebAPI2项目,因为可能存在干扰.我还安装了dotnetopenauth nuget包(我已经删除了):
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /login.aspx
Run Code Online (Sandbox Code Playgroud)
我不确定为什么会这样,因为过滤器或控制器上没有设置授权属性.
Global.asax中:
public class MvcApplication : HttpApplication {
protected void Application_Start() {
IDependencyInjectionBuilder dependencyInjectionBuilder = new DependencyInjectorBuilder();
var builder = new ContainerBuilder();
builder.RegisterControllers(typeof(MvcApplication).Assembly); …Run Code Online (Sandbox Code Playgroud)