How to Get the Working Directory of a WCF Service

I was working on some code today in a WCF service that required me to know the directory containing the service itself. This is one of those things that by the next time I need to do it, I'll be asking myself "How did I do that last time?"

Well, here it is:

System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;

Comments

Popular Posts

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

Silent Renew and the "login_required" Error When Using oidc-client

Fixing the "Please add a @Pipe/@Directive/@Component annotation" Error In An Angular App After Upgrading to webpack 4

How to Determine if a Column Exists in a DataReader