When I run this code via WCF Test Client with the localhost address, it is working.
string batch = "C:/Users/Administrator/Desktop/Batch/tvPower.lnk";
Process.Start(batch);
return "done";
*I used lnk ( Shortcut link) instead of bat because i need to run the command in admin mode but i wasnt able to do so. The nearest workaround was to use lnk.
But when I tried to run this code via WCF Test Client with the hosted ip, it is not working and return the following error.
"Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service."
The following is the stack,
Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Ix10Service.A1On() at Ix10ServiceClient.A1On()
Can anyone point me to the right direction on how can I get this working?
Thanks!