Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc IIS找不到应用程序!_Asp.net Mvc_Iis 7.5 - Fatal编程技术网

Asp.net mvc IIS找不到应用程序!

Asp.net mvc IIS找不到应用程序!,asp.net-mvc,iis-7.5,Asp.net Mvc,Iis 7.5,您好,我的MVC 2 ASP.NET在IIS 7.5上运行时遇到问题 Server Error in Application "ORDERS"Internet Information Services 7.5 Error Summary HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporari

您好,我的MVC 2 ASP.NET在IIS 7.5上运行时遇到问题

  Server Error in Application "ORDERS"Internet Information Services 7.5
    Error Summary
    HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Detailed Error Information
    Module IIS Web Core 
    Notification MapRequestHandler 
    Handler StaticFile 
    Error Code 0x80070002 
    Requested URL http://localhost:8080/home 
    Physical Path C:\Ordering\home 
    Logon Method Anonymous 
    Logon User Anonymous 
我在本地发布了它,然后将文件复制到服务器,并将它们放到c:\Ordering。当我尝试运行localhost:8080/home时,找不到它

编辑:

我后来发现这是一个重定向问题-有些东西没有进入重定向到/Home或/Account/LogOn

以下是web.config(如果有帮助):

<?xml version="1.0"?>

<configuration>
  <connectionStrings>
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|ASPNETDB.MDF;User Instance=true"
      providerName="System.Data.SqlClient" />
    <add name="orderbaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\orderbase.mdf;Integrated Security=True;User Instance=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>

  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>

    <customErrors mode="Off"/> 

    <authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="2880" />
    </authentication>  


    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
             enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
             maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
             applicationName="/" />
      </providers>
    </membership>

    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
      </providers>
    </profile>


    <roleManager enabled="true">
      <providers>
        <clear />
        <add connectionStringName="ApplicationServices" applicationName="/"
          name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
        <add applicationName="/" name="AspNetWindowsTokenRoleProvider"
          type="System.Web.Security.WindowsTokenRoleProvider" />
      </providers>
    </roleManager>

    <pages>
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
      </namespaces>
    </pages>
  </system.web>

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

感谢您的帮助

您应该验证您在IIS管理器中是否有指向C:\Ordering\home目录的端口8080的虚拟目录主目录。如果它还不存在-在应用程序中创建并转换它,请参见上下文菜单


验证运行应用程序池的IIS\u IUSRS组或帐户是否可以访问目录C:\Ordering\home。

好的,谢谢,但是当我在本地IIS上运行时,转发到/home或/account/logon会自动完成-我没有添加任何虚拟目录。您应该在ISS中的某个位置定义,它应该等待对8080端口的请求,如果请求到达,它应该搜索文件,如defaul.html、default.asp、default.aspx等,请参见标准文档配置。这可能是你犯错误的主要原因。它必须在ISS配置中,您没有在此处发布。当前正在查看:不确定如何将映射添加到:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet\u isapi.dll目前看起来非常好。。。应该提到这是一个64位环境。doh。试图找出如何将.net设置为正确的框架