Lys777
Lys777

Reputation: 456

COM Service Error: Received an unexpected EOF or 0 bytes from the transport stream

I have a .NET application that uses a 3rd party Web Service for authentication.

My code:

var sso = new com.myclient.auth.Service();
string userID = sso.DecryptUser(encryptedUserString, decryptionKey);

This has been working for quite some time. I've since been forced to convert the application from .NET 2.0 in VS 2008 to .NET 3.5 in VS 2010 and now it no longer works. I get an error at "DecryptUser": "Received an unexpected EOF or 0 bytes from the transport stream".

I don't see any changes made to this code during the conversion. I tried the much used solution for this error of forcing SecurityProtocolType.Ssl3 -- that did not work either. If I revert back to VS 2008 and build, the page works -- no error.

Upvotes: 0

Views: 525

Answers (1)

Lys777
Lys777

Reputation: 456

Okay -- I did a full file compare for the entire project, and found this change in Properties/Settings.Designer.cs that occurred during the VS conversion:

    public string MyProj_com_myclient_auth_Service {
        get {
            string urlSetting = System.Configuration.ConfigurationSettings.AppSettings["com.myclient.auth"];
            if (urlSetting != null)
            {
                return urlSetting.ToString();
            }
            else
            {
                return ((string)(this["MyProj_com_myclient_auth_Service"]));
            }
        }
    }

...was changed to:

    public string MyProj_com_myclient_auth_Service {
        get {
            return ((string)(this["MyProj_com_myclient_auth_Service"]));
        }
    }

I changed it back and it is working now in the new environment.

Upvotes: 0

Related Questions