Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access App_Data in WCF service

Tags:

.net

wcf

How to access App_Data folder in WCF service?

I have placed a xslt file and I am not able to find the path.

like image 775
Miral Avatar asked Jan 26 '09 16:01

Miral


1 Answers

You need to use HostingEnvironment.ApplicationPhysicalPath:

string myXsltFilename = Path.Combine(HostingEnvironment.ApplicationPhysicalPath, "App_Data", "my.xslt");
like image 84
Steven Robbins Avatar answered Oct 02 '22 13:10

Steven Robbins