Talal,
I did this for a similar problem:
public class MyWseProxy : GeneratedWseProxy
{
protected override GetWebRequest(Uri uri)
{
HttpWebRequest httpRequest = request as HttpWebRequest;
if (null != httpRequest)
{
httpRequest.KeepAlive = false;
}
}
}
You could probably do:
public partial GenerateWseProxy
{
.. as above
}
Regards
Phil Lee
> Hi all,
>
[quoted text clipped - 27 lines]
> Thanks for your help,
> Talal
Talal Sultan - 10 Dec 2007 09:18 GMT
Hi Phil,
Thanks for the tip. I have implemented your solution with a few
modifications:
The code you have sent does not compile, I replaced it with the following:
public class MyServiceWse : ServiceWse
{
protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
HttpWebRequest webRequest = (HttpWebRequest)base.GetWebRequest(uri);
webRequest.KeepAlive = false;
webRequest.ProtocolVersion = HttpVersion.Version10;
return webRequest;
}
}
Also, the second method you suggested (with the partial class) did not work
either.
Now everything compiles well and I have tested it locally, the "new" web
service proxy works just fine. I still need to publish the solution to the
testing server, that's where I was getting the connection problems. I'll let
you know how it goes.
Thanks again,
Talal
> Talal,
>
[quoted text clipped - 54 lines]
>> Thanks for your help,
>> Talal
Phil Lee - 10 Dec 2007 10:21 GMT
Talal,
I'm glad to hear it worked. I was just about to post some modified code. I
realized I missed out 'WebRequest request=base.GetWebRequest(uri)'/
Phil
> Hi Phil,
>
[quoted text clipped - 92 lines]
>>> Thanks for your help,
>>> Talal
Talal Sultan - 11 Dec 2007 17:42 GMT
Phil, sorry to bother you again, I am still getting this error (in the
subject line.)
At first we thought it was solved but then the page kept on hanging with no
response. That was the exact behavior I got when I unchecked the keep-alive
from IIS.
So I tried setting the http protocol to 1.0 without putting to false the
keep-alive. Still I had the same hang behavior.
I thought the problem was with the upload itself, so we have downloaded the
trial version of Telerik RAD controls. The upload works fine but then
suddenly we have the connection closed thing again.
Could it be possible that the problem comes from WSE? It is really weird. I
have set the Timeout property of the wse proxy to a high value, but still
same error.
Any ideas? I really appreciate the help :)
Thanks,
Talal
> Talal,
>
[quoted text clipped - 54 lines]
>> Thanks for your help,
>> Talal
Phil Lee - 13 Dec 2007 09:20 GMT
Talal,
I don't think I can help. I know we used to get that error intermittently,
but we don't use file upload.
Phil
> Phil, sorry to bother you again, I am still getting this error (in the
> subject line.)
[quoted text clipped - 76 lines]
>>> Thanks for your help,
>>> Talal