First, I have two project working on: ASP.NET and Silverlight
Both uses a class (QueryServiceClass in a library class project) that have query methods to access the database with ADO.NET, manipulating the database. (open connection to database, add customer, edit, update etc.)
So I stored them into a C# Class library and it shared with ASP.Net and Silverlight.
ASP.NET project and Silverlight’s Web project will have a reference to the QueryServiceClass project.
But then if I publish the ASP.NET/Silverlight Project, the QueryServiceClass project’s dll file should also be published ( the dll should be locate in the server side at this point).
Because the QueryServiceClass’s method has to be public so ASP.NET/Silverlight project can use it.
So someone might able to use that dll to access the database? Would that be safe?
======
Edit
In the Silverlight’s Web Project, I am using WCF inhert the QueryServiceClass and an Interface to access the database, so on Silverlight Client, it will access the database through the WCF.
I am more concern on someone might take the dll file from the server and give to someone.
Thanks in advance.
King
You can make your members internal instead of public and modify the AssemblyInfo.cs class and make internals visible to specific asseblies.
This doesn’t keep someone from disassembling your DLL to get the info, but will keep people from using your dll in their code.