MapPath different on local server and discountasp

Discussion in 'Visual Studio' started by joer00, Jun 28, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. On my local iis I have a virtual web for my application. I use server.mappath("/") which is c:/inetpub/wwwroot.

    Running the app on discouantasp.net results in path e:/inetpub/wwwroot/application.

    Why is this different, what can I do to have the same path on my local machine ??

    Joe
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    server.mappath function should give you the physical path to your root.

    if you use server.mappath across the board, you should not need to change your code between server

    quote:Originally posted by joer00

    On my local iis I have a virtual web for my application. I use server.mappath("/") which is c:/inetpub/wwwroot.

    Running the app on discouantasp.net results in path e:/inetpub/wwwroot/application.

    Why is this different, what can I do to have the same path on my local machine ??

    Joe
    </blockquote id="quote"></font id="quote">
     
  3. I would recommend changing the drive letter on your local enviornment to get in sync. I faced a similar problem in ASP.NET. The good part was that I added a connection string entry in Web.Config file. I have two copies for each environment and does not need be changed.
    Saves me lot of double work.
     
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