Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / January 2006

Tip: Looking for answers? Try searching our database.

Creating a custom [WebMethod] attribute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dustyg - 19 Jan 2006 17:03 GMT
I have a webservice with several stubbed out methods and severl
implemented methods.  We are releasing to prod with a beta version
allowing customer to use the implemented methods but I would like to
hide the stubbed out methods (and some implemented methods we don't
want seen) from the wsdl.  But I would like this to be done from a
config file so when we do want to release the other implemented methods
there is no recompiling needed.

- Putting them in another asmx files is not an option.
- Setting up authorization to limit use is already implemented, I just
don't want the methods seen.

Is it possible to create a custom attribute which performs the same
functionality (exposing the method in a webservice) as [WebMethod]?

Thank you
Friso Wiskerke - 24 Jan 2006 15:03 GMT
Why don't you just remove the <Webmethod()> attribute from the the
functions/subs that you don't want to be seen yet?
as soon as they are implemented you can just put the method-attribute back
in place.

HTH
Friso Wiskerke

>I have a webservice with several stubbed out methods and severl
> implemented methods.  We are releasing to prod with a beta version
[quoted text clipped - 12 lines]
>
> Thank you
Dustyg - 24 Jan 2006 18:47 GMT
As I stated, we don't want to remove the [WebMethod] attribute because
we don't want to have to push the code every time we release a new
method.  Changing a value in a config file would better suite our
needs.

Thank you

- Dustin
Friso Wiskerke - 25 Jan 2006 08:51 GMT
Maybe the [Conditional] attribute can help you out?

> As I stated, we don't want to remove the [WebMethod] attribute because
> we don't want to have to push the code every time we release a new
[quoted text clipped - 4 lines]
>
> - Dustin
Dustyg - 25 Jan 2006 14:35 GMT
The [Conditional] attribute relies on the definition of a compilation
symbol, meaning the defined symbol is compiled and cannot be changed
without re-compiling.  It also only ignores calls to the method rather
than removing them from compilation like a directive in C++ would so it
would still show up in the wsdl.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.