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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:28:23+00:00 2026-05-24T18:28:23+00:00

I need the errors from my web service sent directly to the client in

  • 0

I need the errors from my web service sent directly to the client in Json format so I can read exactly what error is being thrown. How do I do this please?

This is what I keep getting in Fiddler

Runtime Error 
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. 

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly"/>
    </system.web>
</configuration>

Server code

  <WebMethod(EnableSession:=True)> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
 Protected Function PopulateUsers() As IDictionary(Of String, String)

        Dim users As New Dictionary(Of String, String)

        Try
            Dim arry As ArrayList =  UserController.GetUsers(0, True)
            For Each objUser As Users In arry 
                userrole.Add(CStr(objUser.UserID), objUser)
            Next
        Catch ex As Exception
            Dim ur As New Dictionary(Of String, String)
            Dim s As New User
            s.DisplayName = ex.GetBaseException.StackTrace
            s.UserID = 1
            users.Add(ex.GetBaseException.Message, s)
            Return s
        End Try

        Return users 
    End Function
  • 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-24T18:28:24+00:00Added an answer on May 24, 2026 at 6:28 pm

    Make sure you have proper error handling in your web service. In case of any error, convert your error object into a well formed json object and send it. In the client side, success handler will only be invoked but you need to check whether the response contains the error object or the actual response and act accordingly.

    There is error in your catch block, try this

    Protected Function PopulateUsers() As IDictionary(Of String, String)
    
            Dim users As New Dictionary(Of String, String)
    
            Try
                Dim arry As ArrayList =  UserController.GetUsers(0, True)
                For Each objUser As Users In arry 
                    userrole.Add(CStr(objUser.UserID), objUser)
                Next
            Catch ex As Exception
                Dim ur As New Dictionary(Of String, String)
    
                ur.Add("ERROR", ex.GetBaseException.StackTrace)
                Return ur
            End Try
    
            Return users 
        End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JSON response from a web service that I need to be
The problem is I need to build a web service client from a file
I need to read a XML file returned from a web service. I was
I need to get Json data from a C# web service. I know there
I have a web service that I need to consume from BizTalk orchestration. I've
I need to consume an AXIS 1.4 Web service over SSL from a .NET
I need to localize error messages from a compiler. As it stands, all error
i need Enumarable value from below class but give error public static Enumerable LoadDataByName(string
I need to get a value from another page. But I get this error
I am implementing a WCF web service which interacts with a client whose code

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.