473,543 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.co m,
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 :

{//call the webservice on Machine A
CacheMaintenanc e maintain = new
CacheMaintenanc e("local.mysite .com");
maintain.Creden tials = new NetworkCredenti al("LocalLoginN ame",
"LocalPassword" , "LocalDomai n");
maintain.FlashT heCache();
maintain.Dispos e();
catch (Exception exp)
errors = "Could not flash local cache. " +
General.UnrollE xception(exp) + " ";

{//call the webservice on Machine B
CacheMaintenanc e maintain = new
CacheMaintenanc e("wwww.mysite. com");
maintain.Creden tials = new NetworkCredenti al("LiveLoginNa me",
"LivePasswo rd", "LiveDomain ");
maintain.FlashT heCache();
maintain.Dispos e();
catch (Exception exp)
errors += "Could not flash live cache. " +
General.UnrollE xception(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 1671

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

Similar topics

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; using Microsoft.Office; using Microsoft.Office.Interop; using Microsoft.Office.Interop.Outlook; using Microsoft.Office.Core;
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 VS, however, when I change to release and put it out on the web it fails giving me the following error message The underlying connection was...
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, \\myremote\c$\temp\hi.txt, true); This API is run from a web service that exposes it. The problem is as follows: 1) I request a page (On the web service machine)...
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' Application. ---------------------------------------------------------------------------- ---- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific...
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 current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
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 --------------------------- The Web server reported the following error when attempting to create or
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 I have changed the encoding but still cant get rid of the error. System.Xml.XmlException: '', hexadecimal value 0x00, is an invalid character....
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 i use external smtp server to send my emails. for example, i dont use the iis' virtual smtp server. i assign an another smtp server
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 as I need them. I can't find anything about it using searches. Yesterday, I removed the "Enable anonymous access" option from my web (within the...
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...
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. ...
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...
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...
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...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
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...

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.