Ask a Question related to ASP.NET Web Services, Design and Development.
-
bs #1
Web Service Call Using Digital Certificates
Hi,
I tried posting this to the microsoft.public.dotnet.framework.aspnet group
however I thought it might be more appropriate in this group.
I am currently having a problem calling a web service that is secured using
a digital certificate. I set up a Windows application to make a call to the
service and it works fine. However when I make a call from my ASP.NET page
it fails with "System.Net.WebException: The request failed with HTTP status
403: Forbidden". The code that I am using to make the call in both
instances is:
MyWebService myService = new MyWebService();
myService.ClientCertificates.Add(X509Certificate.C reateFromCertFile(@"C:\myC
ert.cer"));
myService.HelloWorld();
I think the problem may be related to permissions. The Windows application
runs using my account so I changed IIS to run as me as well. I have set
<identity impersonate="true"> in the web.config and I have checked using my
ASP.NET application that I am running under this account.
The Root CA certificate is installed under the "Current User" and the "Local
Computer" certificate stores and the client certificate is installed in both
these stores as well.
If anyone could help me solve this problem it would be great.
Ben
bs Guest
-
Error on call web service from asp.net whit certificates
Hello to all. I am developing a web site that must be connectedto of the web service on protocol https. has created a testapplication windows form... -
SSL / Web Service requring client certificates. No certificate server side...?
Hi all, I have the following scenario (XP / IIS 5, FX v1.1.4322) Both the client app and web service are running on my local development... -
digital certificates
Hi, Does anyone know a good book or site for using digital certificates with asp thanks jonathan -
Windows Certificates as Digital Signatures????
Is there a good reference for how to use windows certificates as the basis for an adobe digital signature. I have exported and imported just about... -
LWP using digital certificates
Can someone point me to docs on how to use LWP and digital certificates! Much appreciated. THANKS PR -
Durgaprasad Gorti[MSFT] #2
Re: Web Service Call Using Digital Certificates
If you are using 1.0 Version, there is a hotfix you could obtain through the
support services. Please see the following URL
[url]http://support.microsoft.com/default.aspx?scid=kb;en-us;817854[/url]
After applying the fix the system then looks for the certificate in
the machine store in addition to the ASP.NET User account certificate store.
One thing to make sure is that the ASP.NET account has access to the
machine certificate store.
"bs" <bens@no-spam-please.esd.nec.com.au> wrote in message
news:1085718892.231756@proxy.nec.com.au...using> Hi,
> I tried posting this to the microsoft.public.dotnet.framework.aspnet group
> however I thought it might be more appropriate in this group.
>
> I am currently having a problem calling a web service that is securedthe> a digital certificate. I set up a Windows application to make a call topage> service and it works fine. However when I make a call from my ASP.NETstatus> it fails with "System.Net.WebException: The request failed with HTTPmyService.ClientCertificates.Add(X509Certificate.C reateFromCertFile(@"C:\myC> 403: Forbidden". The code that I am using to make the call in both
> instances is:
> MyWebService myService = new MyWebService();
>
>application> ert.cer"));
>
> myService.HelloWorld();
>
> I think the problem may be related to permissions. The Windowsmy> runs using my account so I changed IIS to run as me as well. I have set
> <identity impersonate="true"> in the web.config and I have checked using"Local> ASP.NET application that I am running under this account.
>
> The Root CA certificate is installed under the "Current User" and theboth> Computer" certificate stores and the client certificate is installed in> these stores as well.
>
> If anyone could help me solve this problem it would be great.
>
> Ben
>
>
>
Durgaprasad Gorti[MSFT] Guest
-
bs #3
Re: Web Service Call Using Digital Certificates
Hi Durgaprasad,
As the knowledge base article you referred to only relates to version 1.0 of
the .NET Framework I decided to upgrade my machine to 1.1. After upgrading
I attempted access the web service again however I still get the same error.
The certificate is installed under the impersonated ASP.NET user account and
is installed in the "Certificates(Local Computer)" store. I am assuming
this is what you mean by the "machine certificate store". Unfortunately
still no luck.
Is it possible that this bug is still present in 1.1 of the framework?
Also, I don't understand why the ASP.NET application doesn't throw an
exception when it unsuccessfully attempts to access the certificate store.
Thanks
Ben
"Durgaprasad Gorti[MSFT]" <dgorti@online.microsoft.com> wrote in message
news:eOVnhDQREHA.3300@tk2msftngp13.phx.gbl...the> If you are using 1.0 Version, there is a hotfix you could obtain throughstore.> support services. Please see the following URL
> [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;817854[/url]
> After applying the fix the system then looks for the certificate in
> the machine store in addition to the ASP.NET User account certificategroup> One thing to make sure is that the ASP.NET account has access to the
> machine certificate store.
>
>
>
>
>
>
> "bs" <bens@no-spam-please.esd.nec.com.au> wrote in message
> news:1085718892.231756@proxy.nec.com.au...> > Hi,
> > I tried posting this to the microsoft.public.dotnet.framework.aspnetmyService.ClientCertificates.Add(X509Certificate.C reateFromCertFile(@"C:\myC> using> > however I thought it might be more appropriate in this group.
> >
> > I am currently having a problem calling a web service that is secured> the> > a digital certificate. I set up a Windows application to make a call to> page> > service and it works fine. However when I make a call from my ASP.NET> status> > it fails with "System.Net.WebException: The request failed with HTTP>> > 403: Forbidden". The code that I am using to make the call in both
> > instances is:
> > MyWebService myService = new MyWebService();
> >
> >> application> > ert.cer"));
> >
> > myService.HelloWorld();
> >
> > I think the problem may be related to permissions. The Windows> my> > runs using my account so I changed IIS to run as me as well. I have set
> > <identity impersonate="true"> in the web.config and I have checked using> "Local> > ASP.NET application that I am running under this account.
> >
> > The Root CA certificate is installed under the "Current User" and the> both> > Computer" certificate stores and the client certificate is installed in>> > these stores as well.
> >
> > If anyone could help me solve this problem it would be great.
> >
> > Ben
> >
> >
> >
>
bs Guest
-
bs #4
Re: Web Service Call Using Digital Certificates
I found the solution to this problem after escalating it to the Microsoft
Support Division. The problem was solved when I granted the ASPNET user
(Windows 2000) security privileges to the <drive>:\Documents and
Settings\ApplicationData\Microsoft\Crypto\RSA folder. I also discovered
that the certificate needs to be installed in the "Certificates (Local
Machine)\Personal\Certificates" store. You can access this store through
mmc, choose Console --> Add\Remove Snap-in --> Add --> Certificates -->
Computer Account --> Local Computer.
"Durgaprasad Gorti[MSFT]" <dgorti@online.microsoft.com> wrote in message
news:eOVnhDQREHA.3300@tk2msftngp13.phx.gbl...the> If you are using 1.0 Version, there is a hotfix you could obtain throughstore.> support services. Please see the following URL
> [url]http://support.microsoft.com/default.aspx?scid=kb;en-us;817854[/url]
> After applying the fix the system then looks for the certificate in
> the machine store in addition to the ASP.NET User account certificategroup> One thing to make sure is that the ASP.NET account has access to the
> machine certificate store.
>
>
>
>
>
>
> "bs" <bens@no-spam-please.esd.nec.com.au> wrote in message
> news:1085718892.231756@proxy.nec.com.au...> > Hi,
> > I tried posting this to the microsoft.public.dotnet.framework.aspnetmyService.ClientCertificates.Add(X509Certificate.C reateFromCertFile(@"C:\myC> using> > however I thought it might be more appropriate in this group.
> >
> > I am currently having a problem calling a web service that is secured> the> > a digital certificate. I set up a Windows application to make a call to> page> > service and it works fine. However when I make a call from my ASP.NET> status> > it fails with "System.Net.WebException: The request failed with HTTP>> > 403: Forbidden". The code that I am using to make the call in both
> > instances is:
> > MyWebService myService = new MyWebService();
> >
> >> application> > ert.cer"));
> >
> > myService.HelloWorld();
> >
> > I think the problem may be related to permissions. The Windows> my> > runs using my account so I changed IIS to run as me as well. I have set
> > <identity impersonate="true"> in the web.config and I have checked using> "Local> > ASP.NET application that I am running under this account.
> >
> > The Root CA certificate is installed under the "Current User" and the> both> > Computer" certificate stores and the client certificate is installed in>> > these stores as well.
> >
> > If anyone could help me solve this problem it would be great.
> >
> > Ben
> >
> >
> >
>
bs Guest
-
gardavis #5
Re: Web Service Call Using Digital Certificates
"bs" wrote:
Yes it is and the article mentions to use the June 2003 Hotfix Rollup to get the fix applied to 1.1.> Is it possible that this bug is still present in 1.1 of the framework?
[url]http://support.microsoft.com/default.aspx?kbid=821156[/url]
Unfortunately this did not solve my problem.
gardavis Guest



Reply With Quote

