1

I'm following this tutorial.

When I build the solution the index.html page would not show up and I get this error: Server Error in '/' Application. I'm not sure how to enable detailed error reporting.

This is my Web.config page:

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>

  <system.web>

    <httpRuntime targetFramework="4.5" />

    <compilation debug="true" targetFramework="4.5" />
    <customErrors mode="Off"/>
    <pages>
      <namespaces>
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
      </namespaces>
    </pages>

  </system.web>

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />

  <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers></system.webServer>
</configuration>

IIS Express shows it as http://localhost:11527/

3
  • Did you look in the project references page to see if all the references could be found? Commented Jan 16, 2014 at 20:27
  • My project reference page is empty. I don't think there are any references for this tutorial. Commented Jan 16, 2014 at 20:40
  • I would think you would need the references listed in the namespaces, like this one: i.imgur.com/SGB3rrK.png (It would explain the missing resource message). Commented Jan 16, 2014 at 20:49

1 Answer 1

2

Are you sure you are accessing it like http://localhost:11527/index.html. Note that this was created with an Empty project template and so there is no MVC and so you cannot expect a default view showing up and so you would need to explicitly mention index.html in your url.

Sign up to request clarification or add additional context in comments.

1 Comment

I have add app.UseMvc(), but not load index.html as default, how to do that in Startup.cs file?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.