How To Enable Proxy For Web API?

Today we are implementing exceptionally straightforward case of how to pass application via proxy server and enable, disable any URL. How proxy server works is shown below:-
 
 
 
Its very easy and simple way to enable proxy inside ASP.Net Application.
 
Add element inside web.config file. 
  1. <system.net>  
  2. <defaultProxy>  
  3. <proxy proxyaddress="server IP:Port number" usesystemdefault="true" bypassonlocal="true"/>  
  4. <bypasslist>  
  5. <add address="IP address or URL with port" />  
  6. <add address="IP Address or URL with port" />  
  7. </bypasslist>  
  8. </defaultProxy>  
  9. </system.net>  
Description
  1. If you want use default proxy in application then no need to add proxy IP address.
  2. But if you want use custom IP address then you've to add IP address with port number inside web.config file.
  3. And if you want bypass any particular web URL or IP then you need to add bypasslist element inside defaultproxy element.
Next Recommended Reading Web API Self-Hosting