407 Proxy Authentication Required

前端 未结 7 690
我在风中等你
我在风中等你 2020-12-06 22:46

I am working on a website, in which I am retrieving XML data from an external URL, using the following code

WebRequest req = WebRequest.Create(\"External se         


        
7条回答
  •  日久生厌
    2020-12-06 23:32

    This is probably caused by the account that IIS is running under not having the appropriate permissions to get through the authenticating proxy.

    When you run it on your development PC, you are running it as your logon, which I assume has permissions to get through the proxy. When running inside IIS, it is not running as you, and so probably cannot get through the proxy.

    You could either give the IIS user permissions to get through the proxy (which will be unlikely to work in a domain environment as the IIS user will be a local user the machine), or configure your application to run as a network user with permissions to get through the proxy.

    This can be done by either getting IIS to run as a domain user (I wouldn't recommend this approach), or by configuring you application to run as a domain user using web.config (see this article for more info on how to do this).

提交回复
热议问题