2

I have been getting the following error since this morning :(

The requested service, 'http://10.175.156.xx:yyyyy/SomeService.svc' could not be activated. See the server's diagnostic trace logs for more information.

When I opened up the svc logs on Azure, I see the following warnings and errors:

W: Failed to open Ninjet.Extensions.Wcf.NinjectIISHostingServiceHost`1[MyNameSpace.Servicelayer.SomesSrvice W: Faulted Ninject.Extensions.WCf.NinjectIISHostingServiceHost[MyNamespace.ServiceLayer.SomeService] W: ServiceHost faulted

Occasionally, I see the following error followed by the warnings above:

E: Loading performance counters for the service failed. Performance counters will not be available for this service. Instance 'SomeService@||SomeService.svc' already exists in CounterSet 'e829b6db-21ab-453b-83c9-d980ec708edd'. Parameter name: InstanceName

It's been working fine last week and I do not see any changes on Azure.

Btw, it works fine locally.

EDIT: Since I can't answer my own question yet, I'm editing the post to include the "solution" :(

`OK! It looks like the problem was missing some references :(

I added a class library project to the WCF project and that class library references MVC 4.`

qmo
  • 3,128
  • 3
  • 17
  • 23

1 Answers1

0

Two mentioned that the application was working fine and problem started happening. As you mentioned the reference was missing, it is little strange that a running application stop working due to missing reference. Was there any trigger when the problem started appearing i.e. VM recycle, deployment update etc or have you updated previous MVC to MVC4?

About your " Loading performance counters for the service failed" problem, it could be caused by timing issues in tight Close/open sequence of your ServiceHost. ServiceHost does maintains specific performance counters which could not be garbage collected and cause this exception. You could use the code below to workaround this issue:

GC.Collect() 
GC.WaitForPendingFinalizers()

Based on my experience the problem "The requested service, * could not be activated" could happen due to missing specific configuration, timeout occur due to longer connection or runtime issue within the application. It sure is possible that your problem is resolved by adding proper references however you may also need to look at the service configuration as well to further avoid such problem.

AvkashChauhan
  • 20,495
  • 3
  • 34
  • 65