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 953987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:08:20+00:00 2026-05-16T00:08:20+00:00

I’m having trouble figuring out why my web service is not working correctly when

  • 0

I’m having trouble figuring out why my web service is not working correctly when called from my asp.net application in production only.

I am able to run my asp.net application locally, calling the web service (in production) and it completes correctly.

I am able to modify the web.config to allow me to use the test form on the production web service and it calls correctly.

I’m calling the web service in a shared dll, and I already check that I am actually getting the updated dll.

This is a very basic web service to log any exceptions on our sites that aren’t handled elsewhere. I’m adding additional parameters to it, and also moving it to another project so it is grouped with more of our web services. It is in it’s own asmx file called ExceptionServices

My shared dll has a class ErrorHandler which calls (at this point, a test method) TestEmail(string to) and all that does is sends me an email.

Like I said, when running my app locally, it calls the production web service and all is good.

I am running in a hosted environment and am unable to install the remote debugging tools so I cannot step through the production code (unless anybody knows any tricks).

It just seems like this should work (banging head on keyboard)…

Here is my basic web method:

    [WebMethod]
    public void TestEmail(string to)
    {
        MailMessage mm = new MailMessage("no-reply@mydomain.com", to, "test", "body here");
        SmtpClient client = new SmtpClient("localhost"); // already tried tweaking smtp server, and all my options work when I use the test form
        client.Send(mm);
    }

ErrorHandler class in the shared dll

public class ErrorHandler
{
    public static void ThrowError(Exception ex, string sitename, string ip, string username)
    {
        //if (ip != "127.0.0.1") // exclude local errors when developing
        {
            EILib.ExceptionServices.EIExceptionHandler eh = new EILib.ExceptionServices.EIExceptionHandler();
            eh.TestEmail("senloe@....com");
        }
    }
}

and finally my global.asax where it all begins:

    protected void Application_Error(object sender, EventArgs e)
    {
        //Get the Error.        
        System.Exception anError = Server.GetLastError();
        EILib.ErrorHandler.ThrowError(anError, "mydomain.com", EILib.Utilities.GetUserHostAddress(Request), User.Identity.Name);
        ....
    }
  • 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-16T00:08:21+00:00Added an answer on May 16, 2026 at 12:08 am

    Verify that the SMTP service is running on your production server. Check that it is configured to allow the default credentials (a hosting company might well require credentials for email). Check that the service is configured to receive mail from from the local computer (as opposed to using one of the pickup directory delivery methods).

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

Sidebar

Related Questions

No related questions found

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.