Search code examples
asp.netvisual-studio-2010asp.net-4.0vs-web-application-projectvisual-web-developer-2010

How do I make files hidden when deploying an ASP.net project? (Or not upload them at all.)


I have some text files (and others) that I want to be hidden from the public when deploying an ASP.net project. How do I do that? (And what's the technical term for that? "hidden"? Searching, I couldn't find an answer to this so I'm probably using the wrong term.)

Also, if you know of a way to specify not to upload certain files when publishing - I'd like to hear it. (I know I can do that by excluding them from the project, but I rather they stay included because I use them while debugging on localhost.)


Solution

  • You can put them in the App_Data folder in your project that is available on the webserver via the file system or your application but not accessible from the internets.