Hello, just a quick question, im trying to log on to a page within our intranet that uses Windows Authentication to work out the current user and allows them into the system, (ASP.NET 1.1) I can't get my HTTPWebRequest to authenticate it's just booting me out any ideas? im setting the .Credentials to be the username extracted from User.Identity.Name but it's not enough. Below is the code.
(u) is a URI Object
Ideally I'd like to mimic the Request so the server thinks it's an IE windowVB Code:
Dim wRequest As HttpWebRequest = HttpWebRequest.CreateDefault(u) wRequest.Credentials = Profile.GetCredential(Nothing, "") wRequest.PreAuthenticate = True wRequest.UnsafeAuthenticatedConnectionSharing = True wRequest.UserAgent = " Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" Dim wResponse As HttpWebResponse wResponse = wRequest.GetResponse
Thanking in adv
Sam





Reply With Quote