Link to home
Create AccountLog in
Avatar of vikalgupta
vikalguptaFlag for India

asked on

RE : Web exception Issue while calling web service

Hi,

We are calling SMS vendor API which is recieving XML through get method. Its working fine but suddenly we encounter error as below

The server committed a protocol violation. Section=ResponseStatusLine

We are calling their web service through Window service. below is the code for calling
WebRequest request = WebRequest.Create(smsURL);
WebResponse ws = request.GetResponse();

Please help to let me know how to resolve the issue.
ASKER CERTIFIED SOLUTION
Avatar of jagssidurala
jagssidurala
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Aaron Jabamani
Try keepalive property to false and try. More details in the link, http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.keepalive.aspx
Avatar of vikalgupta

ASKER

Thanks