Sunday, February 26, 2006

The underlying connection was closed: An unexpected error occurred on a receive. (Web Service)

We had a web service which was working without any problem for few months and suddenly last week it started to give the above mentioned error. Even though I found some similar threads on the web, nothing helped me to solve the problem.

After few hours of R&D I found a workable solution! Overriding the web service's proxy class fixed the error where I’ve created a new HttpWebRequest.

protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
//Get a new HttpWebRequest
System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(uri);
webRequest.KeepAlive = false;
return webRequest;
}

Labels: , ,

Where am I Now?

For last couple of months I was very busy with my new job (if you are not aware, currently I’m in Singapore and working for Sonopress Pvt Ltd) and couldn’t concentrate on maintain my blog as well as MCMS Manager.

Now I’m somewhat settled and also playing Lead role ;). I should thank Ananth (my lead) for recognizing me within this short period of time and recommending my name for the above mentioned position!

I’m sure that I’ll start my routine work very soon… (Surely there will be a release on MCMS Manager within couple of weeks!).

Labels: