473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

C# fails to connect to IIS Web Service if we require both Client Certificate and Username/Password

Hi,
We are trying to add a Client Certificate support for our web app that
emulates a hardware device web app.

The hardware uses a 2 factors authentication, which requires a Web
Service client to send: Client Certificate and Username / password.

We are using a Web Service provider which uses IIS 5.1 as HTTP server.
IIS is set to require client certificate and Basic Authentication.

Basically the client does:

System.Net.CredentialCache cache = new System.Net.CredentialCache();

cache.Add( new Uri(service.Url), "Basic", new
System.Net.NetworkCredential(username, userpass));

service.Credentials = cache;

....

hCertCntxt=WinCapi.CertFindCertificateInStore(hSys Store,
MY_ENCODING_TYPE,0, CERT_FIND_SUBJECT_STR,

lpszCertSubject , IntPtr.Zero) ;

X509Certificate foundcert = new X509Certificate(hCertCntxt);

service.ClientCertificates.Add(foundcert);

-Our problem

The execution of the Web Service client fails on timeout.

If we change the IIS setting to require client certificate without
Basic Authentication and with anonymous access it works fine.

If we change the IIS setting to require Basic Authentication but
without client certificate it works fine.

The same the Web Service client works fine with another implementation
of the Web Server which uses Allegro as its HTTP server. And IIS works
fine with a test app written in c++ using gSOAP

My Question

What do we need to do to make the C# client work with the IIS?
Thanks
Joey

Nov 17 '05 #1
0 2404

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tim Burris | last post by:
At the top here i will put a quick description of my problem followed by the long description. This way you want get bored reading! : short version what is the best/recommended way for ASPNET...
6
by: John | last post by:
Hi How can I make sure that no one else can call and receive data from my web methods? Thanks Regards
2
by: Naeem Sarfraz | last post by:
Any advice for the following situation? I've deployed my webservice on a remote server, e.g. http://mywebservice.co.uk/summary.asmx. The windows clients attempts to access this webservice and...
6
by: Kenneth Moss | last post by:
I have a web service I am calling which I made. I am consuming this service from another domain (and I've tried from a windows app also). I added a certificate to the web service so it will use...
7
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
2
by: =?Utf-8?B?Sm9obiBC?= | last post by:
A windows forms 2.0 ClickOnce deployment fails when both SSL is enabled and "require client certificate" enabled on the IIS deployment web server. Can anyone assist with how to configure this...
4
by: =?Utf-8?B?Qm9i?= | last post by:
I have a 1.1 framework VB.NET web service that is being called my multiple clients. How can I determine the name of the client app that is calling the web service at runtime from the web method? ...
0
by: =?Utf-8?B?RVNQTlNUSQ==?= | last post by:
Hi, I'm working on a Web application that consumes a WCF Service that uses basic HTTP binding with transport security and certificates for client credentials. Just to clarify, the WebServer (IIS...
3
by: Anil S | last post by:
Hello, my application is console application and I have created "Service Reference" of the webservices. this webservice uses username and password. my code are following: myArray nl; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.