台灣最大程式設計社群網站
線上人數
2396
 
會員總數:246280
討論主題:189813
歡迎您免費加入會員
討論區列表 >> 網管 / 資安 / VM >> godaddy租了一個網站空間, web.config問題
[]  
[我要回覆]
1
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
godaddy租了一個網站空間, web.config問題
價值 : 100 QP  點閱數:431 回應數:1
樓主

Alan
門外漢
0 3
16 0
發送站內信



小弟是新手,最近在godaddy租了一個網站空間,上傳時一直發生錯誤,出現錯誤如下:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

問客服他們一直說是web.config的問題,但我一直無法解決,又看不到那那裡出錯了,但我把資料庫指回舊資料庫時又沒問題了,快起笑了,請各位前輩幫幫忙

web.config程式碼如下:

<?xml version="1.0" encoding="utf-8"?>

<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="SQLCONN" connectionString="Server=xxxxxxx;Database=xx.x.xx.xx;uid=xxxxxxx;pwd=xxxxxxx!" providerName="System.Data.SqlClient" />
<add name="xfunMvcConnectionString" connectionString="Data Source=xx.x.xx.xx;Initial Catalog=xxxxxxx;User ID=xxxxxxx;Password=xxxxxxx" providerName="System.Data.SqlClient" />
</connectionStrings>
<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" />
<add key="GlobalUserUploadPath" value="~/Upload/user/" />
<add key="GlobalEditorUploadPath" value="~/Upload/Editor/" />
<add key="GlobalCalendarUploadPath" value="~/Upload/calendar/" />
<add key="GlobalAlbumUploadPath" value="~/Upload/album/" />
<add key="GlobalCourseUploadPath" value="~/Upload/course/" />
<add key="GlobalEBookUploadPath" value="~/Upload/ebook/" />
<add key="GlobalArticleUploadPath" value="~/Upload/article/" />
<add key="GlobalVideoUploadPath" value="~/Upload/video/" />
<add key="GlobalEducationUploadPath" value="~/Upload/education/" />
<add key="GlobalNewsUploadPath" value="~/Upload/news/" />
<add key="GlobalProUploadPath" value="~/Upload/products/" />
<add key="GlobalFilesUploadPath" value="~/Upload/files/" />
<add key="GlobalLinksUploadPath" value="~/Upload/links/" />
<add key="GlobalServiceUploadPath" value="~/Upload/service/" />
<add key="GlobalGalleryUploadPath" value="~/Upload/gallery/" />
<add key="GlobalQAUploadPath" value="~/Upload/qa/" />
<add key="GlobalADUploadPath" value="~/Upload/ad/" />
<add key="GlobalUnidepartUploadPath" value="~/Upload/unidepart/" />
<add key="GlobalPagesUploadPath" value="~/Upload/pages/" />
<add key="GlobalStoreUploadPath" value="~/Upload/store/" />
<add key="GlobalForumUploadPath" value="~/Upload/forum/" />
<add key="GlobalEpaperUploadPath" value="~/Upload/epaper/" />
<add key="GlobalAppDataPath" value="~/App_Data/" />
<add key="GlobalLogPath" value="~/App_Data/Log/" />
</appSettings>
<system.web>

<!--最大允許10240KB:10MB-->
<httpRuntime targetFramework="4.5" maxRequestLength="10240" />
<compilation debug="true" targetFramework="4.5" />
<authentication mode="Forms">
<forms loginUrl="~/ajaxmember/login" timeout="2880" cookieless="UseCookies" />
</authentication>
<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.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
<profile defaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</profile>
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
</providers>
</roleManager>

<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>
<customErrors defaultRedirect="~/Error" mode="Off">
<error statusCode="404" redirect="~/Error/NotFound" />
</customErrors>
<trust level="Full" />
</system.web>
<system.webServer>

<modules>
<remove name="WebDAVModule" />
</modules>
<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" />
<remove name="WebDAV" />
</handlers>
<security>
<requestFiltering>
<verbs allowUnlisted="false">
<add verb="GET" allowed="true" />
<add verb="POST" allowed="true" />
<add verb="DELETE" allowed="true" />
<add verb="UPDATE" allowed="true" />
<add verb="PUT" allowed="true" />
</verbs>
</requestFiltering>
</security>
<defaultDocument>
<files>
<clear />
<add value="index" />
<add value="Default.htm" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
<directoryBrowse enabled="false" />
<httpProtocol>
<customHeaders>
<clear />
<add name="X-Powered-By" value="ASP.NET" />
</customHeaders>
</httpProtocol>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />

</entityFramework>
</configuration>



搜尋相關Tags的文章: [ godaddy ] , [ web.config ] ,
本篇文章發表於2021-01-19 22:45
1樓
回應

MIS2000 Lab
檢舉此回應
Q : 但我把資料庫指回舊資料庫時又沒問題了

A : 請問新的資料庫,防火牆有開放給Web Server連結嗎?

因為詳細的錯誤訊息沒有呈現出來,只能用猜的

您要不要先開放,讓錯誤訊息可以呈現到Client畫面上,
確定錯誤並解決以後,再來關閉(這是IIS的基本功能)
本篇文章回覆於2021-01-20 09:53
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
   
1

回覆
如要回應,請先登入.