Get root folder in non-web class

C

cashdeskmac

Hi,

I have a web site with a class (HelperMethods) in the App_Code folder. When
any exceptions are caught in a catch block I want a method in the
HelperMethods class to log the error and then throw the exception so that the
<customErrors> element in the web.config can take the user to the appropriate
page.

The problem arises when I am trying to get the root path of the folder so
that I can log the errors in an XML file called ErrorLog in the Logs folder.

Is there a way to specify the root web folder from a non-web class?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top