Publishing via Visual Studio, local files not available?

I have a ASP.NET MVC4 application, running with VS2010. I am publishing using the "Build > Publish" command and accessing it through my LAN.

This works OK and the website loads. However, whenever the website tries to call directories stored on my local drive, it cannot find them. So if it tries to open the absolute path:

C:\myFolder\

..it says it does not exist when accessed via LAN, even though it works OK when I run it locally. I tried adding that folder to the VS2010 project and republishing, with the path set "\myFolder\", but the proble persists, getting error code:

directory 'c:\windows\system32\inetsrv\myFolder\' does not exist

Upvotes: 1

Views: 182

Answers (1)

cubitouch
cubitouch

Reputation: 1937

Maybe you should use relative paths and deploy these within the website folder ? (using App_Data if needed)

How can you be sure the C:\ drive will be available on the server with the corrects files ?

Upvotes: 2

Related Questions