开发者

System.ServiceModel.FaultException SQL Error, is it on their end?

So upon a method call to a webservice, I'm getting this error:

"System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, Str...)."

What could this possibly be? At first I thought it was coming in locally, but someone below pointed out since the error is wrapped in a ServiceModel.FaultException, it might be on the host end. Is it definitely on their end? Or are t开发者_如何学JAVAhere any possible ways this could be on my end?

Look at comments below to find out how troubleshooting has gone so far...


This is on the service end. Moreover those guys don't follow security basics and include internal exception details to soap faults.

Do you use HTTP based transport channel? If so use Fiddler, capture SOAP fault from the service and send it to company as proof that error is on their side. If you use other transport channel or encryption use WCF message logging and again send logged message to company.


Does the service run okay on your dev box, but fails when it's deployed? Maybe there's a difference in firewalls between the two locations and the SQL Server. From a command line, does "TELNET YourSqlServer 1433" give you a blank screen, or does it time out?

If you can verify that the service works somewhere (like visual studio or your dev box), that's somewhere to start - what's different between the working and non-working locations?

If not, does the web service call fail immediately with that message, or does it fail after 30 seconds? A delayed failure suggests a timeout, where an immediate failure is likely configuration.


Seems like you're trying to access your sql server via Named Pipes; this protocol allows you to connect to sql server only if it is in the same subnet. Just change the protocol to tcp.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜