我最近使用vs 2013(項目> web>asp.net
應用程序> web表單)構建了一個新網站。我的項目在我的本地主機上構建完美,沒有錯誤。我也能夠在Azure上成功發佈它。不過,我希望通過Godaddy在我的共享主機帳戶上。我使用ftp協議將其上傳到我的主機帳戶。XML解析和503錯誤,godaddy hosing
當我進入Plesk Panel時,我的所有文件都在正確的根目錄httpdocs/
中。但是,當我嘗試在瀏覽器中訪問該網站時,它將返回503錯誤。我沒有直接訪問IIS並且禁止遠程桌面;但是,我確實檢查了所有設置,它們似乎是正確的。
當我使用ftp://ipaddress
訪問我的網站時,它會返回我的目錄。如果我點擊我的網頁,比如我的默認頁面,我發現我得到一個解析器錯誤的1號線,2列:
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="PoserDesigns.About" %>
-^
我所做的事情,試圖解決錯誤:我有保證我的權限設置是否正確,以全在我的服務器設置,在我的配置文件:
<securityPolicy>
<trustLevel name="full" policyFile="internal" />
<trulstLevel name="High" policyFile="web_hightrust.config" />
<trustLevel name="Medium" policyFile="web_mediumtrust.config" />
<trustLevel name="Low" policyFile="web_lowtrust.config" />
<trustLevel name="Minimal" policyFile="web_minimaltrust.config" />
</securityPolicy>
<trust level="Full" originUrl="" processRequestInApplicationTrust="true"/>
我已經跑了customerrors mode="off"
,看它是否會揭示我的籌碼東西。我仍然收到503錯誤消息。
我想知道如果這也許有事情做着這片我的代碼:
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
我需要改變sessionState mode=InProc
到sessionState mode=custom
?如果是的話,我會將connectionStringName=DefaultConnetion
更改爲?
此外,我沒有使用這個網站的數據庫,所以沒有必要連接到一個。所以我不確定這是否意味着我需要更改一些配置文件,我真的只是使用彈出的標準,然後根據我在這裏找到的有關與godaddy託管類似問題的信息進行編輯。
對於接下來要嘗試的任何建議將不勝感激。在此先感謝
這裏是我的參考配置文件:
<?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-PoserDesigns-20140520052204.mdf;Initial Catalog=aspnet-PoserDesigns-20140520052204;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<authentication mode="None" />
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<securityPolicy>
<trustLevel name="full" policyFile="internal" />
<trulstLevel name="High" policyFile="web_hightrust.config" />
<trustLevel name="Medium" policyFile="web_mediumtrust.config" />
<trustLevel name="Low" policyFile="web_lowtrust.config" />
<trustLevel name="Minimal" policyFile="web_minimaltrust.config" />
</securityPolicy>
<trust level="Full" originUrl="" processRequestInApplicationTrust="true"/>
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<add namespace="System.Web.Optimization" />
<add namespace="Microsoft.AspNet.Identity" />
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
</controls>
</pages>
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
</providers>
</sessionState>
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthenticationModule" />
</modules>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</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>
我投票結束這個問題作爲題外話,因爲這應該問Godaddy客戶支持 –