0

I am trying to connect with a couchbase instance hosted in Azure Kubernetis Cluster. My company network uses a corporate proxy to connect to external network(internet). So we have always configures system proxy in our machines. In Visual Studio when I execute the code in IISEXPRESS the connection call to couchbase timesout because the IISExpress is not using the system proxy I guess. This same issue was also happening for npm once but after I setup npm proxy everything works fine. Now I need a solution for iisexpress. Any help is appreciated. Thanks in advance.

Matthew Groves
  • 25,181
  • 9
  • 71
  • 121
Tony
  • 89
  • 1
  • 3

1 Answers1

1

As far as I know, you could add proxy setting in your visual studio application's web.config file to use proxy to access the another server. If you set this setting the IIS express will use the proxy setting.

Details, you could refer to this document and example codes:

<configuration>  
  <system.net>  
    <defaultProxy>  
      <proxy  
        usesystemdefault="true"  
        proxyaddress="http://192.168.1.10:3128"  
        bypassonlocal="true"  
      />  
    </defaultProxy>  
  </system.net>  
</configuration>  
Brando Zhang
  • 22,586
  • 6
  • 37
  • 65
  • Can you add an example to include proxy username and password for the proxy settings please. – Tony Nov 27 '19 at 07:42
  • As far as I know, we couldn't directly include proxy username and password for the proxy settings in the web.config. We should create a dll and then use it in the web.config. Details, you could refer to this [answer](https://stackoverflow.com/a/194414/7609093). – Brando Zhang Nov 28 '19 at 05:18