嗨專家你好嗎?我是學生,並使用sql server 2005學習asp.net c#visual studio 2010。我開發了一個擁有數據庫的網站。我通過互聯網幫助開發了這個網站。該網站完成並在我的電腦上完美運行。web.config文件更新指南
我已託管服務器和域名已註冊。
的問題是,當我上傳我的網站不工作有以下錯誤顯示:我上傳網頁到前
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
我在網上,我必須配置我的web.config文件中讀取的地方託管服務器。在我的網站的web.config文件有以下默認信息,
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="SPConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ShoppingPortal.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<trace enabled="true" localOnly="false" pageOutput="true" />
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
我不知道我應該怎麼編輯它來得到它的託管服務器,請幫我在這方面,我應該怎麼辦一起工作這個。提前謝謝你
錯誤信息實際上是告訴你該怎麼做......在你的節中添加一個''標籤。 –
Dan
謝謝先生它爲我工作,但現在它顯示我幾個其他錯誤我修復它們,但其中之一是,我再次擊中錯誤是: 無法識別的屬性'targetFramework'。請注意,屬性名稱區分大小寫。 第13行: –
Student
[StackOverflow:無法識別的屬性'targetFramework'。請注意,屬性名稱區分大小寫](http://stackoverflow.com/questions/7530725/unrecognized-attribute-targetframework-note-that-attribute-names-are-case-sen) – Dan