Server.Transfer exception

  • Thread starter Thread starter Mathana Gopalan
  • Start date Start date
M

Mathana Gopalan

Hello,

We are using Server.Transfer method to navigate from one page to
another(beacause we need to send some values from source to destination
page). It's working fine but after Server.Transfer method, the system throws
an exception of ThreadAbortException and logs the same to event log of the
server. So the event log is accumulated with these errors.

Can anybody help me to overcome this problem.

Thanks in advance
Mathana Gopalan.C
 
Hi,

You are probably calling Server.Transfer within a try-catch block. This
method will call End which will raise the ThreadAbortException (this is by
design), which causes it to be caught by your catch block.

Move the call to Server.Transfer outside the try-catch block to prevent this
from happening.

HTH,
Rakesh Rajan
 

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

Back
Top