Reputation: 237
As mentioned in title, I keep getting the exception of
"The message could not be processed because the action \u0027http://tempuri.org/MegaService/GetData\u0027 is invalid or unrecognized."
Let explain current situation.
I have two services 1) web service (ASP.NET MVC Web application) and 2) WCF service which is called "MegaService". The web service calls functions in the MegaService. They are both existing services and working fine.
I have added some new functions in the MegaService for new features which are called by the web service. Everything is working fine on my local machine (Visual Studio), which means that I can call the functions in the MegaService from the web service and get data out of the call. I work in Visual Studio.
To apply those new functions to the server, 1) I have updated reference of MegaService in the web service (in the Visual Studio like when you right click service reference and update reference) 2) Copy all the dll files in the bin directory of my local machine's visual studio project and replace dll files in the server with them.
Here is a problem. I can still call the existing (old) functions of MegaService but when I try to call the updated functions in the MegaService, I just end up getting this exception: "The message could not be processed because the action \u0027http://tempuri.org/MegaService/GetData\u0027 is invalid or unrecognized."
I have already updated service reference and I confirmed that the dll file of service reference is also updated by modified date of the file. I can still communicate to the MegaService and call existing functions but I can't only call the newly updated functions of the MegaService.
Can you guys think of any possible problem and solution, please?
Upvotes: 0
Views: 1606
Reputation: 4191
You don't have a code included. I am not sure if this is work but you can try:
Config File:
Under AppSettings
<appSettings>
<add key="EndPointAddress" value="http://localhost:1920/Service1.svc"/>
</appSettings>
Under system.serviceModel
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:1920/Service1.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService1" contract="ServiceReference1.IService1"
name="BasicHttpBinding_IService1" />
</client>
</system.serviceModel>
Make sure your endpoint address is absolutely right (Server Side).
Upvotes: 1