472,353 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 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 1595

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...
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...
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. ...
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...
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: --------------------------- ...
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...
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...
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.