Can anyone please give a definitive answer on what all needs to be moved after a service reference has been added by visual studio, in order to get the service reference working correctly on another server running it's own dnn site? (publishing or opening up the website on the server in vs and using it to add the service reference would probably work, but it is not an option available to me; I need to be able to do it without relying on vs to do it for me)
Currently, I am developing modules against an instance of dnn on my local machine. I have written a module that successfully consumes a wcf web service (.svc, not .asmx) that resides on a seperate server. I added the service reference using vs 2008. At the very least, I know vs 2008 creates an App_Webreferences folder and adds a section called <system.serviceModel> to the web.config.
So, I packaged the module into a zip, and installed it on a developement server. In order to try and get the development server's dnn to be able to consume the web service, I copied the App_Webreferences folder and added the <system.serviceModel> section that vs added to my local dnn's web.config, to the development server's dnn web.config file, but that didn't work. The module displayed the following error.
Error: FileStatus is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: c:\Inetpub\wwwroot\DotNetNuke\DesktopModules\FileStatus\ViewFileStatus.ascx.cs(15): error CS0246: The type or namespace name 'WSFileStatus' could not be found (are you missing a using directive or an assembly reference?)...etc...
Where WSFileStatus is the namespace of the web service that I defined when adding the service reference.
This indicates to me that the copy of dnn that is running on our development server is either not communicating properly with the webservice, or does not know where to look for the webservice.
I typed the url of the web service in a browser from the development server, and it does have access to it. I used Windiff to compare both the module's App_Code and DesktopModules directories to verify all of the module's code is the same.
So, it appears that there is something (probably simple, but not obvious) that vs adds to dnn's web site project when adding a service reference, that needs to be copied from my local to the development machine, but I am unsure of what it is. What all needs to be copied and/or modified once a service reference has been added, in order for a dnn instance on another server to successfully consume a web service?
Note: Copying my entire dnn site from my local onto the development server works. That is, the module consumed the web service as expected, so I don't think the problem is with the module, but with the service reference. There just seems to be something that vs 2008 does in addition to creating the App_Webreference folders/files and adding that <system.serviceModel> section to the web.config that I am missing.