Which is better architecture, also for security reasons
-
Hallo, im a writing a quite bigger than usually project, and I am dealing with some questions considering architecture and security. To make it short, I have a Windows server with a WCF installed, which is waiting for an outside question from a client that needs some updates. The updates have to be created from a dll, which accesses a Database, runs sql scripts and provides a zip file in the end. Is it ok to call the dll from a function inside the WCF? That function should then pass a string which needs the library. Would it be better to call a programm that consequently calls the dll, thus having a separated instance between WCF Service and the library, which accesses the database? Or maybe there is a better solution? Thanks in advance.
-
Hallo, im a writing a quite bigger than usually project, and I am dealing with some questions considering architecture and security. To make it short, I have a Windows server with a WCF installed, which is waiting for an outside question from a client that needs some updates. The updates have to be created from a dll, which accesses a Database, runs sql scripts and provides a zip file in the end. Is it ok to call the dll from a function inside the WCF? That function should then pass a string which needs the library. Would it be better to call a programm that consequently calls the dll, thus having a separated instance between WCF Service and the library, which accesses the database? Or maybe there is a better solution? Thanks in advance.
How many levels of separation do you want. Your WCF should be enough separation, I would have it call the DLL (which IS another program after all). There may be some security issues around you web server and the WCF communications that you may need to address.
Never underestimate the power of human stupidity RAH
-
Hallo, im a writing a quite bigger than usually project, and I am dealing with some questions considering architecture and security. To make it short, I have a Windows server with a WCF installed, which is waiting for an outside question from a client that needs some updates. The updates have to be created from a dll, which accesses a Database, runs sql scripts and provides a zip file in the end. Is it ok to call the dll from a function inside the WCF? That function should then pass a string which needs the library. Would it be better to call a programm that consequently calls the dll, thus having a separated instance between WCF Service and the library, which accesses the database? Or maybe there is a better solution? Thanks in advance.
Some reasons for using a separate program. - The dll is unstable and because of that it can cause an application exit. - The dll is already encapsulated in an executable and in fact is easier to use that way or even can only be used that way. - The dll is not structured for multi-threading and you want to use it in more than one thread.
-
Hallo, im a writing a quite bigger than usually project, and I am dealing with some questions considering architecture and security. To make it short, I have a Windows server with a WCF installed, which is waiting for an outside question from a client that needs some updates. The updates have to be created from a dll, which accesses a Database, runs sql scripts and provides a zip file in the end. Is it ok to call the dll from a function inside the WCF? That function should then pass a string which needs the library. Would it be better to call a programm that consequently calls the dll, thus having a separated instance between WCF Service and the library, which accesses the database? Or maybe there is a better solution? Thanks in advance.
1. Is the DLL a .NET Assembly? 2. Do you own the DLL? Since it is a DLL, it is going to be loaded in the same process as your WCF service. If you are the author of the DLL or you trust the source, you should be able to safely use the DLL directly from the WCF service. However, if you don't own it or you're not sure of the source, then you can load the DLL in a separate AppDomain and access it from there, mind that it there will be a overhead though.