Built a client app that polls the WCF service hosted on IIS7 at timed intervals. I cannot for the life of me understand why I get "Input string is not in the correct format" error at the exact same minute every day, i.e. 4:50am. Checked Event Viewer, nothing there... Is it the SQL Server, VM, network or...?
Here's the error and the StackTrace:
Input string was not in a correct format. Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter 开发者_StackOverflowfaultConverter) 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 MyApplication.GenericService.IGenericService.GetCommands(String fileName, CompanyCredentials credentials, String sequence) at MyApplication.GenericService.GenericServiceClient.GetCommands(String fileName, CompanyCredentials credentials, String sequence) at MyApplication.ApplicationClass.RunCommands(String sequence)
A few things that you could check:
- Are you sending a date time as a string, and there is a diffence in the time format betweem the macines?
- Is recycling of app pool run just before 4:50 so that the first call after recyling allways fails
- How are the credentials being sent? Have the credentials expired?
精彩评论