jdelator
jdelator

Reputation: 4251

Opening a file relative to server folder

When I try opening a file it tries to use "C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0" as the base directory.

How can I get the working directory of the web application?

Upvotes: 0

Views: 167

Answers (1)

Christian C. Salvadó
Christian C. Salvadó

Reputation: 827942

string path = Server.MapPath("~");

Upvotes: 2

Related Questions