Passing security credentials to ASP from .net
From: Raj (anonymous_at_discussions.microsoft.com)
Date: 02/23/04
- Next message: Yan-Hong Huang[MSFT]: "RE: 80004005 error"
- Previous message: Chipmunk: "Security issues relating to submitting href links and text:"
- Next in thread: Andrea D'Onofrio [MSFT]: "Re: Passing security credentials to ASP from .net"
- Reply: Andrea D'Onofrio [MSFT]: "Re: Passing security credentials to ASP from .net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 22 Feb 2004 16:36:06 -0800
Hi All,
Here's my situation. I have a ASP page which requires windows authentication. The page works fine when I access it from IE and I am able to login succesfully.
Now I am writing some .NET code to access the page. I pass in some data for the form. I always get a 401 error. I am looking for some pointers/sample code that tells me how I can pass windows login credentials to my ASP page. I did try NetworkCredentials but that fails. Below Is my code.
WebClient wc = new WebClient();
NameValueCollection nvc = new NameValueCollection();
nvc.Add("cmdSubmit","send");
nvc.Add("txtMsgText","Test Message");
byte[] buffer;
buffer = wc.UploadValues(uri,"POST",nvc);
string streamReader;
streamReader = System.Text.Encoding.Default.GetString(buffer);
Help will be appreciated
Thanks
Raj
- Next message: Yan-Hong Huang[MSFT]: "RE: 80004005 error"
- Previous message: Chipmunk: "Security issues relating to submitting href links and text:"
- Next in thread: Andrea D'Onofrio [MSFT]: "Re: Passing security credentials to ASP from .net"
- Reply: Andrea D'Onofrio [MSFT]: "Re: Passing security credentials to ASP from .net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|