2

I have a number of XSLT files in my ASP.NET Web Application solution. Should these go in the App_Data folder?

The MSDN 'Project Folder Structure' article suggests that the App_Data folder is for 'data files'. As XSLT files are not strictly 'data files' then should they go elsewhere?

I do not want end users to be able to access the XSLT files from their browsers, so App_Data seems like an obvious location for this, but I am not sure.

Many thanks.

Jonathan Williams
  • 2,015
  • 1
  • 19
  • 23

1 Answers1

2

The App_Data folder is a perfectly reasonable; however a better option may be to "embed" the XSLT into your assemblies as a resource. This way you don't have to worry about deploying more files. It also makes it harder for a client to look at your XSLT code (if this bothers you).

Andrew Skirrow
  • 3,402
  • 18
  • 41
  • Thanks Andy. As the .NET User Controls are being published out from a Content Management System I do not have any code behind files (and thus no assemblies to deploy). Therefore I will have to deploy the XSLT files to the server. – Jonathan Williams Apr 01 '11 at 15:09
  • 1
    @Jonathan: in that case you are probably best going with the `App_Data` option. – Andrew Skirrow Apr 01 '11 at 15:13