Re: Passing security credentials to ASP from .net
From: Andrea D'Onofrio [MSFT] (andreado_at_online.microsoft.com)
Date: 02/23/04
- Next message: Patrick Steele [MVP]: "Re: How can I tell waht permissions an assembly requires?"
- Previous message: jib: "Re: WEB.CONFIG ISSUE"
- In reply to: Raj: "Passing security credentials to ASP from .net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 23 Feb 2004 18:03:59 +0100
You can pass the credential (user name and password) in the HTTP request.
Check this article:
314404 HOWTO: Use Kerberos with the ServerXMLHTTP Component in MSXML
http://support.microsoft.com/?id=314404
HtH,
Andrea
--
This posting is provided "AS IS" with no warranties, and confers no rights.z
"Raj" <anonymous@discussions.microsoft.com> wrote in message
news:D81C40BD-0130-4DA7-8A88-1B48638285E3@microsoft.com...
> 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: Patrick Steele [MVP]: "Re: How can I tell waht permissions an assembly requires?"
- Previous message: jib: "Re: WEB.CONFIG ISSUE"
- In reply to: Raj: "Passing security credentials to ASP from .net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]