473,651 Members | 3,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 CustomerManager WebService.Cust omerManagerWebS ervice Service
{
get
{
if (log.IsDebugEna bled)
{
log.Debug("Tryi ng to get the customer manager web service.");
}
CustomerManager WebService.Cust omerManagerWebS ervice web=new
Snowball.Crm.Bu sinessManager.C ustomerManagerW ebService.Custo merManagerWebSe rvice();
if (m_credSet)
{
if (log.IsDebugEna bled)
{
log.Debug("Cred entials have been set the cache");
}
web.Credentials =m_cred;
}
else
{

web.Credentials =CredentialCach e.DefaultCreden tials;
if (log.IsDebugEna bled)
{
log.Debug("Usin g default credentials");
}
}
if (log.IsDebugEna bled)
{
log.Debug("Sett ing web options.");
}
web.PreAuthenti cate=true;
web.UnsafeAuthe nticatedConnect ionSharing=true ;
web.UserAgent=" BusinessManager .dll";
try
{
if (log.IsDebugEna bled)
{
log.Debug("Tryi ng test connection.");
}
web.TestConnect ion();
}
catch (System.Excepti on ex)
{
if (log.IsDebugEna bled)
{
log.Debug("Auth entication failed. Failure report follows:");
}
string message="Failed to connect to the web service for " +
System.Environm ent.UserName;
log.Error(messa ge,ex);

throw new AuthenticationF ailedException( message,ex);

}
return web;
}
}

Robert
Apr 7 '06 #1
3 2271
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******** ******@TK2MSFTN GXA01.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
4881
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 denied. Here is the server setup that we have: Dev - Development Computer on WinXP Pro SP2 (IIS5), VS2003 developing under .NET Framework 1.1 Server1 - Web Server on Win2003 Server (IIS6) Server2 - File Server on Win2003 Server
3
7994
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 libraries I made myself were not having this problem, but it only happened with a zip library I downloaded and copied into my program's directory. When using classes from this library, my service threw an "Access Is Denied" FileLoadException, which...
0
5211
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 of the application for specific functional requests). We are getting System.Net.WebException with HTTP 401: Access Denied errors periodically when we are attempting some functional web service calls. However, immediately trying the web service...
1
2631
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" exception. private static void testTest() { try { String endpoint = "http://localhost/WebService1/Service1.asmx"; String method = "Test";
7
19730
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 Data\...'. Unfortunately, whenever the webservice is executed I get the following error message: Access to the path 'C:\Documents and Settings\All Users\Application Data\...' is denied. Permissions for the default website (where the website and...
4
21716
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 webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
4
2649
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 thousands) it seems like the call InternetGetConnectedState gets FALSE back (even when there is a connection) and when i check GetLastError it says 5=Access denied, that InternetGetConnectedState got Access denied and thereby returns false (I...
2
12867
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 ASP.Net client hosted on my development machine in VS2008. As soon as I deploy the ASP.net client to the "Same" IIS server, I get Access Denied messages. My goal is to use AD security groups so the authenticated user on the ASP.net page should be...
2
4788
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 (Local System) from the process, or wherever? using (WindowsImpersonationContext user = WindowsIdentity.Impersonate(userToken))
2
5333
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 - I suspect users do have tokens, hence "user token", otherwise we might call them "service tokens" or somesuch :-) If you read the question again, you migh see that the fundamental question is, *assuming there is no other approach*: The...
0
8279
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8703
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8467
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8589
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7302
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5619
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1591
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.