Getting 'Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider'' when trying to load ITMS Management Views
search cancel

Getting 'Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider'' when trying to load ITMS Management Views

book

Article ID: 161782

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

When trying to load console pages that use Silverlight, like Manage > Computers, Manage > Policies, the Console loads those frames but the content is missing. It is just blank.

When you look at the NS Logs, many error entries appears referring to:​

    • Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider' from assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
    • 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.

When you try to run"localhost/Altiris/ActivityCenter/Service/SoftwareService.svc" page from the IE browser (to validate that ITMS Management Views (formally known as ActivityCenter or ECV), you get the same error message:

Server Error in '/Altiris/ActivityCenter/Service' Application.

--------------------------------------------------------------------------------

Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider' from assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
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.


Exception Details: System.TypeLoadException: Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider' from assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[TypeLoadException: Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider' from assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
   System.ServiceModel.Channels.TextMessageEncoderFactory..ctor(MessageVersion version, Encoding writeEncoding, Int32 maxReadPoolSize, Int32 maxWritePoolSize, XmlDictionaryReaderQuotas quotas) +0
   System.ServiceModel.Channels.HttpChannelListener..ctor(HttpTransportBindingElement bindingElement, BindingContext context) +164
   System.ServiceModel.Channels.HttpChannelListener`1..ctor(HttpTransportBindingElement bindingElement, BindingContext context) +30
   System.ServiceModel.Channels.HttpTransportBindingElement.BuildChannelListener(BindingContext context) +173
   System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +177
   System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession) +393
   System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result) +572
   System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +1908
   System.ServiceModel.ServiceHostBase.InitializeRuntime() +90
   System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +175
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +740
   System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +125
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +901

[ServiceActivationException: The service '/Altiris/ActivityCenter/Service/SoftwareService.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not load type 'System.Runtime.Diagnostics.ITraceSourceStringProvider' from assembly 'System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'..]
   System.Runtime.AsyncResult.End(IAsyncResult result) +622882
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +196075
   System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282
 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009

Environment

ITMS 8.x

ITMS Management Views 8.x

Cause

In this particular case .NET 4.5 was giving errors.

In the Event Logs under Applications, you could see this same error appearing.

Resolution

This issue can be resolved by installing .NET 4.5.2 (http://www.microsoft.com/en-us/download/details.aspx?id=42642)

After this, you will need to restart the server and the issue should be fixed.