Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Error when starting ASP.NET website

rfb

#1

Hi,

We’ve deployed new web applications in a server and we get this error when we try to browse to it.

If we disable New Relic’s collector then the website starts normally and works without any problem.

Has anyone seen this behaviour before or have any idea on how to troubleshoot this?

Thanks,
Nimesh

=== Pre-bind state information ===
LOG: DisplayName = JetBrains.Annotations, Version=8.0.5.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325
(Fully-specified)
LOG: Appbase = file:///D:/Websites/wwwroot/
LOG: Initial PrivatePath = D:\Websites\wwwroot\bin
Calling assembly : NewRelic.Agent.Extensions, Version=4.0.107.0, Culture=neutral, PublicKeyToken=2e547c9fb8191f05.

LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: D:\Websites\wwwroot\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: JetBrains.Annotations, Version=8.0.5.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/d2ae39c9/c3bc8bb8/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/d2ae39c9/c3bc8bb8/JetBrains.Annotations/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/bin/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/bin/JetBrains.Annotations/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/modulesbin/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/modulesbin/JetBrains.Annotations/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/d2ae39c9/c3bc8bb8/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/d2ae39c9/c3bc8bb8/JetBrains.Annotations/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/bin/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/bin/JetBrains.Annotations/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/modulesbin/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///D:/Websites/wwwroot/modulesbin/JetBrains.Annotations/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/New Relic/.NET Agent/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/New Relic/.NET Agent/JetBrains.Annotations/JetBrains.Annotations.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/New Relic/.NET Agent/JetBrains.Annotations.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/New Relic/.NET Agent/JetBrains.Annotations/JetBrains.Annotations.EXE.

Stack Trace:

[FileNotFoundException: Could not load file or assembly ‘JetBrains.Annotations, Version=8.0.5.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325’ or one of its dependencies. The system cannot find the file specified.]
EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +1508
EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +84
EPiServer.Global…ctor() +91
ASP.global_asax…ctor() +9

[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) +225
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +256
System.Activator.CreateInstance(Type type, Boolean nonPublic) +119
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1975
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +298
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +81
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +289
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +444

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +619
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +739


.net compatibility
#2

Hi @NimeshManmohanlal! I’m going to create a support ticket for you and will contact you from there.


#3

Do we have an update on this?

It takes about 30 seconds before this YSOD disappears and the website actually starts.


#4

Hi @alfnilsson,

The issue @NimeshManmohanlal faced was with EpiServer and the agent’s use of JetBrains Annotations. The agent code contains references to JetBrains.Annotations, but the actual methods can be used whether or not the .dll file is there. Some assembly-scanning tools can misinterpret this absence though, and cause the application to crash, which is what is what we believe causes this issue. EpiServer seems to perform assembly scanning during it’s initialization.

The workaround is to include the JetBrains.Annotations.dll in the bin folder of the application. We have reported this issue to our developers.

Please let me know if you have any questions or need addition information.

-DAvid


#5

I think I know another workaround, but I need help with which assemblies in New Relic are referring to JetBrans.Annotations.

Could you help me with that? Would be easier than scanning your binaries.


#6

@alfnilsson,

Here is a list of the ones with the package loaded that I was able to find:

NewRelic.Agent.Core.dll
NewRelicStatusMonitor.exe
TrayManager.dll
NewRelic.Providers.TransactionContext.Asp.dll
NewRelic.Providers.TransactionContext.Default.dll
NewRelic.Providers.TransactionContext.Wcf3.dll
NewRelic.Providers.Wrapper.Asp35.dll
NewRelic.Providers.Wrapper.MongoDB.dll
NewRelic.Providers.Wrapper.NServiceBus.dll
NewRelic.Core.dll
NewRelic.Providers.Wrapper.Wcf3.dll
NewRelic.Providers.Wrapper.WebServices.dll
NewRelic.Providers.Wrapper.WebApi2.dll
NewRelic.Providers.Wrapper.Mvc3.dll
NewRelic.Providers.Wrapper.WebApi1.dll


#7

Still no solution to this other than to reference the dll in bin folder? I just got this today and this thread was create in June 2015…