C# 使用WebService在Web服务器和ms sql server之间进行通信
拥有一个web应用程序。开发后现在要安装,必须更改服务器地址、服务器名称、用户名和密码。 已经修改了application.Web.Config连接字符串,只需将现有元素切换为新元素即可C# 使用WebService在Web服务器和ms sql server之间进行通信,c#,wcf,silverlight,C#,Wcf,Silverlight,拥有一个web应用程序。开发后现在要安装,必须更改服务器地址、服务器名称、用户名和密码。 已经修改了application.Web.Config连接字符串,只需将现有元素切换为新元素即可 <connectionStrings> <add name="ConnstringName" connectionString="Data Source=SourceServerName;Initial Catalog=CName;Persist Security Info=True;User
<connectionStrings> <add name="ConnstringName" connectionString="Data Source=SourceServerName;Initial Catalog=CName;Persist Security Info=True;User ID=user;Password=pwd" providerName="System.Data.SqlClient" </connectionStrings>
无法使用web服务与SQL server通信。SQL server是一个数据库。在重新构建应用程序后,应用程序正在工作,我可以使用web服务与数据库通信,因为web服务可以发送DML查询,如果您有权限,服务器将执行该查询。也许没有写完整的应用程序。
<client>
<endpoint address="../Service1.svc" binding="customBinding"
bindingConfiguration="CustomBinding_Service1" contract="ServiceReference1.Service1"
name="CustomBinding_Service1"/>
</client>