This project has moved. For the latest updates, please go here.

Proxy Authentication on localhost but not through Visual Studio

Topics: Developer Forum, User Forum
Jan 15, 2008 at 7:09 PM
Edited Jan 16, 2008 at 1:43 PM
I have an rssdatasource populating a datalist. When I run it through Visual Studio (F5), everything works. The url is http://localhost:1629/mysite/rss.aspx as its run from Visual Studio.

However, when I go directly to http://localhost/mysite/rss.aspx, I get the following error:
Exception Details: System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.

I have altered my web.config as shown below:
<location path="rss.aspx">
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy proxyaddress="http://myproxy:8080" bypassonlocal="True" />
</defaultProxy>
</system.net>
</location>

Any ideas why it would work from Visual Studio but gives me the error every other time?

Thanks

Tim
Jan 21, 2008 at 2:39 PM
Issue has been resolved. I added <identity impersonate="true" /> in my web config and it now works on my localhost.

I still don't know why it worked when running through Visual Studio. My only guess is that Visual Studio uses the logged in user for permissions where IIS uses ASPNet user account by default.

Tim


TimDotNet wrote:
I have an rssdatasource populating a datalist. When I run it through Visual Studio (F5), everything works. The url is http://localhost:1629/mysite/rss.aspx as its run from Visual Studio.

However, when I go directly to http://localhost/mysite/rss.aspx, I get the following error:
Exception Details: System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.

I have altered my web.config as shown below:
<location path="rss.aspx">
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy proxyaddress="http://myproxy:8080" bypassonlocal="True" />
</defaultProxy>
</system.net>
</location>

Any ideas why it would work from Visual Studio but gives me the error every other time?

Thanks

Tim