PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework
Set credentials to a web request
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework
Set credentials to a web request
![]() |
Set credentials to a web request |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I'm trying to run an automated test (using NTime tool) on a web application (windows authentication). All calls in this web app are intercepted by a custom httpModule. I'm setting credentials to the web request so that the authentication passes but this doesn't seem to work: NetworkCredential obj = new NetworkCredential(); obj.UserName = @"domain\username"; obj.Password = "test123"; HttpWebRequest myRequest = (HttpWebRequest) HttpWebRequest.Create("https://testsite.com/testapp/samplepage.aspx"); myRequest.Credentials = obj; Please suggest the solution. Thanks |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

