2016-11-11 48 views
1

我在浏览器中面临的一个错误,当我从微软的Visual Studio.I运行自己的网站配置错误要Default.aspx页面上工作。我是初学ASP.net开发者。 附上截图。 附带web.config代码。 enter image description here'/'应用程序中的服务器错误。 ASP.net

<?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> 
     <configSections> 
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> 
     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 
     </configSections> 
     <connectionStrings> 
     <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-goTestSite-20161022093915.mdf;Initial Catalog=aspnet-goTestSite-20161022093915;Integrated Security=True" 
      providerName="System.Data.SqlClient" /> 
Line 14:  </connectionStrings> 
Line 15:  <system.web> 
Line 16:  <authentication mode="None" /> 
Line 17:  <compilation debug="true" targetFramework="4.5" /> 
Line 18:  <httpRuntime targetFramework="4.5" /> 

     <sessionState mode="InProc" customProvider="DefaultSessionProvider"> 
      <providers> 
      <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" /> 
      </providers> 
     </sessionState> 
     </system.web> 
     <system.webServer> 
     <modules> 
      <remove name="FormsAuthentication" /> 
     </modules> 
     </system.webServer> 
     <runtime> 
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
      <dependentAssembly> 
      <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> 
      <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" /> 
      <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> 
      </dependentAssembly> 
      <dependentAssembly> 
      <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" /> 
      <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> 
      </dependentAssembly> 
     </assemblyBinding> 
     </runtime> 
     <entityFramework> 
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> 
      <parameters> 
      <parameter value="v11.0" /> 
      </parameters> 
     </defaultConnectionFactory> 
     <providers> 
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> 
     </providers> 
     </entityFramework> 
    </configuration> 

错误显示16行红色 请帮我解决这个问题。

+0

。希望下面的回答帮助您的问题 –

回答

1

上述错误可能会导致很多原因,但我认为你的问题的一个解决方案就是,只要右键点击该网页,运行应用程序设置Default.aspx页作为您的起始页。

希望能解决您的问题,否则我们会寻找其他解决方案,请让我知道您的想法或反馈。

详细的解决方案在这里:http://scottonwriting.net/sowblog/archive/2010/02/17/163375.aspx

感谢 KARTHIK

相关问题