Why are the System.Net.CredentialCache.DefaultCredentials always empty in and ASP application?

C

Craig

We have an anonymous web application trying to talk to a windows
authenticated webservice. This is currently failing with 401 Access Denied
errors.

We have found that we can get this to work by writing the following code in
the web application before calling the webservice:

WebServiceInstance.Credentials = new NetworkCredential("username",
"password","domain");


We don't want to have to do this because it means having to retrieve the
username and password again.

When searching for an answer, the following line constantly appears as the
correct solution:

WebServiceInstance.Credentials = CredentialCache.DefaultCredentials;


Unfortunatley the DefaultCredentials are empty. Why is this? We were
originally thinking (informed by a Microsoft Document) that because both
IIS machines have the same ASPNET account and password the Windows
authentication on the webservice side would be satisfied, but this doesn't
seem to be the case.

Please help we've been trying to get this working for almost 3 days now...

Thanks,
Craig
 
Joined
Oct 3, 2007
Messages
2
Reaction score
0
Did you find a solution to this problem?

I am facing the same problem and cannot figure out why the default credentials are emppty..Did you manage to find a solution?

Can you help if you have solved this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top