I’m implementing a web method inside an ASP.NET page to execute asynchronous calls. Now I need to know the physical application path of my web app.
I usually use Request.PhysicalApplicationPath, but how can I obtain the same information from inside a web method?
NOTE No Request or Server properties are available inside the web method…
I’ve always used:
you’ll need to also add
using System.Web.Hosting;in your class directives header