Re: ASP.NET / certificat
From: Jerome (Jerome_at_discussions.microsoft.com)
Date: 01/31/05
- Next message: hoz: "how to protect web server against SQL Injection ?"
- Previous message: Jim Foye: "Re: Cookie not persisted w/o call to GetRedirectUrl()"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: ASP.NET / certificat"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 31 Jan 2005 01:51:02 -0800
Thanks for your answer
Yes, the client certificat is install in user's certificate store
(mmc -> Certificates (local computer) -> Personal -> Certificates)
Everthing works fine when I use a .NET Windows form application
a another idea?
"Joe Kaplan (MVP - ADSI)" wrote:
> This sounds like the standard problem of not being able to access the
> private key for the certificate from the current process. This is probably
> a result of it being installed in the user's certificate store. Have you
> tried installing it in the machine store?
>
> Joe K.
>
> "Jerome" <Jerome@discussions.microsoft.com> wrote in message
> news:D0E2FEEA-7724-4A29-B4D9-6186232DD8FE@microsoft.com...
> > Hi all
> >
> > I'm trying to access to a virtual directory (web server is a IIS 6.0 on
> > Windows 2003 server) which requires client
> > certificate with HttpWebRequest class.
> > Simplified function code looks like this:
> >
> > HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
> > httpWebRequest.ClientCertificates.Add(X509Certificate.CreateFromCertFile(@"c:\dada.cer"));
> > httpWebRequest.Method = "POST";
> > httpWebRequest.ContentLength = requestData.Length;
> > Stream streamWriter = (httpWebRequest.GetRequestStream());
> > streamWriter.Write(requestData,0,requestData.Length);
> > streamWriter.Flush();
> > streamWriter.Close();
> > HttpWebResponse httpWebResponse =
> > (HttpWebResponse)httpWebRequest.GetResponse();
> > StreamReader streamReader = new
> > StreamReader(httpWebResponse.GetResponseStream());
> >
> > When I tried this function in .NET Windows form
> > application (C#) it works OK. But if I try to call the same
> > function inside .NET ASP application (IIS 5.1 on Windows XP pro) I get
> > Exception "The
> > remote server returned an error: (403) Forbidden." when I trying to get
> > response
> > (line: HttpWebResponse httpWebResponse =
> > (HttpWebResponse)httpWebRequest.GetResponse();)
> >
> > How can I do to configure my environment to allow ASP.NET application
> > access
> > my virtual directory
> > Thanks,
> > Jerome
>
>
>
- Next message: hoz: "how to protect web server against SQL Injection ?"
- Previous message: Jim Foye: "Re: Cookie not persisted w/o call to GetRedirectUrl()"
- In reply to: Joe Kaplan \(MVP - ADSI\): "Re: ASP.NET / certificat"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|