Web服务连接字符串问题 [英] Webservice connectionstring problem

查看:114
本文介绍了Web服务连接字符串问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WebService Connectionstring错误



创建一个用于将字符串数据插入sql server 2008数据库的webservice(.asmx)。 。

我发布webservice并托管到本地IIS服务器......完美的工作。但我托管在互联网服务器(Windows服务器)上,连接环连接错误导致错误无法初始化...这是连接字符串

WebService Connectionstring Error

am create a webservice(.asmx) used to insert string data to a sql server 2008 database...
am publish webservice and host in to local IIS Server..its perfectly working. but am hosted on internet server(windows sever), getting an error with connectionsring Connection string property could not be initialised...this is the connectionstring

<connectionstrings>
    <add name="DatabaseConnectionString1" connectionstring="Data Source=*****;AttachDbFilename=databasename;Integrated Security=False;User Id=username; Password=password;" providername="System.Data.SqlClient" />
  </connectionstrings>



是什么意思...


whats the actual error...

推荐答案

似乎像如果你没有使用Sql Express,则会发生attachdbfilename问题。

SQL conn应该是这样的:



数据源= DatabaseServer;初始目录= Northwind;用户ID = YourUserID;密码= YourPassword



请尝试这个方向
Seems like attachdbfilename issue if you are not using Sql Express.
SQL conn should go like this:

"Data Source=DatabaseServer;Initial Catalog=Northwind;User ID=YourUserID;Password=YourPassword"

Please try in this direction


这篇关于Web服务连接字符串问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆