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 / October 2004

Tip: Looking for answers? Try searching our database.

How to get webmethod name automatically?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ddt - 27 Oct 2004 15:11 GMT
I am trying to write some log inside from web method. Is there any way to get
the method automatically instead of hard code name manually?
Thanks in advence.
Martin Kulov - 27 Oct 2004 16:01 GMT
Hi,

You can use StackFrame.GetMethod method to get the MethodBase info.
In the Name property of MethodBase is the name of the method.

Regards,
Martin Kulov
www.codeattest.com
Julie Lerman - 27 Oct 2004 17:11 GMT
Check the thread entitled "How can UsernameTokenManager know what Web
Service method is being invoked?" from Sept 28th.

In there Hervey Wilson points out :
RequestSoapContext.Current.Addressing.To has the name of the target
service (i.e. it's URI), RequestSoapContext.Current.Addressing.Action
has the action (equivalent to method) that the message is destined for.

> Hi,
>
[quoted text clipped - 4 lines]
> Martin Kulov
> www.codeattest.com
ddt - 28 Oct 2004 15:11 GMT
Thanks you all. I get it.
Another question :), how can I get parameters VALUE automatically?
Thanks again.

> Check the thread entitled "How can UsernameTokenManager know what Web
> Service method is being invoked?" from Sept 28th.
[quoted text clipped - 12 lines]
> > Martin Kulov
> > www.codeattest.com
Martin Kulov - 31 Oct 2004 17:33 GMT
Hi ddt,

Unfortunately, you can not get the parameters values. See this [1] discussion.

[1] http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=400bf8ac%240
%24325%24ba620e4c%40news.skynet.be&rnum=7&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3D
UTF-8%26oe%3DUTF-8%26q%3DStackTrace%2Bclass%2BValue


Martin Kulov

> Thanks you all. I get it.
> Another question :), how can I get parameters VALUE automatically?
[quoted text clipped - 17 lines]
>>> Martin Kulov
>>> www.codeattest.com

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.