0

I followed this tutorial that shows how to create an HTML file and have it served by the server. How can I change the folder where the server looks for static files?

I'd like to have the webclient files (html, js, images etc) in a different folder than the server files (c# files).

This is what works:

http://localhost:3499/index.html
pathtomyproject/server/Server/index.html

This is what I want:

http://localhost:3499/index.html
pathtomyproject/webclient/index.html
Toast
  • 596
  • 2
  • 19
  • 39
  • most folders are content directories, with little or no restrictions on file type; are you having trouble when you put files in specific folders? – Claies Feb 15 '15 at 01:16
  • @Claies Updated my question to clarify. I want the server to search for files like index.html somewhere else than it does now. – Toast Feb 15 '15 at 01:34
  • Huh? What do you mean by "search"? You setup files in directories/folders as you wish. When requested, the server, serves the resource appropriately. – EdSF Feb 15 '15 at 02:06
  • By search I mean if I delete the index.html where it is now, the server won't _find_ it anymore. But I want it to look for the file in another directory. – Toast Feb 15 '15 at 02:19
  • ok, based on your edit, it seems like you are suggesting that your index.html isn't in the root of your project folder. – Claies Feb 15 '15 at 04:27
  • if you want to serve your *default* index.html from a different folder than the root of your project, you'll have to configure that on the server after the project has been published. ASP.Net is always going to assume that the root of your project folder is the root of your web server. – Claies Feb 15 '15 at 04:34
  • It is really only important for me where the files show up in the git repository. Is there a way to change the root of my project folder on the development server? @Claies – Toast Feb 15 '15 at 04:51
  • this might have a bit of info that can help: http://stackoverflow.com/questions/4350571/changing-asp-net-application-root – Claies Feb 15 '15 at 05:00

0 Answers0