I have a web serv开发者_开发技巧ice that calls a class library.
In this class library i'm trying to find out the URL of the web service that calls the class library.
Is there a simple way of doing this??
You should not investigating from the class library what is the URL calling because this bind that library to works only with a web service, and this is not a good design startegy. Why do you need the URL ? Is in order to log the caller ? You can probably move the part of code interested in the URL outside the library.
Try
SoapContext.Current.Actor.AbsoluteUri
This requires WSE 2.0 SP3.
I figured it out in the end
Dim tReq As New System.Web.Services.WebService
Dim tWSURI As String = tReq.Context.Request.Url.OriginalString
this requires you to add a reference to system.web
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论