+ Reply to Thread
Results 1 to 3 of 3

An existing connection was forcibly closed by the remote host

  1. An existing connection was forcibly closed by the remote host

    Help needed!

    When trying to connect to 2005 Analysis Services from ASP page (using
    ADOMD.NET and 9.0 OLE DB), I got the error: An existing connection was
    forcibly closed by the remote host. I was able to connect once and only
    once...frustration came after excitement. I have not been able to connect
    since that one success. The full exception messge as the following:

    [SocketException (0x2746): An existing connection was forcibly closed by the
    remote host]
    System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
    size, SocketFlags socketFlags) +1043387
    System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
    size) +119

    [IOException: Unable to read data from the transport connection: An existing
    connection was forcibly closed by the remote host.]
    System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
    size) +267
    System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
    +194
    Microsoft.AnalysisServices.AdomdClient.DimeRecord.ForceRead(Stream
    stream, Byte[] buffer, Int32 length) +35
    Microsoft.AnalysisServices.AdomdClient.DimeRecord.ReadHeader() +37
    Microsoft.AnalysisServices.AdomdClient.DimeRecord..ctor(Stream stream)
    +100
    Microsoft.AnalysisServices.AdomdClient.DimeReader.ReadRecord() +74
    Microsoft.AnalysisServices.AdomdClient.TcpStream.GetResponseDataType()
    +74



    I have to admit that I am new to both Analysis Services and ASP.NET, but I
    was able to make it happen once. I even tried creating new page and even
    project again, but no success. I suspect it has something to do with the
    SQL server side, but I cannot figure out why. If I should be posting to a
    different group, please let me know. Please help!!

    Thanks in advance
    YY



  2. Re: An existing connection was forcibly closed by the remote host

    It seems that the account under which your asp code is running (in IIS)
    doesn't have permissions to the AS2005.
    Probably the account is the Anonymous account that IIS is using, you will
    need to check the IIS settings.

    If this is the problem, it can be fixed by setting up IIS to require
    authentication of its users and to impersonate them when running the code
    that connects to AS2005. And on AS2005 you will create a database Role with
    appropriate permissions for the users you want.

    For temporary testing (although you should not use this as the final
    solution since it's not a good security), you can add the Anonymous account
    (or the account that your IIS is using when running the asp code) as a
    AS2005 server administrator (start SQL Management Studio, right click on the
    AS2005 server -> Properties -> Security tab).

    Adrian


    "Yan Yi Huang" wrote in message
    news:eq8Kg5%23zHHA.3916@TK2MSFTNGP02.phx.gbl...
    > Help needed!
    >
    > When trying to connect to 2005 Analysis Services from ASP page (using
    > ADOMD.NET and 9.0 OLE DB), I got the error: An existing connection was
    > forcibly closed by the remote host. I was able to connect once and only
    > once...frustration came after excitement. I have not been able to connect
    > since that one success. The full exception messge as the following:
    >
    > [SocketException (0x2746): An existing connection was forcibly closed by
    > the
    > remote host]
    > System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
    > size, SocketFlags socketFlags) +1043387
    > System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
    > size) +119
    >
    > [IOException: Unable to read data from the transport connection: An
    > existing
    > connection was forcibly closed by the remote host.]
    > System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32
    > size) +267
    > System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
    > +194
    > Microsoft.AnalysisServices.AdomdClient.DimeRecord.ForceRead(Stream
    > stream, Byte[] buffer, Int32 length) +35
    > Microsoft.AnalysisServices.AdomdClient.DimeRecord.ReadHeader() +37
    > Microsoft.AnalysisServices.AdomdClient.DimeRecord..ctor(Stream stream)
    > +100
    > Microsoft.AnalysisServices.AdomdClient.DimeReader.ReadRecord() +74
    > Microsoft.AnalysisServices.AdomdClient.TcpStream.GetResponseDataType()
    > +74
    >
    >
    >
    > I have to admit that I am new to both Analysis Services and ASP.NET, but I
    > was able to make it happen once. I even tried creating new page and even
    > project again, but no success. I suspect it has something to do with the
    > SQL server side, but I cannot figure out why. If I should be posting to
    > a
    > different group, please let me know. Please help!!
    >
    > Thanks in advance
    > YY
    >
    >




  3. Re: An existing connection was forcibly closed by the remote host

    Adrian,

    Thank you very much. That was exactly my problem.

    YY

    "Adrian Dumitrascu" wrote in message
    news:u7uAvmJ0HHA.1484@TK2MSFTNGP06.phx.gbl...
    > It seems that the account under which your asp code is running (in IIS)
    > doesn't have permissions to the AS2005.
    > Probably the account is the Anonymous account that IIS is using, you will
    > need to check the IIS settings.
    >
    > If this is the problem, it can be fixed by setting up IIS to require
    > authentication of its users and to impersonate them when running the code
    > that connects to AS2005. And on AS2005 you will create a database Role
    > with appropriate permissions for the users you want.
    >
    > For temporary testing (although you should not use this as the final
    > solution since it's not a good security), you can add the Anonymous
    > account (or the account that your IIS is using when running the asp code)
    > as a AS2005 server administrator (start SQL Management Studio, right click
    > on the AS2005 server -> Properties -> Security tab).
    >
    > Adrian
    >
    >
    > "Yan Yi Huang" wrote in message
    > news:eq8Kg5%23zHHA.3916@TK2MSFTNGP02.phx.gbl...
    >> Help needed!
    >>
    >> When trying to connect to 2005 Analysis Services from ASP page (using
    >> ADOMD.NET and 9.0 OLE DB), I got the error: An existing connection was
    >> forcibly closed by the remote host. I was able to connect once and only
    >> once...frustration came after excitement. I have not been able to
    >> connect
    >> since that one success. The full exception messge as the following:
    >>
    >> [SocketException (0x2746): An existing connection was forcibly closed by
    >> the
    >> remote host]
    >> System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
    >> size, SocketFlags socketFlags) +1043387
    >> System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
    >> Int32
    >> size) +119
    >>
    >> [IOException: Unable to read data from the transport connection: An
    >> existing
    >> connection was forcibly closed by the remote host.]
    >> System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
    >> Int32
    >> size) +267
    >> System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
    >> +194
    >> Microsoft.AnalysisServices.AdomdClient.DimeRecord.ForceRead(Stream
    >> stream, Byte[] buffer, Int32 length) +35
    >> Microsoft.AnalysisServices.AdomdClient.DimeRecord.ReadHeader() +37
    >> Microsoft.AnalysisServices.AdomdClient.DimeRecord..ctor(Stream stream)
    >> +100
    >> Microsoft.AnalysisServices.AdomdClient.DimeReader.ReadRecord() +74
    >> Microsoft.AnalysisServices.AdomdClient.TcpStream.GetResponseDataType()
    >> +74
    >>
    >>
    >>
    >> I have to admit that I am new to both Analysis Services and ASP.NET, but
    >> I
    >> was able to make it happen once. I even tried creating new page and even
    >> project again, but no success. I suspect it has something to do with the
    >> SQL server side, but I cannot figure out why. If I should be posting to
    >> a
    >> different group, please let me know. Please help!!
    >>
    >> Thanks in advance
    >> YY
    >>
    >>

    >
    >




+ Reply to Thread