Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Web Server and Proxy
pierre
#1 Posted : Wednesday, February 2, 2011 5:45:01 AM(UTC)
Groups: Member
Joined: 2/2/2011(UTC)
Posts: 1
Location: France

Hi,

I have a windows .Net application coded in C# that use a WebBrowser component to display aspx pages from a local CassiniWebServer.
Both my application and asp.Net web site call web services from a distant web server but only the application manage to consume them trow a proxy.
My app.exe.config file contains the following :
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy />
<bypasslist />
<module />
</defaultProxy>
</system.net>

I have tried the same in the web.config file of the local web site, doing :
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy/>
<bypasslist/>
<module/>
</defaultProxy>
</system.net>
or
<system.net>
<defaultProxy>
<proxy usesystemdefault="True" bypassonlocal="False" />
</defaultProxy>
</system.net>
but my aspx pages never manage to connect the distant web service.

Has somone already benn facing the same kind of problems, and if yes, is there a solution ?

Thanks in advance for any help.

Pierre
Pierre
Ultidev Team
#2 Posted : Wednesday, February 2, 2011 7:48:18 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hello, Pierre.

If you use default proxy and configure it through Internet Explorer (WinInet) proxy properties, then these settings are user-specific and therefore not accessible to windows services running under their own security contexts. For example, UltiDev Cassini (and your application) runs as Local System user and has no access to your personal proxy settings. To use http proxy in service-hosted applications one should either change proxy configuration to have address and credentials in the config file, or use WebProxy class as attach it to outgoing http requests. This behavior is not Cassini-specific. If your web application should make web service calls only when a user is logged in to the computer, you may consider moving the web service call functionality into .NET ServicedComponent that would be hosted by a COM+ worker process under "interactive user" account - then code calling web services will have same security context as logged in user and should have access to default WinInet proxy settings.

Please let us know if this information was helpful.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (5)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.