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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:08:53+00:00 2026-05-25T17:08:53+00:00

I am building WCF pox and json rest service using WebScriptServiceHostFactory in framework 3.5

  • 0

I am building WCF pox and json rest service using WebScriptServiceHostFactory in framework 3.5 and i am sending the status code to client by throwing WebProtocolException. While doing so the exception is not well formatted and looks bad on the browser like below…..

Is there a way by which i format the exception on browser or suppress the exception in service and send only the status code to client.

{“ExceptionDetail”:{“HelpLink”:null,”InnerException”:{“HelpLink”:null,”InnerException”:
null,”Message”:”Exception of type ‘System.Exception’ was thrown.”,”StackTrace”:null,
“Type”:”System.Exception”},”Message”:”SomeDescription”,”StackTrace”:”
at Platform.Licensing.Services.AuthorizationAttribute.BeforeCall(String operationName,
Object[] inputs) in D:\Projects\trunk-LicensingAPI\Code\Platform.Licensing.Services\AuthorizationAttribute.cs:line 72\u000d\u000a
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InspectInputsCore(MessageRpc& rpc)\u000d\u000a at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)\u000d\u000a at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)\u000d\u000a at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)\u000d\u000a
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)”,
“Type”:”Microsoft.ServiceModel.Web.WebProtocolException”},”ExceptionType”:
“Microsoft.ServiceModel.Web.WebProtocolException”,”Message”:”SomeDescription”,
“StackTrace”:” at Platform.Licensing.Services.AuthorizationAttribute.BeforeCall(String operationName, Object[] inputs)
in D:\Projects\trunk-LicensingAPI\Code\\AuthorizationAttribute.cs:line 72\u000d\u000a
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InspectInputsCore(MessageRpc& rpc)\u000d\u000a
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)\u000d\u000a
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)\u000d\u000a
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)\u000d\u000a
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)”}

  • 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-25T17:08:55+00:00Added an answer on May 25, 2026 at 5:08 pm

    This exception is due to multiple reasons. I was using the Factory along with the service configuration which was wrong. Also i had to make includeExceptionDetailInFaults = false and use custom behaviour and IErrorHandler to handle the WebProtocolException for rest.

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

Sidebar

Related Questions

I'm new to REST and I'm building a service using the WCF REST Starter
I am building a REST service on WCF, and one of the methods I
I am building a Web service using WCF as a way to provide access
Using WCF3.5SP1, VS2008. Building a WCF service that exposes about 10 service methods. We
I am building a service using WCF and I need to send over images.
I am building a WCF service with framework 4.0 for a special application in
Problem Background I'm building a custom WCF Data Service provider using the Alex James
I'm about to start building an iPad client for an existing WCF service that
I've been building a WCF app behind 3 projects (contract,implementation,client) I've hosted my service
I have a WCF service where Im building up a block of XML using

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.