Home All Groups Group Topic Archive Search About

Security problem while accessing web page with web request within windows .net control

Author
7 Mar 2005 7:14 PM
krp k via .NET 247
I have created windows control. This control I have included with Object tag in web page. It works in IE.
Within control I am accesing aspx pages from same server. Parent page which has this control is authonticated.

I am using windows authontication for web application.

When I run my site in Internet zone. I got security exception.
I have used webrequest to call aspx page.
Page which has control got authonticated with integrated windows authontication.

Code in control-
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sUrl + sASPXPagename);
req.Credentials = CredentialCache.DefaultCredentials;

I got problem at last list, due to .net security permisions at client CredentialCache.DefaultCredentials; could not read environment variable. It works fine in local intranet zone.

Is there any way to execute webrequest from control in internet zone without doing any security setting at client .net framework.


Thanks in advance.

--------------------------------
From: krp k

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Y30+Egt/2k+H/z5WOJLdMQ==</Id>