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

  • Home
  • SEARCH
  • 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 6361105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:44:00+00:00 2026-05-24T23:44:00+00:00

I had designed a web service which, upon each method call, would return a

  • 0

I had designed a web service which, upon each method call, would return a structure of some type T if the request were successfully conducted, or otherwise throw a FaultException to the client to signal some error. One of the client applications was an ASP.NET application with a bunch of ObjectDataSource objects directly tied to the methods of the service. Those objects would take care of things such as GridView paging or DropDown populating for themselves.

Unfortunately, I was just now ordered to remove all FaultException from the service and wrap the types I was returning into a generic ServiceResponse<T> structure which wraps the original return structure of type T and adds some more fields to transmit exception information. Having no other choice, I did this right away and replaced all the old service proxy calls with a call to a generic ExecuteMethod<TChannel, TReturn> method which takes care for itself of unwrapping the value if the request was successful or throw some exception otherwise. The problem now is that, since this new method is generic, I can’t tie an ObjectDataSource to it, and GridView automatic paging is gone.

Since ObjectDataSource doesn’t support generic methods, nor it supports generic classes without a lot of mangling with assembly-qualified types names which I would like to avoid, I am left with the options of either page the GridView manually, which I would like to avoid as well, or writing a proxy to wrap every necessary service call and return the desired value, which then is “wrapping a wrapper”. Can you please help me decide which one will not be the worst? Do I have any other options in this case?

  • 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-24T23:44:01+00:00Added an answer on May 24, 2026 at 11:44 pm

    I prefer the “wrapping a wrapper” approach as you call it. Architecturally it’s entirely valid since each has a single responsibility.

    It will be a pain to maintain if the service contract is not stable but it’s probably more maintainable than the assembly qualified name approach will be in the same circumstances.

    (RANT: As an aside I trust the person who “ordered” you to remove the Faults from the service understands the impacts this will have on interoperability of the service. Also, the approach allows the service implementors and consumers to get themselves into difficulty if they fail to properly implement your new proprietary protocol. It seems like it doesn’t actually achieve anything anyway since all you’re changing is the mechanism by which a Fault gets converted to an Exception at the client.)

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

Sidebar

Related Questions

I had some site templates designed for me recently. I got the final HTML
Had an interesting discussion with some colleagues about the best scheduling strategies for realtime
Why was String designed as a reference type instead of value type? From the
Using Facebox with .NET (Web Forms) is painful--this primarily HTML site was designed by
I have looked around SO and the web for quite some time now and
I had designed a Stack wrapper class. My confusion is, should I be using
A couple of years ago, we had a graphic designer revamp our website. His
I had this answer on another post I asked: I believe the VS designer
My company had a website we're working on redone by a designer. It looks
Had a coworker ask me this, and in my brain befuddled state I didn't

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.