WCF Service strange Exception from Windows 8 Machine - wcf

I have a WCF Service that I am consuming in a web-application and I get strange behaviour from my Windows 8 machine:
When I compile the project from Windows 8, I get the following exception when trying to connect to the WCF Service:
The underlying connection was
closed: A connection that was expected to be kept alive was closed by
the server.
I get the same exception when I deploy it onto a Windows Server 2008.
However, if I compiled the project from Windows 7 and deploy it to the server, it works just fine.
I am using Visual Studio 2012 in both cases, although one is Premium and one is Ultimate.
After a lot of testing, it seems like when I just build and deploy the project often enough, at some point it will work, without having changed anything. It seems like the chance of getting a working project is about one in five. The Service works consistently, then, though.
If any of you have an idea what could be going on, that would be nice. If you need more info let me know.

Related

Blazor Server - Slow load or unresponsive but still loading on browser (deployed to Windows Server 2016. IIS8)

Good Day everyone
We are currently testing our first Blazor Server application that is deployed on our Staging Server (Windows Server 2016 with IIS 8), we have noticed that, when the application is accessed by multiple users and doing some testing process, the application becomes slow, or sometimes when accessing the site again, the browser still loads the application but without rendering the design, we check it using the dev tools in google chrome, and on the network tab, it says "pending" under the time column.
We tried to ping the application, and it returns without too much latency, I don't know if this application side or on the server or the network, we deploy the project similar to our ASP.NET Core MVC projects, we are all testing the applications on our homes, because of the global pandemic.
Is there a different setup for Blazor Server when deploying to IIS?
I hope someone can help us with this.
Thanks, everyone, and regards.
Edit
We found the suspect, It's the Visual Studio JIT Debugger, yes we install VS2019 on our Staging Server, it's weird that we haven't encounter this from our other web application, is it because the project is in Blazor Server? when we check the server the JIT is running, and then the app is working again, I think when the application encounters an error, this shows up on the server side, and when it reach 3 JIT on the process, it will not continue to load the application.
I search for this and the answers is to disable the JIT Debugger, either in VS or in the register, is disabling this is the best solution??
Thanks again everyone.

asp.net mvc web application page loading slowness issue

we have developed an application using ASP.NET/C# MVC 4.0, SQL SERVER 2012 DB, Entity Framework, WCF Service.
application website is hosted on IIS 10 and the operating system used is Windows Server 2016 and this is standalone WEB server dedicated for our project.
application WCF web service is hosted using Windows Service and this is standalone APP server dedicated for our project.
application database is hosted on SQL Farm and this is a common database server, where other projects databases (more than 60) are also hosted.
application is already running absolutely fine in PROD environment from couple of years.
but suddenly from couple of months, we started facing as intermittent issue and i.e. application slow response
There are no errors, but the response time is too long, and sometimes it doesn't respond either, the browser keeps waiting for the web server.
customer has complained that his web application gets slow sometimes.
It happens at random times, the system just gets slow then after few hours (2-3) it gets back on track with normal response times.
this slowness issue is affecting only to one specific MVC View, whereas other MVC views are rendering correctly at the same time when slowness issue occurs.
error handling is already in place in the .net code, but nothing gets logged in error log file.
also DBA has confirmed that there are no issues on the SQL Farm and none of the other projects apart from us has reported slowness issue whose database is also hosted on the SQL Farm.
when tried to reproduce the same issue on UAT with the same PROD database copy & same user, was not able to reproduce it.
UAT environment is exactly similar for WEB & APP server.
only in case of UAT database server, we do not have SQL Farm here. we have standalone database server dedicated for our project.
here tried doing some R&D and verified few things, but still unable to resolve the issue.
so could you please guide me here that what should i do/verify to resolve this issue.
thank you in advance for your inputs.

MDbgProcess WaitHandle not receiving signals from w3wp

In trying to construct a managed debugger in C#, we are using the code from Microsoft.Samples.Debugging.MdbgEngine. The WaitHandle for our MDbgProcess receives signals from the underlying process just fine for console apps, winform apps, and IIS hosted ASP.Net apps on localhost. Once we move the target application, specifically the IIS hosted ASP.Net app to a server 2008 and 2012 OS, the WaitHandle stops receiving signals. We've tried lots of debugging steps, including but not limited to:
Copying dev builds of the application onto the server
Building debugger and target against
AnyCPU
x86
x64
Layering in exhaustive diagnostic messaging
Installing Visual Studio on the server and building everything there
Trying different app pools and different app pool settings
Has anyone ever used these components for ASP.Net on a server OS or have any ideas what might be going on?
https://github.com/SymbolSource/Microsoft.Samples.Debugging
thx

Ninject 2.0 incompatibility with Server 2008 R2?

I'm dev'ing an MVC 2 website targeting .NET 4.0 and using Ninject 2.0 (dev box running Win 7 64 pro). All is going well on the dev side, I really enjoyed using Ninject and it works a charm.
Until I deploy it to the server. Once I deploy the app to the server (a virtual machine running Win Server 2008 R2 x64, IIS 7.5) the ninject binding appear to simply not happen. I was first getting a null reference exception on the Logger that I was calling in OnApplicationStarted, I manually bound that and I got another null reference exception the very next time the code called for an injected component. Manually changing that one pushes the problem down the line.
I'm not getting any errors at all locally, and I'm not getting errors in the event log other than the null reference exceptions on injected components.
I have already verified that the server has .Net 4.0, MVC 2's dll, both Ninject DLLs and the DLLs of all my components. I was compiling against "any cpu" as well, in release mode.
Any ideas or known bugs w/ the platform I've described?
I'd post source code except that I figured it's not relevant since it's working locally unchanged.
Ninject works fine on Server 2008 R2. If you are experiencing a difference in functionality between your machine and the server, then something is different in your setup. There is no way to help you with the information you have provided so far. Please create a sample project that exhibits the issue and it will be a lot easier to help you.
-Ian

My WCF service works fine on a Windows 7 Enterprise machine but fails when hosted on windows server 2003 (Same Code)

We have been using a Windows 7 Enterprise machine for development and we have 7 wcf services.... All of them worked fine in the development machine... When we hosted the same services in Windows Server 2003 and IIS 6, we are facing a couple issues... One of the services is throwing a "An existing connection was forcibly closed by the remote host" error... the underlying connection gets closed right in the service call.... I have turned on logging with log4net and I have turned on tracing... In trace logs I found out that it completes almost all the steps and stops at the end of Execute step... So I put log4net debug statements in the code and it looks like the code is executing fine, retrieving the values from the database fine but it is shutting down the connection at the point when its returning the data. So right at the moment of returning the data some exception is closing down the connection... And I am not able to figure out why or whats causing the error... And the same code works fine in Windows 7 Enterprise machine... So I wasnt sure to look for code problems or is it some special setup that IIS 6.0 needs... Do you guys have any idea what might be wrong with the situation... thanks for any help.
And there is another service that shows an error "The requested service, 'XXXXXXXXXXXXXXXXX' could not be activated"... Frequent calls like immediate calls to same service seems to be causing this error.. Is there a way this can be avoided because some of the services seem to exhibit this behavior in Windows server 2003- IIS 6 and they all run just fine on the windows 7 machine?
Yes I enabled MessageLogging and found whats the first error.... It is failing to serialize the reason for that being - the response is assigned the objects from the request. So in Windows 7 it is allowing it and keeping the references alive but Windows Server 2003 discards all request objects so by the time response serializes some of the object references are no longer valid in windows 2003 and hence shuts down the connection. So that solves the first. So I just created a new object at the service and copied over the values and it started working.