Web Services ADO Problem

Discussion in 'ASP .Net Web Services' started by Terry Ladouceur, Dec 1, 2003.

  1. 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
    Terry Ladouceur, Dec 1, 2003
    #1
    1. Advertising

  2. 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


    >-----Original Message-----
    >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
    >
    >
    >.
    >
    Bruce Johnson, Dec 2, 2003
    #2
    1. Advertising

  3. 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

    "Bruce Johnson" <> wrote in message
    news:b7fa01c3b917$96d56660$...
    > 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
    >
    >
    > >-----Original Message-----
    > >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
    > >
    > >
    > >.
    > >
    Terry Ladouceur, Dec 2, 2003
    #3
  4. 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

    >-----Original Message-----
    >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
    >
    >"Bruce Johnson" <> wrote

    in message
    >news:b7fa01c3b917$96d56660$...
    >> 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
    >>
    >>
    >> >-----Original Message-----
    >> >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
    >> >
    >> >
    >> >.
    >> >

    >
    >
    >.
    >
    Bruce Johnson, Dec 3, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nita
    Replies:
    1
    Views:
    843
    Saravana
    Nov 20, 2004
  2. ronaldlee

    Transfer ADO Code to ADO.NET

    ronaldlee, Dec 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    437
    Kevin Spencer
    Dec 17, 2004
  3. Replies:
    0
    Views:
    1,291
  4. John
    Replies:
    4
    Views:
    403
  5. Navin
    Replies:
    1
    Views:
    659
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page