我刚刚用 123.reg 购买了虚拟主机,并上传了我的 asp.net 网站和数据库。
我的 web.config 文件当前具有以下作为连接字符串:
<connectionStrings>
<add name="RaiseConnectionString" connectionString="Data Source=MATT-PC\SQLEXPRESS;Initial Catalog=Raise;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
但是,123.reg 帐户会出现此问题,因为它要求连接字符串格式为:
<appSettings>
<add key="ConnectionString" value="Server=ATLAS-SQL-07; Database=Raise; User Id=Raise; Password=******" />
</appSettings>
通过更改此设置,我的应用程序出现错误,因为它找不到连接字符串 Raise。我该如何纠正这个问题?