PC Review


Reply
Thread Tools Rate Thread

Set credentials to a web request

 
 
=?Utf-8?B?Tm9ubmll?=
Guest
Posts: n/a
 
      4th Apr 2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup: only administrator, no credentials request Rosivaldo Fernandes Alves Windows Vista General Discussion 3 9th Aug 2008 02:45 PM
Task Request - Restricted Permission - Verify Credentials creee8@gmail.com Microsoft Outlook Discussion 0 23rd Feb 2007 07:08 PM
Credentials missing in reply from ADS if 2nd request within 5 seconds Olli Plough Microsoft Windows 2000 Active Directory 2 18th Jan 2007 11:04 AM
Problem with ReportingService.Credentials - Syste.Net.WebException - "The request failed with HTTP status 401: Unauthorized." Shree Microsoft ASP .NET 0 2nd Sep 2006 09:33 PM
credentials supplied conflict w/ existing credentials Melanie Microsoft Windows 2000 Networking 4 22nd Jul 2004 07:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 PM.