Error on SQL tools - sql-server

I am not sure what is the problem here. I tried to know better about this exception but all the details refer to the C# programming.
------ Build started: Project: ReportV, Configuration: Debug ------ Skipping 'DataSourceV.rds'. Item is up to date. Skipping
'DataSetV.rsd'. Item is up to date. Skipping 'Report1.rdl'. Item is up
to date. Fin de la génération -- 0 errors, 0 warnings
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ========== System.ServiceModel.CommunicationObjectFaultedException: The communication object,
System.ServiceModel.Channels.ClientFramingDuplexSessionChannel, cannot
be used for communication because it is in the Faulted state.
Server stack trace: at
System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
at System.ServiceModel.Channels.OutputChannel.BeginSend(Message
message, TimeSpan timeout, AsyncCallback callback, Object state) at
System.ServiceModel.Dispatcher.DuplexChannelBinder.BeginRequest(Message
message, TimeSpan timeout, AsyncCallback callback, Object state) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartSend(Boolean
completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureOpen(IAsyncResult
result, Boolean completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureOpen(Boolean
completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureInteractiveInit(IAsyncResult
result, Boolean completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureInteractiveInit()
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) at
Microsoft.ReportDesigner.Design.IPreviewProcessing.BeginSetItemPath(String
itemPath, AsyncCallback callback, Object asyncState) at
Microsoft.ReportDesigner.Design.PreviewProcessingClient.BeginSetItemPath(String
itemPath, AsyncCallback callback, Object asyncState) at
Microsoft.ReportDesigner.Design.WCFProcessingHost.<>c__DisplayClass1.b__0(AsyncCallback
ac, Object s) at
Microsoft.ReportDesigner.Design.WCFProcessingHost.<>c__DisplayClass3b.b__39()
at
Microsoft.ReportDesigner.Design.WCFProcessingHost.ExecuteWcfCall(Action
wcfCall) at
Microsoft.ReportDesigner.Design.WCFProcessingHost.ExecuteAsyncCall(Func`3
beginAction, AsyncCallback endAction) at
Microsoft.ReportDesigner.Design.WCFProcessingHost.set_ItemContext(PreviewItemContext
value) at
Microsoft.Reporting.WinForms.LocalReport.ChangeReportDefinition(DefinitionSource
updatingSourceType, Action changeAction) at
Microsoft.Reporting.WinForms.LocalReport.set_ReportPath(String value)
at Microsoft.ReportDesigner.Design.PreviewFrame.RefreshPreview()

This error message is related with the duplex WCF service.
The client can not consummate WCF due to the problem in WCF or connection between server and client.
Give as the code where stack trace is shown.

Related

Exception while reading from stream ---> System.IO.IOException

I use Postgresql-13 in my ASP MVC NET 6 project, occasionally, I face this issue below:
Npgsql.NpgsqlException (0x80004005): Exception while reading from stream ---> 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 (10054): An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count) at Npgsql.Internal.NpgsqlReadBuffer.g__EnsureLong|41_0(NpgsqlReadBuffer buffer, Int32 count, Boolean async, Boolean readingNotifications) at Npgsql.Internal.NpgsqlReadBuffer.g__EnsureLong|41_0(NpgsqlReadBuffer buffer, Int32 count, Boolean async, Boolean readingNotifications) at Npgsql.Internal.NpgsqlConnector.RawOpen(SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt) at Npgsql.Internal.NpgsqlConnector.g__OpenCore|191_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt) at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.ConnectorPool.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.ConnectorPool.g__RentAsync|28_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlConnection.g__OpenAsync|45_0(Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlConnection.Open() at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action2 paramReader) in /_/Dapper/SqlMapper.cs:line 2847 at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 581 at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 452
my ConnectionString to Postgresql-13 was:
"Server=xxx.xxx.xxx.xxx;Database=mydb;User ID=myuserid;Password=mypassword;Keepalive=30; Connection Idle Lifetime=300; Tcp Keepalive=true";
my postgresql.conf
shared_buffers = 256MB
and my sysctl.conf
kernel.shmmax=100663296
why did it happen?, what should I check?
Potential causes are:
Session had hit an inactivity timeout and was terminated. ==> You can try adding/changing CommandTimeout parameter to more than default of 30 seconds.
Connection used an authentication token, which had expired.
Database connection listener service had been restarted, possibly due to patching or automated code deployment. ==> You could add code to reconnect and run a simple "heartbeat" query like SELECT CURRENT_DATE;

Exception has been thrown by the target of an invocation. (REDIS Cache)

I'm trying to resolve an issue we have specific to using REDIS cache on our web apps but need help understanding the stacktrace.
We intermittently get Exception has been thrown by the target of an invocation logged in our error table when users are viewing the report viewer, but there are no signs client side that anything has gone wrong.
I've had a read through this article: How to solve: "exception was thrown by the target of invocation" C# however it doesn't seem to cover our specific issue.
The stacktrace logged by our logger;
at System.RuntimeMethodHandle.SerializationInvoke(IRuntimeMethodInfo method, Object target, SerializationInfo info, StreamingContext& context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at Microsoft.Web.Redis.BinarySerializer.Deserialize(Byte[] data) in D:\BuildAgent\work\f55792526e6d9089\src\Shared\BinarySerializer.cs:line 37
at Microsoft.Web.Redis.ChangeTrackingSessionStateItemCollection.GetData(String normalizedName) in D:\BuildAgent\work\f55792526e6d9089\src\Shared\ChangeTrackingSessionStateItemCollection.cs:line 156
at Microsoft.Web.Redis.ChangeTrackingSessionStateItemCollection.get_Item(String name) in D:\BuildAgent\work\f55792526e6d9089\src\Shared\ChangeTrackingSessionStateItemCollection.cs:line 141
at System.Web.SessionState.HttpSessionStateContainer.get_Item(String name)
at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor()
at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType)
at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Looks to be an issue during Deserialization. Could the class definition have changed between when it was serialized and when it is being deserialized?

Why am I getting "Unable to load the specified metadata resource" error?

I have an MVC5 web application which I usually develop using my laptop.
I am trying to get the app running on my main machine at home for home-working days but have a problem connecting to the local dev database on SQL Server - when I start the app I get the following error:
More info 30/11/16:
Note that the model is generated from EDML using Entity Developer
Unable to load the specified metadata resource. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
The solution consists of 2 projects, one of which is an entity model project which is generated from EDMX.
Note: On my main machine (where it isn't working) the connection string in Web.config is the same as the machine where it works except for Data Source which refers to the SQL Server name on the main machine - I have checked this is correct several times:
I have read several Stack Overflow posts with similar issues - most point to something wrong with the path to the csdl, ssdl, msl part of the connection string.
I have:
Checked the server name is correct in the connection string
Checked the database name is correct in the connection string
Checked the database exists and is available
Checked each of the three files are where the connection string says they are (they are)
Tried using wildcard in the connection string: res://*/dllname.csdl|res://*/dllname.ssdl|res://*/dllname.msl
Update 30/11/2016:
From the suggestions in this link I have:
Checked the MetadataArtifactProcessing property - it is not set to Copy to Output directory
Checked the connection string
We don't have a post-compile task
From the suggestion in this link I have tried setting the connection string connectionString="metadata=res://*/;
Stack Trace:
[MetadataException: Unable to load the specified metadata resource.]
System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderResource.LoadResource() +85
System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderResource.CreateReader() +10
System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderResource.CreateReaders(DataSpace spaceToGet) +72
System.Data.Entity.Core.Metadata.Edm.MetadataArtifactLoaderComposite.CreateReaders(DataSpace spaceToGet) +99
System.Data.Entity.Core.Metadata.Edm.MetadataCache.LoadEdmItemCollection(MetadataArtifactLoader loader) +41
System.Data.Entity.Core.Metadata.Edm.<>c__DisplayClass5.<GetMetadataWorkspace>b__0(String k) +37
System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +72
System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetMetadataWorkspace(String cacheKey, MetadataArtifactLoader artifactLoader) +75
System.Data.Entity.Core.Metadata.Edm.MetadataCache.GetMetadataWorkspace(DbConnectionOptions effectiveConnectionOptions) +126
System.Data.Entity.Core.EntityClient.EntityConnection.GetMetadataWorkspace() +43
System.Data.Entity.Core.Objects.ObjectContext.RetrieveMetadataWorkspaceFromConnection() +20
System.Data.Entity.Core.Objects.ObjectContext..ctor(EntityConnection connection, Boolean isConnectionConstructor, ObjectQueryExecutionPlanFactory objectQueryExecutionPlanFactory, Translator translator, ColumnMapFactory columnMapFactory) +393
System.Data.Entity.Core.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +35
App.Models.Entities..ctor() in C:\Users\Me\Desktop\App\App.MVC5\App.Entities.cs:37
App.MVC5.Models.CurrentUser..ctor(Boolean IsGuiDetailsRequired) in C:\Users\Me\Desktop\App\App.MVC5\Models\AccountModels.cs:87
App.MVC5.Controllers.HomeController..ctor() in C:\Users\Me\Desktop\App\App.MVC5\Controllers\HomeController.cs:11
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +114
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
System.Activator.CreateInstance(Type type) +11
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +55
[InvalidOperationException: An error occurred when trying to create a controller of type 'App.MVC5.Controllers.HomeController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +178
System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +76
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +88
Castle.Proxies.Invocations.IControllerFactory_CreateController.InvokeMethodOnTarget() +118
Castle.DynamicProxy.AbstractInvocation.Proceed() +80
Glimpse.Core.Extensibility.CastleInvocationToAlternateMethodContextAdapter.Proceed() +11
Glimpse.Core.Extensions.AlternateMethodContextExtensions.TryProceedWithTimer(IAlternateMethodContext context, TimerResult& timerResult) +41
Glimpse.Core.Extensibility.AlternateMethod.NewImplementation(IAlternateMethodContext context) +25
Glimpse.Core.Extensibility.AlternateTypeToCastleInterceptorAdapter.Intercept(IInvocation invocation) +84
Castle.DynamicProxy.AbstractInvocation.Proceed() +108
Castle.Proxies.IControllerFactoryProxy.CreateController(RequestContext requestContext, String controllerName) +214
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +194
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +50
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +103
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
There's a very popular question over there and from its rating I can assume it helped a lot of people. It even mentions a blog post with complete troubleshooting for this problem. Also, this answer looks like something you didn't try yet.

Navigating between Silverlight islands causes exceptions in Firefox 9+ and Chrome, but not IE 9

I have a few Silverlight applications in my website. Each are on their own page and do not interact with each other. I'm using Silverlight 5 and WCF Data Services for data access.
IE has been working great, but when I switch between the two while the first one is in the middle of getting data from the WCF Data Service (or we also have a .aspx page that is serving up xml in the code behind and it happens there as well).
It's throwing some seemingly random exceptions and I'm not sure how to handle them. Any ideas on how to avoid these, or cancel calls when the url changes in FF?
Chrome reports my WCF Data Service webget request as canceled and undefined.
Here's a list of what I've captured so far:
{System.InvalidOperationException: Failed to Invoke: callOpen.
at System.Windows.Browser.ScriptObject.Invoke(String name, Object[] args)
at System.Data.Services.Http.ScriptObjectUtility.CallOpen(ScriptObject request, String method, String uri)
at System.Data.Services.Http.ScriptXmlHttpRequest.Open(String uri, String method, Action readyStateChangeCallback)
at System.Data.Services.Http.XHRHttpWebRequest.InvokeRequest()
at System.Data.Services.Http.XHRHttpWebRequest.BeginGetResponse(AsyncCallback callback, Object state)
at System.Data.Services.Client.BaseAsyncResult.InvokeAsync(Func3 asyncAction, AsyncCallback callback, Object state)
at System.Data.Services.Client.QueryResult.BeginExecute()
at System.Data.Services.Client.DataServiceQuery1.BeginExecute(AsyncCallback callback, Object state)
.....
HttpWebResponse.NormalizeResponseStatus....
{System.InvalidOperationException: get_BrowserInformation failed.
at System.Windows.Browser.HtmlPage.get_BrowserInformationInternal()
at System.Windows.Browser.HtmlPage.get_BrowserInformation()
{System.InvalidOperationException: An error occurred while processing this request. ---> System.Data.Services.Http.WebException: Internal error at 'HttpWebResponse.NormalizeResponseStatus'.
at System.Data.Services.Http.XHRHttpWebResponse.NormalizeResponseStatus(Int32& statusCodeParam)
at System.Data.Services.Http.XHRHttpWebResponse..ctor(XHRHttpWebRequest request, Int32 statusCode, String responseHeaders)
at System.Data.Services.Http.XHRHttpWebRequest.CreateResponse()
at System.Data.Services.Http.XHRHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Data.Services.Client.QueryResult.AsyncEndGetResponse(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Data.Services.Client.BaseAsyncResult.EndExecute[T](Object source, String method, IAsyncResult asyncResult)
at System.Data.Services.Client.QueryResult.EndExecute[TElement](Object source, IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceRequest.EndExecute[TElement](Object source, DataServiceContext context, IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceQuery1.EndExecute(IAsyncResult asyncResult)
at DataService.<>c__DisplayClass61.b__1(IAsyncResult iar)}
Firebug is showing:
Firebug:
attempt to run compile-and-go script on a cleared scope
Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.open]
[Break On This Error]
...ge to get source for: http://localhost/Visiconn/Pages/Administration/ViewDisplay...
[System.Data.Services.Http.WebException] = {System.Data.Services.Http.WebException: Internal error at 'ScriptXmlHttpRequest.CreateNativeRequest'.
at System.Data.Services.Http.ScriptXmlHttpRequest.CreateNativeRequest()
at System.Data.Services.Http.XHRHttpWebRequest.InvokeRequest()
at Syst...

Error communicating with WCF WPF app hosted in Windows Service

When there are two different machines access the same WCF service is the error below:
Exception throw:
=+=+ BASE EXCEPTION:
APLICATION: mscorlib
ERROR: The socket connection was aborted. This may have
caused by an error processing your message, a timeout
reception exceeded by the remote host or by a problem of network resource
underlying. The local socket timeout was '00: 30:00 '.
CALLSTACK:
Server stack trace:
in
System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32
offset, Int32 size, TimeSpan timeout, Boolean closing)
in
System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset,
Int32 size, TimeSpan timeout)
in
System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32
offset, Int32 size, TimeSpan timeout)
in
System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)
in
System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan
timeout)
in
System.ServiceModel.Channels.FramingDuplexSessionChannel.Receive(TimeSpan
timeout)
in
System.ServiceModel.Channels.FramingDuplexSessionChannel.TryReceive(TimeSpan
timeout, Message& message)
in
System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message,
TimeSpan timeout)
in
System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway,
ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
in
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
methodCall, ProxyOperationRuntime operation)
in
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
in
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,
IMessage retMsg)
in
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
in
Evolution.WCF.Contract.IMenuService.GetFullMenu(Int32 userId, Int32 softwareId)
in
Evolution.CompanyPage.MenuVertical.btn_Menu_Click(Object sender,
RoutedEventArgs e) =+=+ INNER EXCEPTION:
APLICATION: System
ERRO: Was forced to cancel an existing connection by remote host
CALLSTACK:
in System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
size, SocketFlags socketFlags)
in
System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32
offset, Int32 size, TimeSpan timeout, Boolean closing) END INNER EXCEPTION =+=+
END BASE EXCEPTION =+=+ =+=+=+=+=+=+=+=+=+=+=+=+ END EXCEPTION
=+=+=+=+=+=+=+=+=+=+=+=+
It seems to me that you are having a timeout exception. Try increasing the timeout option of your service.
Also, sometimes you can get this exception if you have a problem with the security related setting of WCF service endpoing. Try disabling it (for testing purposes) and see if you still get the problem. More info about how to disable it here.

Resources