Click here to Skip to main content
15,900,701 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

How to override the
WebRequest GetWebRequest(Uri uri)
method of a web request in an web application when calling a webservice

Updated 25-Feb-20 1:34am

1 solution

If some method of virtual, you can override it. :-)
Please see:[^].

I hope, there is nothing else to discuss.

Share this answer
Praveen_P 9-May-15 1:11am    
hi thanks for your solution , actually i am working on a web applictaion in which when i call a soap webservice more than once i am getting error "Request aborted request cancelled" .i can solve this error in a website by overriding WebRequest GetWebRequest(Uri uri) of reference.cs of that particular service but in the case of web application reference.cs is generated in ASP temporary file so i am not able to edit it , i need to set the keep alive property of http request to false to solve this error
Sergey Alexandrovich Kryukov 9-May-15 1:13am    
And what's the problem? This is not what you asked initially.
Praveen_P 9-May-15 2:35am    
plz check this question

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900