Question

I have taken on a MVC project, in VS 2008, from another developer and I need to know why HttpContext.Current.Server.MapPath("/") is c:\inetpub\wwwroot.

I am running the project from c:\Websites\Customer\Web\Website\Application\

IIS shows that the site is running from: c:\Websites\Customer\Web\Website\Application\ so I am ultra confused.

Any thoughts?

No correct solution

OTHER TIPS

Use Server.MapPath("~"), which returns the physical path of the root of your application.

The Server.MapPath("/") you are using, returns the physical path of the root of the domain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top