Web Services ADO Problem

  • Thread starter Terry Ladouceur
  • Start date
T

Terry Ladouceur

Further to my problem with my HTTP 500 Internal Server Error, I recieve the
following error if I try to run the Service directly on the Web Server that
hosts both the SQL Server and the IIS. The Web Service simply opens a SQL
Connection Runs a Stored Procedure and returns a database. Of course the
error occurs when I try to setup the connection. Any suggestions would be
greatly appreciated as I have no idea of where to proceed from here and it
is of course stopping my development in it's tracks. Thanks

System.Net.WebException: The underlying connection was closed: Unable to
connect to the remote server.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type
ofObjectToReturn)
at System.Xml.XmlTextReader.CreateScanner()
at System.Xml.XmlTextReader.Init()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(String fileName)
at TasmisDBSvc.ArmsDBService.GetOfficerList() in
\\server\wwwroot$\TasmisDBSvc\ArmsDBSvc.asmx.vb:line 68

Tery Ladouceur
 
B

Bruce Johnson

It would seem from the exception that is being thrown
that the problem is not with the connection to your SQL
server, but in the web service itself. I wouldn't expect
to see a WebException thrown while making a connection.
Would it be possible to see the code that is causing the
problem?

Bruce Johnson
http://www.objectsharp.com/Bruce
 
T

Terry Ladouceur

Here is the two lines that are causing this problem:

Dim oConn As New
SqlConnection("Server=server;Trusted_Connection=Yes;Database=Test1")

oConn.Open()

Anything you can help with TIA. TTYL

Terry
 
B

Bruce Johnson

I'd be looking at two areas. First, does the ASP.NET
user have access to the 'server'. Second, does the
ASP.NET user have access to the specified database. It
is this second area that looks the most promising. You
might want to try using an explicit user id and password
to see if that is the problem.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top