Could not find a result for the specified execution ID - qlikview

I am using QMC QlikView service for refreshing the documents. When I am calling the TriggerTask method of service, it is creating the task execution id successfully. But, with the same task execution id when I am hitting the GetEDXTaskStatus method to get the status for first 2-3 times it is saying "Running" but after some time it is throwing the error as:-
System.Exception: Could not find a result for the specified execution
ID "XXX"
Stack Trace:-
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)
Please let me know if anyone has faced this issue before.

Related

WCF Sync Framework Existing connection was forcibly closed by the remote host

Update This appears to be caused by the server running out of physical memory.
I am using WCF sync framework to upload ~200,000 records to a database. By using SQL Server Profiler, I was able to verify that the web server received the records and started writing them to the database. After writing about ~60,000 records, the web server throws an exception. In one attempt, the exception was thrown after 7 minutes; in another attempt, the exception was thrown after 9 minutes. Stack trace.
System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to https://ecosystems.icfwebservices.com/Services/EDT/DataCacheSync.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.
---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
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)
I have several web.config settings in place that are intended to prevent a timeout from occurring.
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0"></compilation>
<httpRuntime executionTimeout="100000" />
</system.web>
</configuration>
Since you are using WCF, you need to set your binding timeout settings in the config file.
But I don't think it is a timeout problem, because the exception appears after a different amount of time.
The current exception information you have, is not detailed enough and cannot help you. I suggest you turn on WCF tracing on the service side in order to see the real problem.

SSIS to SSRS communication issue

I have an SSIS package that retrieves a days worth of information from a data warehouse into a table in SQL Server and then exports that data to a flat file.
The package then generates a PDF report from the same data that was exported.
In order to export the PDF file, the report had to be created in SSRS and published to a URL the SSIS package could get to.
The package contains three connection managers, one to SQL Server, one to the Flat File and one to SSRS via an HTTP Connection Manager.
The HTTP Connection Manager allows me to create a connection to my SSRS instance and there is a button on that dialog that allows you to test the connection.
The connection tests correctly and I receive a success message.
I have done this exact thing in numerous other environments and it works correctly.
Some things to be aware of are, I created this package on another machine and copied it to numerous environments. Because of this, I use a configuration file to store many of the settings the package uses, file paths, login credentials and other things.
I also made sure that the connection settings were correct and that I could browse to the Report Server and view the report I am trying to download in SSIS.
When I execute the package, I receive the following error message from the package:
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: Exception from HRESULT: 0xC001600E ---> System.Runtime.InteropServices.COMException (0xC001600E): Exception from HRESULT: 0xC001600E
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSHttpClientConnection100.DownloadFile(String FileName, Boolean vbOverwriteDestination)
at Microsoft.SqlServer.Dts.Runtime.HttpClientConnection.DownloadFile(String fileName, Boolean OverwriteDestination)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.HttpClientConnection.DownloadFile(String fileName, Boolean OverwriteDestination)
at ST_6b197a6290df4aff91a6881078049a14.csproj.ScriptMain.Main()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
That's about all I can think of that would be useful, but if you have any questions, I'll be monitoring this thread for a couple of hours.
Thanks.

Transfer larger file using WCF service with basichttpbinding

I'm getting below error when I try to transfer more than 150MB files.
System.ServiceModel.CommunicationException was unhandled
Message="An error occurred while making the HTTP request to http://localhost:2122/Service1.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
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 Cleint.ServiceReference1.IService1.UploadFile(RemoteFileInfo request)
at Cleint.ServiceReference1.Service1Client.Cleint.ServiceReference1.IService1.UploadFile(RemoteFileInfo request) in D:\MCT_Work\Sample Projects\WCFFileTransferTest\Cleint\Service References\ServiceReference1\Reference.cs:line 81
at Cleint.ServiceReference1.Service1Client.UploadFile(String fileName, Stream fileByteStream) in D:\MCT_Work\Sample Projects\WCFFileTransferTest\Cleint\Service References\ServiceReference1\Reference.cs:line 88
at Cleint.Program.Main(String[] args) in D:\MCT_Work\Sample Projects\WCFFileTransferTest\Cleint\Program.cs:line 20
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.WebException
Message="The underlying connection was closed: An unexpected error occurred on a send."
Source="System"
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
InnerException: System.IO.IOException
Message="Unable to write data to the transport connection: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full."
Source="System"
StackTrace:
at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
at System.Net.Connection.Write(ScatterGatherBuffers writeBuffer)
at System.Net.ConnectStream.ResubmitWrite(ConnectStream oldStream, Boolean suppressWrite)
InnerException: System.Net.Sockets.SocketException
Message="An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"
Source="System"
ErrorCode=10055
NativeErrorCode=10055
StackTrace:
at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
InnerException:
By default, the transferMode is buffer, so the large messages are bufferred in memory. If you've access to change Service destination (code), I'd suggest to use transfer mode Streaming or MTOM message encoding to exchange such a large messages/files.
Why are you trying to transmit 150MB across a web service boundary? This design will almost certainly cause you availability issues on the service endpoint.
A better design would be to write the file to disk somewhere, and then send a command message to the service to pick up the file.

A property with the name 'httpRequest' is not present

I've ran into an interesting problem using the Azure Service Management API. Specifically, when I try any operation, I get a "Server Error in '/' Application.
A property with the name 'httpRequest' is not present. ".
This only happens in one project and I can't reproduce it with creating other projects.
I've tried reading Fusion logs, because I've suspected there's a problem with assembly versions, but it turns out not to be the case.
I also tried readding references, which also didn't work.
I'm stuck - does anybody have a clue?
<InnerException i:nil="true"></InnerException>
<Message>A property with the name 'httpRequest' is not present.</Message>
<StackTrace>
Server stack trace:
at System.ServiceModel.Channels.MessageProperties.get_Item(String name)
at Microsoft.Toolkit.WindowsAzure.ServiceManagement.ClientOutputMessageInspector.BeforeSendRequest(Message& request, IClientChannel channel)
at System.ServiceModel.Dispatcher.ImmutableClientRuntime.BeforeSendRequest(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.PrepareCall(ProxyOperationRuntime operation, Boolean oneway, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin()
at System.ServiceModel.Channels.ServiceChannel.BeginCall(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, TimeSpan timeout, AsyncCallback callback, Object asyncState)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeBeginService(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)
</StackTrace>
The solution is described in detail here. But you need a nudge in the right direction, which is nutoriously difficult to find. We've had the same issue a while ago so I've written a blog post about httpRequest not being present exception (WCF).
To summarize, wrap your call to the code in:
using (new OperationContextScope((IContextChannel)channel))
{
// ... my code
}

EF 4, POCO Template - getting error on splitting across namespaces

I am following the steps as outlined on MSDN Blogs > ADO.NET team blog > Walkthrough: POCO Template for the Entity Framework.
I created a simple model in the Keith.Data Project (and Namespace). I created a Keith.Model Project and added it to the solution, dropped the Class.cs file, dragged and dropped the DataEntities.tt file into the Keith.Model project and added a reference to Keith.Model in my Keith.Data project. I then changed the path reference in the DataEntities.tt file from #"DataModel.edmx" to #"..\Keith.Data\DataModel.edmx". When I saved it I got this error:
Running transformation: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Unable to locate file
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
at Microsoft.VisualStudio.TextTemplating.VSHost.TextTemplatingService.ResolvePath(String path)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.DynamicHost.ResolvePath(String path)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.MetadataLoader.TryCreateEdmItemCollection(String sourcePath, String[] referenceSchemas, EdmItemCollection& edmItemCollection)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.MetadataLoader.CreateEdmItemCollection(String sourcePath, String[] referenceSchemas)
at Microsoft.VisualStudio.TextTemplating6A60439B68BD2BCE671B842FB15E35C4.GeneratedTextTransformation.TransformText()
at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result)
Anyone run into this and know what the problem is? I am sure I missed something but for the life of me I cannot figure out what.
TIA
I replicated the scenario you mentioned and got the same error when the Path to the .edmx file in POCO.tt (DataEntities.tt in your scenario) was wrong. Double check if the path you have specified is correct.
I use EF4/POCO but have all my entitites defined in code not an edmx so I'm not an expert in the approach you're using...
That said, a simple way to identify what the app is doing: download the sysinternals Proces Monitor and point it at VS - then have a look at what files it's trying to access (filter on DataModel.edmx). This will at least tell you where it's expecting the file to be - it's possible your relative path is incorrect.
I'm sure other devs with more experience in this topic can give you a better answer but this is how I'd approach solving it...