Reputation: 11393
Q:
Recently , i face some problems, i have a dll common among a lot of applications,and any change to this dll require to build it, copy and paste it in each bin folder of these applications ,and add the new reference so i decided to convert this dll to a web service in stead to overcome this overload.. I make a web service application contains set of web services(mapping to each class).
I face some problems here:
In the original dll, there are classes use methods exist in other classes in the same dll, and i face problems when i tried to use web service methods in other web service class.how to fix this problem.
In the original dll there are set of static classes with static methods.how to make the equivalent in my web service application.
Any overload method cause a problem in my web service.
When using Dictionary<string, string>
as a parameter in my method.
Note:the original dll
contains the connections to the data base. Is converting it to web service is the optimum solution?which one is faster in my case a web service or the dll?Should i tend to WCF
instead of?
thanks in advance.
Upvotes: 1
Views: 291
Reputation: 2518
In my applications I usually have all related projects in the same solution. But when I need to use projects across applications I replace the project for a dll reference.
Because I use Subversion I solve the problem of copying the dll by adding an external property do my libs folder, referencing the build of the dll.
If the external dll is updated very often than you probably need a continuous integration system to handle that for you.
Upvotes: 1
Reputation:
I usually add project reference and keep all my projects under single solution, so I do not have file copy issue. You might be missing project reference, instead you could have used assembly reference. Verify that first.
First advice, don't create a web service if you don't know what it is and how it can be used. People tend to think everything is a web service since creating a web service in WCF is so easy by using visual studio tools. Since you ask like converting DLL to a web service, I assume that you are beginning with learning web service.
All you need is kind of continues integration system otherwise a simple build system which does the build for you and it copies the files wherever depended applications folder. Hence you can save your time for coping files manually. When you do this, you will not have any of those 4 problems you have mentioned.
If you are lazy enough to learn the build system, simply write a batch file that would copy the files for you. I do have batch files which does xcopy files.
Upvotes: 1