[SOLVED] How to access Server.MapPath

Answered Closed
0
0

Our existing VWG application uses Server.MapPath to get the full path to the “HelpFiles” directory under the main web root.

string directory = Context.Server.MapPath(“/HelpFiles”);

How should I accomplish this in WiseJ?  Thanks.

  • You must to post comments
Best Answer
0
0

Use the regular System.IO classes: Path.Combine(Application.StartupPath, “MyFiles”);

The application path is Application.StartupPath. You also have StartupUri, ExecutablePath, etc.: https://docs.wisej.com/api/wisej.web/general/application

/Luca

  • You must to post comments
0
0

Hi Andrew,

please take a look at a similar question and Luca´s answer:

https://wisej.com/support/question/access-directory-structures-and-contents-on-server

Best regards
Frank

  • You must to post comments
Showing 2 results