473,385 Members | 1,387 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,385 software developers and data experts.

401 Access Denied on web service call

Here's the setup:

Windows 2003 running .net 1.1 webservice with Integrated Authentication set.
Client machine running .net 1.1 on xp pro with latest service packs and
updates.

User also has Solomon 6.0, Microsoft Office Basic and Microsoft Office
Profesional, Acrobat reader, Adobe Acrobat. Otherwise, is a standard
machine setup from Dell.

Here's the problem:

When THIS user logs onto THIS machine, no matter what we do, the credentials
never seem to be passed to the webservice, so the service always fails.
When the user logs onto another machine, the application works as expected.
35 other users also use the application with no problems. When other users
log onto this machine, the application works without a problem.

One other user has Solomon 6.0 installed, and he is able to use the
application. The user can log onto the web service using Internet Explorer
and authenticate without a problem.

We've done the knowledge base suggestions and even went so far as to attempt
prompting of login credentials, but nothing seems to work. The
TestConnection method always returns true and is just there to see if we can
hit the web service, but it always fails.

What am I missing?

Here's the code (there's extra code related to the attempt at passing user
specified credentials):

public static CustomerManagerWebService.CustomerManagerWebServic e Service
{
get
{
if (log.IsDebugEnabled)
{
log.Debug("Trying to get the customer manager web service.");
}
CustomerManagerWebService.CustomerManagerWebServic e web=new
Snowball.Crm.BusinessManager.CustomerManagerWebSer vice.CustomerManagerWebService();
if (m_credSet)
{
if (log.IsDebugEnabled)
{
log.Debug("Credentials have been set the cache");
}
web.Credentials=m_cred;
}
else
{

web.Credentials=CredentialCache.DefaultCredentials ;
if (log.IsDebugEnabled)
{
log.Debug("Using default credentials");
}
}
if (log.IsDebugEnabled)
{
log.Debug("Setting web options.");
}
web.PreAuthenticate=true;
web.UnsafeAuthenticatedConnectionSharing=true;
web.UserAgent="BusinessManager.dll";
try
{
if (log.IsDebugEnabled)
{
log.Debug("Trying test connection.");
}
web.TestConnection();
}
catch (System.Exception ex)
{
if (log.IsDebugEnabled)
{
log.Debug("Authentication failed. Failure report follows:");
}
string message="Failed to connect to the web service for " +
System.Environment.UserName;
log.Error(message,ex);

throw new AuthenticationFailedException(message,ex);

}
return web;
}
}

Robert
Apr 7 '06 #1
3 2252
Hi Robert,

If other users can logon to the problematic machine and properly use the
application calling the web service, looks like the issue isn't in your
application or machine specific but is most likely specific to the user
credential. My suggestion is that you may create a new account in AD for
this user and grant it with the same rights as others. See if the problem
no longer persists with this new account.

Thanks.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 10 '06 #2
WenJun,

We created a new account for the user in AD and the authentication worked
successfully and appropriately. This was a hassle since we had to copy
everything from the user's e-mail and such over to the new account.

The user was able to connect using IE and authenticate. Why were web
services specifically affected by that and how did we set up an account that
did this?

Thanks for the help.

Robert

""WenJun Zhang[msft]"" <wj*****@online.microsoft.com> wrote in message
news:ms**************@TK2MSFTNGXA01.phx.gbl...
Hi Robert,

If other users can logon to the problematic machine and properly use the
application calling the web service, looks like the issue isn't in your
application or machine specific but is most likely specific to the user
credential. My suggestion is that you may create a new account in AD for
this user and grant it with the same rights as others. See if the problem
no longer persists with this new account.

Thanks.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no
rights.

Apr 10 '06 #3
Hi Robert,

To deeply troubleshoot the odd account issue, a Windows security engineer
need to be involved and honestly it's not easy to be handled in the
newsgroup. You may have to call our CSS to open a service incident.

A more convenient solution for you may be creating a new account for the
user and migrating his mailbox. After deleting the old account, you can
specify the new account to use the user's orginal email address. The
following articles may be of help:

XGEN: Using the "Remove Exchange Attributes" Option
http://support.microsoft.com/?id=307350

OL2002: How to Back Up, Restore, or Move Outlook Data
http://support.microsoft.com/?id=287070

To reconnect the mailbox to the problematic user account after you remove
Exchange attributes for the user, please follow these steps:
1. In Exchange System Manager, locate the mailbox store that contains the
problematic user's mailbox.
2. Click the "Mailboxes" object under the mailbox store.
3. If the mailbox is not already marked as disconnected (the mailbox icon
appears with a red X), right-click the "Mailboxes" object, and then click
"Run Cleanup Agent".
4. Right-click the disconnected mailbox, click "Reconnect", and then select
the problematic user from the dialog box that appears.
5. Click "OK".
6. Open Outlook and test the issue again.

Hope the info helps.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 12 '06 #4

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

Similar topics

1
by: Jody Gelowitz | last post by:
We are having an issue in that when trying to read a file that is on Server2 from Server1 (through our ASP.NET project), we receive the error: Access to the path "\\Server2\MyShare\MyFile.tif" is...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
0
by: David Palau | last post by:
We have a internal company WinForms application that makes some calls out to a intranet web service (once at application start-up for some configuration info and then periodically during the life...
1
by: Scott Yen | last post by:
Hi, I'm using the following Axis java client to invoke a .Net web service hosted my localhost. Although the username and password is set on the "call", client gets (401) Access Denied"...
7
by: hufaunder | last post by:
I have a website that uses a web service that is located on the same machine. This webservice calls a program which in return modifies a file in c:\documents and Settings\All Users\Application...
4
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a...
4
by: =?Utf-8?B?RUdPTg==?= | last post by:
nHi! We have a C# .NET application (exe) that is started by a service (like a watchdog) and the application is thereby runing as Local System account. On cetain computers (only a very few of...
2
by: =?Utf-8?B?RWRkaWU=?= | last post by:
Here is my scenario for a problem I can't solve. I am hosting a 3.5 WCF service in IIS on Windows Server 2003. The service works fine with the WCF test client in Visual Studio 2008 and from an...
2
by: =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post by:
I have a service running on my PC. I want to set the service's PriorityClass to BelowNormal. I use the following code: Process process = GetServiceProcess(); // How can I get the user's token...
2
by: =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post by:
Yes, sorry I tried to make it clear in the original question that I want to get the user token of the service - ie. the account the service is running under. I know services don't have user tokens...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.