2016-11-11 45 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

相關問題