WCFErr方法'NameOfViod'没有重载需要x参数 [英] WCFErr No overload for method 'NameOfViod' takes x arguments
本文介绍了WCFErr方法'NameOfViod'没有重载需要x参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,这是我的第一眼和WCF,所以我希望这是一个简单的修复。这是我的代码
Ok this is my first look and WCF so I am hoping this is a simple fix. This is my code
namespace Bibliotheca.InstallMon
{
class InstallMonService : IInstallMon
public void WriteXMLdata(String p_name, String appv, String date_time, String u_name, String IPAddress, String m_name)
{
SomeCode;
}
}
这是我的服务
And this is my service
namespace Bibliotheca.InstallMon
{
[XmlSerializerFormat]
[ServiceContract]
public interface IInstallMon
{
[OperationContract]
void WriteXMLdata(String p_name, String appv, String date_time, String u_name, String IPAddress, String m_name);
}
然后我从这样的客户端应用程序中调用它。
I then call it from a client app like so.
InstallMonClient client = new InstallMonClient();
client.IInstallMon.WriteXMLdata("string", "string", "string", "string", "string", "string");
但不幸的是我在上面错误的地方出错:(。
感谢您的帮助。
But unfortunately I get the above error where am I going wrong :(.
Thanks for your help.
推荐答案
InstallMonClient client = new InstallMonClient();
client .WriteXMLdata("string", "string", "string", "string", "string", "string");.WriteXMLdata("string", "string", "string", "string", "string", "string");
当你打电话给客户时,你不是我们正在创建的客户端
实例。
我用简化的web.config文件替换了web.config文件,一切都开始了工作。
Well I replaced the web.config file with a simplified web.config file and everything started to work.
这篇关于WCFErr方法'NameOfViod'没有重载需要x参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文