2013-03-04 86 views
0

我嘗試上傳website.I不知道如何配置上傳時間的數據庫(web.config文件)。我使用Somee.com,任何熟悉somee.com的人或知道如何配置數據庫請幫助我。無法上傳服務器上的網站

webconfig文件代碼

<configuration> 
<connectionStrings> 
<add name="abc" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Jai-Ganesh\Documents\Visual Studio 2010\WebSites\testinmg\App_Data\Database.mdf;Integrated Security=True;User Instance=True"/> 
</connectionStrings> 
<system.web> 
<compilation debug="true" targetFramework="4.0"/> 
<customErrors mode="RemoteOnly" ></customErrors> 
</system.web> 
</configuration> 

注:我不知道什麼是服務器中的數據源的路徑。

鏈接頁面: [http://www.imureditor.somee.com/add_value.aspx] [1]

回答

1

首先您需要聯繫您的託管服務提供商以獲取連接字符串。他們會給你ip地址(你也可以是主機名),然後你可以配置它。
查看下面的例子;或者在下面舉一個真實的例子;

<add name="KenSchoolConnectionString" connectionString="Password=1234;Data Source=192.168.1.1;Integrated Security=False;Initial Catalog=KenMISSchoolDB;User ID=sa" /> 

OR 轉到connectionstrings.com

+0

thnx Dotnetdreamer ....但有同樣的問題,他們提供此連接字符串; ;工作站ID = testtest.mssql.somee.com;數據包大小= 4096;用戶ID = vmagic089_SQLLogin_1; pwd = hmeq8v2nro;數據源= testtest.mssql.somee。 com; persist security info = False; initial catalog = testtest – 2013-03-05 06:33:13

+0

thnx Mr.DotNet Dreamer help.i解決了這個問題。更多的事情,我必須知道我怎樣才能將我的數據庫上傳到不同的服務器。 – 2013-03-05 10:19:15

+1

你必須先備份你的數據庫然後恢復它。或者生成一個sql文件並在服務器上執行它。或者試試youtube.com – 2013-03-05 10:31:32

0

連接字符串引用您的本地SQL Server實例,並嘗試連接一個本地文件;此連接字符串將需要更改以反映服務器上的設置,因此您需要指定Data SourceCatalogUser IDPassword - Integrated Security將不起作用,並且附加* .mdf文件從App_Data可能不會無論是。

您的服務提供商負責爲您提供所需的憑據,我們無法猜測它們。

+0

「工作站ID = testtest.mssql.somee.com;分組大小= 4096;用戶ID = vmagic089_SQLLogin_1; PWD = hmeq8v2nro;數據源= testtest.mssql.somee。 com;堅持安全信息=假;初始目錄= testtest' – 2013-03-05 06:35:59

+0

這是他們提供的內部字符串,但仍然不工作:( – 2013-03-05 06:36:33

+0

thnx格蘭特托馬斯 – 2013-03-05 10:19:33