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?
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.