Server.MapPath returns IIS root Not App Path

Discussion in 'ASP.NET / ASP.NET Core' started by cwchilders, Jul 27, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. MapPath mapping works in VS2008 dev (where the local dev server app root), but publishing to a Web Application (www.mysite.com/MyWebApp) not the root in my discountASP.net IIS site resolves to the default app (...htdocs\mysite) , NOT my Web App ((...htdocs\mysite\MyWebApp)?

    Also tried HttpRequest.ApplicationPath and that still resolves to root?

    What's up with that?

    thanks,
    bill
    --
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    mappath() should return the directory of your site root; i just tested it on my test account.

    Can you post code?
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page