473,405 Members | 2,160 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,405 software developers and data experts.

401 Not Authorized error when trying to authenticate XML web service

Here's the situation :

I have the same ASP.NET 2.0 web application running on both Machine A
and Machine B. On both machines, I have Integrated Windows
Authentication turned on, and Anonymous Access turned off for the
folder that contains the webservice .ASMX file. When I hit a certain
page on Machine A, it will call the web service on Machine A, and then
it will call the same web service on Machine B. Likewise, when I hit
the same page on Machine B, it will call the web service on Machine B,
and then it will call the same web service on Machine A.

On both machines, I have an account set up for this web service to
use. The username/password for Machine A is different from the
username/password for Machine B. The machines are on different Active
Directory domains.

The websites on Machine A and Machine B use the same second-level
domain, but have different subdomains - Machine A is local.mysite.com,
Machine B is www.mysite.com.

Both Machine A and Machine B are running Windows Server 2003.

On the page that calls the webservice, I have a block of code that
looks like this :

try
{//call the webservice on Machine A
CacheMaintenance maintain = new
CacheMaintenance("local.mysite.com");
maintain.Credentials = new NetworkCredential("LocalLoginName",
"LocalPassword", "LocalDomain");
maintain.FlashTheCache();
maintain.Dispose();
}
catch (Exception exp)
{
errors = "Could not flash local cache. " +
General.UnrollException(exp) + " ";
}

try
{//call the webservice on Machine B
CacheMaintenance maintain = new
CacheMaintenance("wwww.mysite.com");
maintain.Credentials = new NetworkCredential("LiveLoginName",
"LivePassword", "LiveDomain");
maintain.FlashTheCache();
maintain.Dispose();
}
catch (Exception exp)
{
errors += "Could not flash live cache. " +
General.UnrollException(exp);
}

Machine A has no problem calling the webservice on Machine B.
Likewise, Machine B has no problem calling the webservice on Machine
A. However, when Machine A tries to call the webservice on Machine A,
or when Machine B tries to call the webservice on Machine B, I get a
"401 Not Authorized" error.

Does anybody know why I'm getting this error?

I've tried using Digest Authentication instead of Integrated Windows
Authentication, and Digest Authentication seems to work fine.
However, it seems that Digest Authentication is less secure then
Integrated Windows Authentication, thus I would like to make
Integrated Windows Authentication work.

Also, I should mention that I've only had this problem with Windows
Server 2003. I have not had this problem with Windows Server 2000.

Thanks for your help.

Jun 26 '07 #1
0 1659

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

Similar topics

2
by: Aprochko | last post by:
Attempting to access outlook from C# .NET ASP app. Have added reference to COM Microsoft Outlook 11 Object Library. Have included using System.Runtime.InteropServices; using System.Web.Mail;...
10
by: Brian Conway | last post by:
I have no idea what is going on. I have a Login screen where someone types in their login information and this populates a datagrid based off of the login. Works great in debug and test through...
1
by: POnfri | last post by:
Hi, I have a problem in a peace of code were i'm doing a file copy using File.Copy. The Source is local and the target is a remote machine. Example: File.Copy(C:\temp\hi.txt,...
7
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- ...
2
by: Brent Burkart | last post by:
I am trying to send an email using SMTP server through IIS. I am recieving the following error. Access is denied. Description: An unhandled exception occurred during the execution of the...
3
by: Niranjan Roy | last post by:
When trying to create Web application project from inside my Visual Studio.Net, I am getting the following error: --------------------------- Microsoft Development Environment ...
6
by: jasn | last post by:
Hello I am getting the following error message when I try and send an XML sting to a web service, I read somewhere that most web services prefer ascii and some throw errors when using unicode so...
4
by: MadeOfRose | last post by:
Hi all i was using cdo object for sending email to a customers. when use win2000 server or windows xp my script works correctly. but not on win2003 server r2. Different thing on my script is...
3
by: ssg31415926 | last post by:
I'm getting the error: "Unable to open the Web 'http://blah/blahblah'. You are not authorized to perform the current operation". I have changed a few things recently but I can't change them back...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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
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...
0
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...
0
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
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,...

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.