它的基本功能与我的asp.net应用程序不兼容

本文关键字:asp net 应用程序 不兼容 我的 功能 | 更新日期: 2023-09-27 18:02:41

我的需要很简单,我有一个asp.net mvc 5 web应用程序,我想向我的客户展示我的应用程序。为此,我想把我的网站放在我的iis上,并使用基本权限保护访问。

问题:与一个空文件夹它工作得很好,但当我部署我的应用程序,我得到了:页面重定向不正确

链接:http://XX.XXX.XXX.XXX:XXXX/Account/Login?ReturnUrl=%2FAccount%2FLogin%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl%253D%25....

这是我的网。配置:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <system.web>
    <authentication mode="None" />
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>
  <system.webServer>
    <modules>
      <remove name="FormsAuthentication" />
    </modules>
  </system.webServer>
</configuration>

我在IIS中的配置权限:-禁用匿名验证-启用基本授权

但是没有我的应用程序它也能正常工作,所以我认为

它的基本功能与我的asp.net应用程序不兼容

好吧,我确定问题不是关于代码,但它是…

在Startup.cs文件中,我注释了默认代码:
public partial class Startup
{
    public void Configuration(IAppBuilder app)
    {
        //ConfigureAuth(app);
    }
}

它成功了