2012-08-17 31 views
3

我重新安裝了Windows,現在正在配置所有設置以使我的計算機恢復運行。導航到www.mysite.com,當我收到此錯誤: enter image description hereHTTP錯誤500.19 - 內部服務器錯誤請求的頁面無法訪問,因爲頁面的相關配置數據無效

我看着各種論壇和給文件夾C:\ dropbpx \的Inetpub \ mysite的對IIS_IUSRS完全權限,IUSR,每個人都和網絡服務,但我不斷收到錯誤。 我也給予充分IIS_IUSRS上的權限對ApplicationHost.config在%WINDIR%\ SYSTEM32 \ INETSRV \設置\

此外,當我通過IIS去我的網站,並點擊「驗證」我得到的錯誤: 執行此操作時發生錯誤。 詳情: 文件名:\ \ C:\ Dropbox的\的Inetpub \ mysite的\ web.config中 錯誤:

我的網站的應用程序池設置爲ASP.NET v4.0的

看到這裏我的網站.config

<?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> 


<connectionStrings> 
<add name="conn1" connectionString="data source=(local);Initial Catalog=tt;User Id=sa;Password=dfsdf3454sdg;" providerName="System.Data.SqlClient" /> 
</connectionStrings> 
<system.web.extensions> 
<scripting> 
    <webServices> 
    <jsonSerialization maxJsonLength="5000000" /> 
    </webServices> 
</scripting> 
</system.web.extensions> 

<system.web> 
<httpRuntime maxRequestLength="5120000" requestValidationMode="2.0" /> 
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /> 

<sessionState mode="InProc" timeout="60" /> 
<authentication mode="Forms"> 
    <forms name=".MyCookie" slidingExpiration="true" timeout="60" cookieless="AutoDetect" loginUrl="/login/" protection="All" defaultUrl="/"> 
    <credentials passwordFormat="SHA1" /> 
    </forms> 
</authentication> 
<roleManager domain="192.168.0.103" enabled="true" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="60" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" defaultProvider="AccessRoleProvider" createPersistentCookie="false" maxCachedResults="25"> 
    <providers> 
    <clear /> 
    <add name="AccessRoleProvider" connectionStringName="conn1" applicationName="/wedding" type="Samples.AccessProviders.AccessRoleProvider" /> 
    </providers> 
</roleManager> 
<membership defaultProvider="AccessMembershipProvider" userIsOnlineTimeWindow="30"> 
    <providers> 
    <clear /> 
    <add name="AccessMembershipProvider" type="Samples.AccessProviders.AccessMembershipProvider" connectionStringName="conn1" requiresQuestionAndAnswer="false" applicationName="/wedding" minRequiredPasswordLength="6" enablePasswordRetrieval="false" enablePasswordReset="true" requiresUniqueEmail="true" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed" /> 
    </providers> 
</membership> 
</system.web> 
<system.webServer> 
<!-- SEO-friendly URLS for IIS 7.0 (if you're using IIS 6.0 see above) --> 
<validation validateIntegratedModeConfiguration="false" /> 
<modules runAllManagedModulesForAllRequests="true"> 
    <add type="aspnetforum.ForumSEOHttpModule, aspnetforum" name="ForumSEOHttpModule" /> 
</modules> 
<handlers> 
    <add name="ScriptCombiner" verb="POST,GET" path="ScriptCombiner.axd" preCondition="integratedMode" type="ScriptCombiner, App_Code" /> 
</handlers> 
<security> 
    <requestFiltering allowDoubleEscaping="true" /> 
</security> 
<defaultDocument> 
    <files> 
    <clear /> 
    <add value="default.aspx" /> 
    <add value="Default.htm" /> 
    <add value="Default.asp" /> 
    <add value="index.htm" /> 
    <add value="index.html" /> 
    <add value="iisstart.htm" /> 
    </files> 
</defaultDocument> 
    <staticContent> 
     <mimeMap fileExtension=".kml" mimeType="application/vnd.google-earth.kml+xml" /> 
    </staticContent> 
</system.webServer> 
<system.serviceModel> 
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> 
<bindings> 
    <basicHttpBinding> 
    <binding name="VirtueleKassaWebServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <security mode="Transport"> 
     <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
     </security> 
    </binding> 
    <binding name="VirtueleKassaWebServiceSoap1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> 
     <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
     <security mode="None"> 
     <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
     </security> 
    </binding> 
    </basicHttpBinding> 
</bindings> 
<client> 
    <endpoint address="https://secure.virtuelekassa.nl/webservice/VirtueleKassaWebservice.asmx" binding="basicHttpBinding" bindingConfiguration="VirtueleKassaWebServiceSoap" contract="virtuelekassa.VirtueleKassaWebServiceSoap" name="VirtueleKassaWebServiceSoap" /> 
</client> 
    <services> 
     <service name="RestService.weddingservice"> 
      <endpoint behaviorConfiguration="webHttp" binding="webHttpBinding" contract="RestService.Iweddingservice" /> 
     </service> 
    </services> 

<behaviors> 
    <serviceBehaviors> 
    <behavior name=""> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="true" /> 
    </behavior> 
    </serviceBehaviors> 
    <endpointBehaviors> 
    <behavior name="webHttp"> 
     <webHttp /> 
    </behavior> 
    </endpointBehaviors> 
</behaviors> 
</system.serviceModel> 
</configuration> 

它還能是什麼?

+1

你能發佈web.config文件的內容嗎? – 2012-08-17 14:04:12

+0

我添加了我的web.config。但是,與我在重新安裝Windows之前完全一樣,所以在那裏不應該有問題。 – Flo 2012-08-17 14:49:21

+0

我已經設置了一個類似於你提到的配置(** IIS 7.5 **,使用你發佈的** Web.config **,下載必要的依賴項以便編譯,並將IIS網站根文件夾設置爲包含所有這一切),我沒有得到任何錯誤。我不必設置任何文件夾權限或任何東西。我會嘗試刪除'%WINDIR%\ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files'中的所有文件夾,儘管它是一個非常長的鏡頭,但它有時候會有訣竅。 – 2012-08-17 19:16:32

回答

10

絕對不要忽略web.config中你認爲不相關的部分:它是web.config中的urlrewrite部分!我安裝了它(http://www.microsoft.com/web/gallery/install.aspx?appid=urlrewrite2),現在它工作。

3

檢查以下的IIS功能處於開啓狀態。(應用程序開發功能)

enter image description here

如果在應用程序開發功能功能不是從Windows打開它展示了從關閉控制面板。

0

Thats because you have not registered the ASP in IIS.

Go to C:\Windows\Microsoft.NET\Framework\v4.0.30319 and execute aspnet_regiis.exe

Go to IIS, expand server, click Application Pools. If it doesn't contain "ASP.NET v4.0" and "ASP.NET v4.0 Classic" files, ASP is not registered in IIS.

Take command prompt, go to C:\Windows\Microsoft.NET\Framework\v4.0.30319 location. Type aspnet_regiis -i

Now it will show that ASP is getting registered. After it is completed, you can see "ASP.NET v4.0" and "ASP.NET v4.0 Classic" files in IIS under Application Pool

相關問題