开发者

How to bypass 403 forbidden exception when request use HTTPWEBREQUEST

开发者 https://www.devze.com 2023-04-13 00:14 出处:网络
How to bypass 403 forbidden ex开发者_StackOverflowception, when request is: HTTPWEBREQUEST try { } catch

How to bypass 403 forbidden ex开发者_StackOverflowception, when request is:

HTTPWEBREQUEST

try
{
} 
catch 
{ 
   // what do I write in here 
}


You can't "bypass" it - if the web server is tell you you're not allowed to get the data, you can't get the data. If you don't need that response then that's fine - handle the exception and keep going in whatever way you need to.

Alternatively, work out why you're getting that response, and perform whatever authentication you need in order to make a successful request. Without knowing anything about what you're trying to fetch, it's hard to suggest anything more concrete.

0

精彩评论

暂无评论...
验证码 换一张
取 消