473,480 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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


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

Nov 17 '05 #1
0 2565

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

Similar topics

3
9078
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in...
0
8259
by: Steve Ng | last post by:
Hello, I have a windows form application that needs to pass through a proxy to get access to the internet. As a test, I have successfully hardcoded my login/password/domain combination and been...
0
1379
by: JOS | last post by:
Hi, I have a web application with the following in the web.config file 1 <authentication mode="Windows" /> 2 <identity impersonate="true" /> My IIS settings are shown below ...
0
1506
by: ndskim | last post by:
Currently I have the Web Services Proxy code generated by the WSDL.Exe command line. My Web app consists of ASP.NET in VB 2005 version. Here is what I have in the sample code: ' Set Proxy...
0
1305
by: Joerg Lueders | last post by:
Hi, I created simple code to get information from a Web Service. I need to pass credentials for the Web Service as well as for the Proxy Server (static address). This works fine as long as...
11
20209
by: ckb | last post by:
Hi, I have an active x ctrl on my page and using asp.net I i have built a web page that has a web service named e1.I am using CreateSessionImpersonated() but it does not Impersonate and every time...
3
3924
by: richard.martino | last post by:
On Jun 18, 12:57 pm, "Joe Kaplan" <joseph.e.kap...@removethis.accenture.comwrote: ----------------------- Because when I execute: sendmailproxy.SendEmailRequest(sendmail);
3
1888
sid0404
by: sid0404 | last post by:
Hi I am new to the programming in c#, I have an application where I need to get data from a website now I am getting an error message if I give the input as two strings, say Sun Microsystems while...
5
8276
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
7054
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
7102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7003
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
5357
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4798
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...
0
4495
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3008
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
570
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.