Miral
Miral

Reputation: 6038

Access App_Data in WCF service

How to access App_Data folder in WCF service?

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

Upvotes: 15

Views: 9894

Answers (1)

Steven Robbins
Steven Robbins

Reputation: 26599

You need to use HostingEnvironment.ApplicationPhysicalPath:

string myXsltFilename = Path.Combine(HostingEnvironment.ApplicationPhysicalPath, "App_Data", "my.xslt");

Upvotes: 29

Related Questions