0

I have some handlers running on the IIS server in Windows server 2019. All this handlers are working fine as expected for all the requests.

Suddenly from yesterday, weirdly server is responding failure for the all the request without any changes on the hosted application. Im not attaching to the debugger or any such debugging tools.

Here is the error:

[Exception: Debugger detected - this software cannot run with Debugger.] AuthorizeService.RegistryProvider.BuildPartition() +68
.cctor() +8

[TypeInitializationException: The type initializer for '' threw an exception.]
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) +119
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232 System.Activator.CreateInstance(Type type, Boolean nonPublic) +83 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1088
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.HttpRuntime.CreateNonPublicInstanceByWebObjectActivator(Type type) +59
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +167
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1068 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +82
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +218
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): The type initializer for '' threw an exception.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10074716
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0

I'm suspecting there is some configuration issue on IIS that needs to be modified. On IIS Manager, [.Net Compilation] => [Debug] already set to [false]. Also, [Server side Debug mode] on ASP set to [False].

Gopichandar
  • 2,742
  • 2
  • 24
  • 54
  • You checked the wrong things. Usually you should check if tools like Debug Diagnostics are installed and activated to attach debuggers to IIS worker processes. – Lex Li Sep 09 '19 at 14:38
  • @LexLi Thanks for the response. I tried investigating the same. Seems like Visual studio is not installed in the server to attach and debug. Is there any other tool over there I need to check? – Gopichandar Sep 09 '19 at 15:58
  • Visual Studio is probably the least likely debugger to be there. There are tons of debuggers https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/ while there can be even more. So if you have no experience on that, open a support case via http://support.microsoft.com – Lex Li Sep 10 '19 at 03:10

1 Answers1

0

Did you insert any dl-ls into the References? They might be old and may not work which is causing the program to not work just go to the Debug of the program, %userprofile%\source\repos{NameOfProgram}{NameOfProgram}\Bin\Debug{ProgramFileName}, and it should start the program. Just don't debug it will give an error while inserting the code of the program. %userprofile% represents current user

code
  • 1