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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:25:35+00:00 2026-06-05T09:25:35+00:00

Summary Exception serialization behaviour for [WebMethod] differs between ‘all on same server’ use and

  • 0

Summary

Exception serialization behaviour for [WebMethod] differs between ‘all on same server’ use and ‘real world use’.

Situation

I have a webservice implemented, in foo.aspx, like this :

[WebMethod]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json, XmlSerializeString = false)]
public static Fruit InsertUpdateFruitWebService()
{
    return FruitHelper.InsertUpdateFruit();

}

The webservice is called from within bar.aspx using jQuery – $.ajax.

If some sort of problem occurs in InsertUpdateFruit an exception is thrown, the ‘error’ callback specified within $.ajax is invoked and a JSON blob is passed as an argument to the ‘error’ callback function.

The Good News

When the browser and the server are on the same machine this all works fine.

The Not So Good News

When the browser and the server are not the same machine all you get in the JSON blob passed as an argument to the ‘error’ callback is this :

{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}

No stacktrace, no exception details, etc.

The Question

Can anyone point me in the direction of what might cause this ?

  • 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-06-05T09:25:41+00:00Added an answer on June 5, 2026 at 9:25 am

    OK an answer to this is to make amendments to the Web.config file (or whichever .config file you would like use) so that the customErrors attribute is set to ‘Off’ like so …

    <system.web>
        ... other stuff
        <customErrors mode="Off" />
    </system.web>
    

    There are plenty of circumstances where this might not be a great solution but it works for me on this project.

    Credit needs to go Dave Ward and his blog posting at http://encosia.com/use-jquery-to-catch-and-display-aspnet-ajax-service-errors/ (it’s actually in the comments) which reminded me of this .

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

Sidebar

Related Questions

The Wp7 marketplace result pdf shows in summary Exception(s) Applied: None. What does this
Is there a use for the overload of AddModelError () that takes an Exception
Summary: I want to save two classes of the same name and different namespaces
Note : This question has been re-asked with a summary of all debugging attempts
/// <summary> /// Deletes all data records associated with a data record ID ///
Summary How can you make ant repeatedly generate byte-identical jar files from the same
Summary: the Exception is telling me that the transaction is read-only; a debug println
I have two POCO objects as such: ///<summary> ///Auto-generated concrete POCO for persistance use
Summary My JUnit tests are not finding the files they require during execution. I'm
Summary : This is a basic, stand alone web form. Just html form, with

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.