Request web server excaption

S

SushiSean

Hello. I have problem when I call web service.
Code looks like this
try
{
PayCaptureResponse resp = cc.requestServiceRequest(pc);
}
catch (Exception ex)
{
Response.Write("Exception " + ex.Message);
return;
}

Sometimes it works but sometimes I get excaption
"Exception The underlying connection was closed: A connection that was
expected to be kept alive was closed by the server."

What I should do here? Run this request again? What the most smart way
handle this?
 
J

John Saunders [MVP]

SushiSean said:
Hello. I have problem when I call web service.
Code looks like this
try
{
PayCaptureResponse resp = cc.requestServiceRequest(pc);
}
catch (Exception ex)
{
Response.Write("Exception " + ex.Message);
return;
}

Sometimes it works but sometimes I get excaption
"Exception The underlying connection was closed: A connection that was
expected to be kept alive was closed by the server."

What I should do here? Run this request again? What the most smart way
handle this?

You should find out why the connection is being closed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top