Hozikimaru
Hozikimaru

Reputation: 1166

DBML files for ASP.NET MVC 4 project

I am working on a MVC 4 project and I was curious as to how the DBML files are protected. After all, the dbml file is a xml file that is a description of the Database structure.What prevents the user from downloading the DBML file?

Upvotes: 0

Views: 631

Answers (1)

Tommy
Tommy

Reputation: 39807

What prevents people from downloading the .dbml file is that it shouldn't be part of a properly built and published .NET project. When you compile and deploy your project, you will notice that all of those .cs files you had are gone. They were compiled into a .dll that the application actually runs. Same with the .dbml file. All of your .dll files end up in the bin folder, which is a restricted (read - cannot access) folder within a .NET application running under IIS.

In short, never, ever build and copy your entire project to a web facing directory. Use the built in publishing methods to properly deploy your application/web site.

Upvotes: 1

Related Questions