Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WCF服务发送非字符串参数的Nlog目标_C#_Wcf_Nlog - Fatal编程技术网

C# WCF服务发送非字符串参数的Nlog目标

C# WCF服务发送非字符串参数的Nlog目标,c#,wcf,nlog,C#,Wcf,Nlog,据我所知,只有当参数类型为字符串时,NLog配置才能具有WebService/WCF目标。这是真的还是有解决办法?我不打算在WCF服务器上使用ILogReceiverServer实现NLog,只是尝试使用NLog将一些参数传递给远程服务 <target xsi:type="WebService" name="String" url="System.Uri" encoding="Encoding" protocol="E

据我所知,只有当参数类型为字符串时,NLog配置才能具有WebService/WCF目标。这是真的还是有解决办法?我不打算在WCF服务器上使用ILogReceiverServer实现NLog,只是尝试使用NLog将一些参数传递给远程服务

<target xsi:type="WebService"
         name="String"
         url="System.Uri"
         encoding="Encoding"
         protocol="Enum"
         namespace="String"
         methodName="String">
        <parameter layout="Layout" name="String" type="System.Type"/>
        <!-- repeated -->
      </target>

您是要传递自定义类型还是仅传递标准的非字符串参数?标准的非字符串参数。那么它应该可以工作,因为nlog通过Convert.ToString调用webservice时会将参数转换为字符串。但是,web服务必须实现一个接受大量字符串参数的方法。是的,这就是我要说的。我有一个web服务,它已经有了非字符串参数。因此,我认为这是行不通的,我需要在WS端将它们全部转换为字符串参数。您可以尝试使用WCF远程服务,我仍在了解它,但我将链接留给其他人: