Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 525095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:38:09+00:00 2026-05-13T08:38:09+00:00

I have two identical servers. Both Win2k3. I have a web service that queues

  • 0

I have two identical servers. Both Win2k3. I have a web service that queues emails and an application that consumes that service. Both are hosted on both machines using identical folder structures, permissions, and IIS settings. One is called “test” and the other “prod”.

Ideally, the app on prod will point to the ws on prod. However, when that is the case, I get the following error page:

Server Error in ‘/Apps/UTMv1’
Application.

The request failed with HTTP status
401: Unauthorized. 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:
System.Net.WebException: The request
failed with HTTP status 401:
Unauthorized.

Source Error:

An unhandled exception was generated
during the execution of the current
web request. Information regarding the
origin and location of the exception
can be identified using the exception
stack trace below.

Stack Trace:

[WebException: The request failed with
HTTP status 401: Unauthorized.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream
responseStream, Boolean asyncCall)
+431201 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +204
utm.AppManagerEmailer.Emailer.AddToQueue(String
txtFrom, String txtTo, String
txtSubject, String txtBody, Int32
intAppId, Boolean blnIsBodyHtml) in
C:\Documents and
Settings\username\Desktop\Projects\utm\utm\Web
References\AppManagerEmailer\Reference.cs:93
utm.test.Page_Load(Object sender,
EventArgs e) in C:\Documents and
Settings\username\Desktop\Projects\utm\utm\test.aspx.cs:23
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr
fp, Object o, Object t, EventArgs e)
+14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs
e) +99
System.Web.UI.Control.LoadRecursive()
+50 System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) +627

Version Information: Microsoft .NET
Framework Version:2.0.50727.3053;
ASP.NET Version:2.0.50727.3053

If the app on prod points to the ws on test, it works. Also, if the app on test points to the ws on prod, it works.

For fun, I tried using the ws on prod in another app. It behaved the same as the original app.

Also, I have other web services running on prod that work properly. This is the only one that seems to be causing problems.

Here’s the code I use in the app to new-up the emailer and queue an email:

Emailer e = new Emailer();
e.Credentials = System.Net.CredentialCache.DefaultCredentials;
int intEmailId = e.AddToQueue(fromEmail, toEmail, subject, body, 103, true);

Here’s the code for my web service:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Net.Mail;
using System.Collections.Generic;

namespace AppManager.WebServices
{
    /// <summary>
    /// Summary description for emailer
    /// </summary>
    [WebService(Namespace = "http://www.mydomain.com/apps/appManager/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Emailer : System.Web.Services.WebService
    {
        [WebMethod]
        public int AddToQueue(string txtFrom, string txtTo, string txtSubject, string txtBody, int intAppId, bool blnIsBodyHtml)
        {
            Email e = new Email()
            {
                From = new MailAddress(txtFrom),
                Subject = txtSubject,
                Body = txtBody,
                IsBodyHtml = blnIsBodyHtml,
                AppId = intAppId
            };
            e.To.Add(txtTo);
            e.AddToQueue();

            return e.Id;
        }

    }
}

So, what do you think could be the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:38:10+00:00Added an answer on May 13, 2026 at 8:38 am

    It really sounds like a configuration difference between the two servers.

    That said, you may want to check out this KB http://support.microsoft.com/kb/896861

    Microsoft added some loopback protection code that could result in a 401.1 error if FQDN’s don’t match exactly.

    Check your system Event Viewer to see if there are any more details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have two servers, both are containing a local application connecting to local web
We have two nodes in a cluster. Both run an ASP.NET web application that
I have two identical servers with SQL Server 2005 and my application. Hard requirements:
I have two websites that have an almost identical database schema. the only difference
I have two very simple, identical UITableViews in my app that are populated with
Suppose I have two documents that are identical except the lines are shuffled. Is
Assume that I have two parent tables: Company and Contact . Assume that both
I have a typical web application in Node that is utilizing the Express framework
I have two virtual machines with seemingly identical configuration (created from the same VM
Bug: I've got an ASP.NET web application that occasionally sets identical cookie keys for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.