By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,780 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,780 IT Pros & Developers. It's quick & easy.

401 Access Denied on web service call

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.