locked
my website on IIS7 can't request remote website via webclient ! RRS feed

  • Question

  • User1186939384 posted

    hi ,

     I use webclient to request a remote website like "www.bind.com", my IE have set a proxy !

     the question is , when i'm debugging with vs2010 it work without setting the Proxy like

    "webClient.Proxy=new Proxy("192.168.18.16:3128)"

    but when I deploy it on IIS7, it always can't connect to the remote server !

     It have to set the Webclient.Proxy  in code !

    "localhost:55026/test.aspx"  work! (asp.net development server)

    "localhost/test/test.aspx"  didn't work ! (iis7) 

    can someone tell me why and how to fix it  without set the proxy in code?

    thanks for your reply !

    Thursday, February 21, 2013 11:08 PM

Answers

  • User477186420 posted

    When you run using development server , it will use default proxy which you set into the browser that's why it will work when you are running throw IIS it wil not access your web proxy you have to set the proxy details.

    You can set proxy using code behide file as wel as web.config file. when you are going for LIVE (ONLINE Web server) you need to remove the proxy code because there is no proxy in live server, all url will be accessible from the server without proxy

    let me know if any query

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 22, 2013 3:31 AM

All replies

  • User477186420 posted

    When you run using development server , it will use default proxy which you set into the browser that's why it will work when you are running throw IIS it wil not access your web proxy you have to set the proxy details.

    You can set proxy using code behide file as wel as web.config file. when you are going for LIVE (ONLINE Web server) you need to remove the proxy code because there is no proxy in live server, all url will be accessible from the server without proxy

    let me know if any query

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 22, 2013 3:31 AM
  • User1186939384 posted

    thank you very much !

    Friday, February 22, 2013 3:57 AM
  • User1454571192 posted

    Hi,

    My web-application will play live stream from IP camera via proxy. When I deploy to iis and request to server from my own PC, I won't be able to play the stream at all. I am just wondering that how I can play the stream when I request to IIS server without proxy.

    thank you very much.

    Monday, July 1, 2013 9:48 PM