Reputation: 131
I deployed a web service to iis 7, it was working all the way right. Then I wanted to update the code of a web method in the web service.
I recompiled the service and updated the dll in the iis directory with the new one.
My problem is when I invoke the service, it invokes the older code.
I tried changing the number of parameters passed to a web method inside the service, and when invoking it still sees the older parameters which I erased.
Upvotes: 2
Views: 6144
Reputation: 2025
Web services after Framework 2.0, are compiled as DLL files by default as far as I know. Normally, this happens when you PUBLISH the website and webservice, or when you use Web Applications.. But in WebServices, Visual Studio compiles the output as DLL. Therefore, you should compile your dll and update on the IIS. Even though you see the CS code files on IIS folder, they are not being used. Only the asmx file (not asmx.cs) are used to map the code in the dll.
Upvotes: 2
Reputation: 7193
rebuild the solution, And deploy the service on IIS. It will work definitily
Upvotes: 0
Reputation: 64943
It seems that you need to update your service reference.
Go to the project who's using the service, left-click the service reference in your solution explorer and finally choose "Update Service Reference".
Maybe I'm wrong and you did it, but as you don't mention that in your question, this is my suggestion.
Upvotes: 0
Reputation: 886
I am guessing that the old code is cached. Try restarting IIS. That should cleanup any remnants of the old code.
Upvotes: 0