Note that there are some explanatory texts on larger screens.

plurals
  1. POpublish asp.net mvc 4 site gave 404 on IIS 6 host
    primarykey
    data
    text
    <p>Newly created ASP.Net MVC 4, C# project with VS Express 2012 for Web, target .Net Framework version 4.0 (same as the remote host).<br> Debugging directly through VS is find. After publishing to local folder, [<strong>original:</strong><strike>There is no .aspx generated, only <strong>sitename.dll</strong>, there were even original <strong>.cshtml</strong> files</strike>] and copying to IIS Express <code>C:\inetpub\www</code> folder, <code>http://localhost/Home</code> is fine.</p> <p>But when I upload everything to host (according to <strong>info.aspx</strong>, server info: IIS 6.0, .Net Version 4.0.30319.239), <code>http://domain/Home</code> gave <code>page cannot be found</code> 404 error, which seems like a routing problem.</p> <p>Here is my <strong>Web.config</strong>: </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt; &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt; &lt;/configSections&gt; &lt;connectionStrings&gt; &lt;add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-FireupCooking.Net4._0-20130620031747;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-FireupCooking.Net4._0-20130620031747.mdf" providerName="System.Data.SqlClient" /&gt; &lt;/connectionStrings&gt; &lt;appSettings&gt; &lt;add key="webpages:Version" value="2.0.0.0" /&gt; &lt;add key="webpages:Enabled" value="false" /&gt; &lt;add key="PreserveLoginUrl" value="true" /&gt; &lt;add key="ClientValidationEnabled" value="true" /&gt; &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt; &lt;/appSettings&gt; &lt;system.web&gt; &lt;customErrors mode="Off" /&gt; &lt;compilation targetFramework="4.0" /&gt; &lt;authentication mode="Forms"&gt; &lt;forms loginUrl="~/Account/Login" timeout="2880" /&gt; &lt;/authentication&gt; &lt;pages&gt; &lt;namespaces&gt; &lt;add namespace="System.Web.Helpers" /&gt; &lt;add namespace="System.Web.Mvc" /&gt; &lt;add namespace="System.Web.Mvc.Ajax" /&gt; &lt;add namespace="System.Web.Mvc.Html" /&gt; &lt;add namespace="System.Web.Optimization" /&gt; &lt;add namespace="System.Web.Routing" /&gt; &lt;add namespace="System.Web.WebPages" /&gt; &lt;/namespaces&gt; &lt;/pages&gt; &lt;/system.web&gt; &lt;system.webServer&gt; &lt;validation validateIntegratedModeConfiguration="false" /&gt; &lt;modules runAllManagedModulesForAllRequests="true" /&gt; &lt;handlers&gt; &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /&gt; &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /&gt; &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt; &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /&gt; &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /&gt; &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt; &lt;/handlers&gt; &lt;/system.webServer&gt; &lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /&gt; &lt;bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt; &lt;/dependentAssembly&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /&gt; &lt;bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" /&gt; &lt;/dependentAssembly&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /&gt; &lt;bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt; &lt;/dependentAssembly&gt; &lt;/assemblyBinding&gt; &lt;/runtime&gt; &lt;entityFramework&gt; &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt; &lt;/entityFramework&gt; &lt;/configuration&gt; </code></pre> <p>Here are the files under <strong>bin/</strong>:</p> <pre><code>Antlr3.Runtime.dll DotNetOpenAuth.AspNet.dll DotNetOpenAuth.Core.dll DotNetOpenAuth.OAuth.Consumer.dll DotNetOpenAuth.OAuth.dll DotNetOpenAuth.OpenId.dll DotNetOpenAuth.OpenId.RelyingParty.dll EntityFramework.dll FireupCooking.Net4.0.dll Microsoft.Web.Infrastructure.dll Microsoft.Web.WebPages.OAuth.dll Newtonsoft.Json.dll System.Net.Http.dll System.Net.Http.Formatting.dll System.Net.Http.WebRequest.dll System.Web.Helpers.dll System.Web.Http.dll System.Web.Http.WebHost.dll System.Web.Mvc.dll System.Web.Optimization.dll System.Web.Razor.dll System.Web.WebPages.Deployment.dll System.Web.WebPages.dll System.Web.WebPages.Razor.dll WebGrease.dll WebMatrix.Data.dll WebMatrix.WebData.dll </code></pre> <p>I also tried the following minimal <code>web.config</code>, info.aspx <strike>still gave the <strong>Server Application Unavailable</strong> error</strike>. <strong>UPDATE:</strong> This file now showing server info. </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;customErrors mode="Off" /&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre> <p>Static files html, gif and simple *.aspx*s are fine. Only MVC pathes <code>/Home/Index</code> and <code>/Home</code> gave <strong>404 - not found</strong> error.</p> <p>What should I change to make it work?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload