Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add service reference
Message
De
25/10/2012 09:14:26
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Cryptographie
Versions des environnements
Environment:
C# 5.0
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MySQL
Application:
Web Service
Divers
Thread ID:
01555580
Message ID:
01555775
Vues:
24
>>>>>Hello,
>>>>>
>>>>>I need to add a service reference from a client, which requests a certificate to be installed on our computer.
>>>>>When I go to the service location using Internet Explorer, it asks me to select the certificate, and after doing so, the WSDL file shows.
>>>>>
>>>>>However when I try to add the service reference to the .NET project, it gives the following error message:
>>>>>
>>>>>The HTTP request was forbidden with client authentication scheme 'Anonymous'
>>>>>
>>>>>
>>>>>I can't find a way to link the certificate to the project so it allows me to add the service reference.
>>>>
>>>>You need to specify the credentials for the endpoint in the .config file.
>>>>See: .http://msdn.microsoft.com/en-us/library/ff648360.aspx
>>>
>>>Thanks, this documentation seems to be similar as to what I am looking for, but after "Create a Test Client", under Add a WCF Service Reference to the Client, that is where it fails for me already, because the service cannot be added, the "HTTP request was forbidden" messages appears at that time. So I can't configure the service, because it never gets added. I have the feeling that I somehow need to tell the project which keys to use, but I can't find how to do this.
>>
>>Ah. I see. When I use 'add a service reference' to a uri that requires credentials I get prompted to provide them - at least for those requiring Windows authentication. Don't have access to a uri requiring certificates but I would have hoped that would be the same. What version of VS are you using?
>>
>>You could try saving the wsdl from IE and using SvcUtil.exe against it but it may be that it needs to import additional namespace info from the server which would fail.....
>
>I use VS 2010. You are correct, when I try to save the WSDL file and use that on a local folder, it gives me this error:
>
>The document was understood, but it could not be processed.
>  - The WSDL document contains links that could not be resolved.
>  - There was an error downloading 'https://covprodservice.uoazv-portaal.aw/vz3738PortType.svc?xsd=xsd0'.
>  - The request failed with HTTP status 403: Forbidden.
>If the service is defined in the current solution, try building the solution and adding the service reference again.
>
>
>I also think there is something missing because when I install the certificate in the local store, it still asks me in IE each time I browse to the service to select the certificate. I guess once the certificate would be properly installed it should not ask me anymore? In that case maybe VS will also get a hold of the certificate.

Googled a couple of possibilities using svcutil:

http://social.msdn.microsoft.com/forums/en-US/wcf/thread/87e58f24-1709-476d-9673-e48698c2d391/
(See the config section about half way down - this might work with VS as well ?)

Sneaky one using Fiddler in the middle:
http://proq.blogspot.co.uk/2012/02/svcutil-and-https.html
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform