private void Page_Load(object sender, System.EventArgs e) { Westwind.InternetTools.wwHttp Http = new wwHttp(); Http.CreateWebRequestObject("http://www.west-wind.com/wwstore/admin/default.aspx"); // *** This picks up the current login Http.WebRequest.Credentials = System.Net.CredentialCache.DefaultCredentials; string Result = Http.GetUrl("http://www.west-wind.com/wwstore/admin/default.aspx"); Response.Write("System Username:" + Environment.UserName); Response.Write("Auth Username: " + User.Identity.Name); if (Http.Error) Response.Write("ERROR: " + Http.ErrorMessage); else Response.Write(Result); Response.End(); }where the url I'm hitting is protected by Windows Authentication.
<location path="demos"> <system.web> <identity impersonate="true" /> <!-- WS: Allow only Authenticated users --> <authorization> <!-- allow users="*" /--> <deny users="?" /> </authorization> </system.web> </location>With the Config file you don't even need to set any directory permissions, unless you also need to protect files not handled by ASP.NET.