0
StackTrace 3/9/2025 11:15:55 AM
Object reference not set to an instance of an object.
Source File: /UserLogin.aspx?ReturnUrl=%2f
Stack Trace: 
   at System.Web.HttpApplication.GetFactory(String type)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

So that's all the information I am provided with. So how do I add code or otherwise determine exactly what is null?

According to my logging, the error occurs immediately after Global.Application_Start finishes. The WebForms based website's default page is Default.aspx with the user being redirected to Userlogin.aspx to perform the login.

Can I safely assume the error is located within the UserLogin.aspx page?

No errors are recorded in the Event Viewer.

Later:

Further to the above, the above error occurs whenever a request is received after deleting app_offline.htm . For the first time after many tries, the following error was recorded in the event log whilst the site was off_line and the following detailed request was made.

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Date:          09-Mar-25 3:07:25 PM
Event ID:      1309
Task Category: Web Event
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-68N83BL
Description:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 3/9/2025 3:07:25 PM 
Event time (UTC): 3/9/2025 4:07:25 AM 
Event ID: 2a41ce4c8d90409ca534165f90ed1050 
Event sequence: 1 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT-6-133859668450365885 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\Program Files\webserver\htdocs\ 
    Machine name: DESKTOP-68N83BL 
 
Process information: 
    Process ID: 12156 
    Process name: w3wp.exe 
    Account name: IIS APPPOOL\<redacted> 
 
Exception information: 
    Exception type: TypeInitializationException 
    Exception message: The type initializer for '<Module>' threw an exception.
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

Attempted to access an unloaded AppDomain.
   at .cctor()

 
 
Request information: 
    Request URL: https://<redacted>.com.au:443/isonline.html 
    Request path: /isonline.html 
    User host address: 14.200.189.202 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: IIS APPPOOL\<redacted> 
 
Thread information: 
    Thread ID: 49 
    Thread account name: IIS APPPOOL\<redacted> 
    Is impersonating: False 
    Stack trace:    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
 
 
Custom event details: 

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="ASP.NET 4.0.30319.0" />
    <EventID Qualifiers="32768">1309</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>3</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2025-03-09T04:07:25.1803273Z" />
    <EventRecordID>389809</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-68N83BL</Computer>
    <Security />
  </System>
  <EventData>
    <Data>3005</Data>
    <Data>An unhandled exception has occurred.</Data>
    <Data>3/9/2025 3:07:25 PM</Data>
    <Data>3/9/2025 4:07:25 AM</Data>
    <Data>2a41ce4c8d90409ca534165f90ed1050</Data>
    <Data>1</Data>
    <Data>1</Data>
    <Data>0</Data>
    <Data>/LM/W3SVC/1/ROOT-6-133859668450365885</Data>
    <Data>Full</Data>
    <Data>/</Data>
    <Data>C:\Program Files\<redacted>\webserver\htdocs\</Data>
    <Data>DESKTOP-68N83BL</Data>
    <Data>
    </Data>
    <Data>12156</Data>
    <Data>w3wp.exe</Data>
    <Data>IIS APPPOOL\<redacted></Data>
    <Data>TypeInitializationException</Data>
    <Data>The type initializer for '&lt;Module&gt;' threw an exception.
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)

Attempted to access an unloaded AppDomain.
   at .cctor()

</Data>
    <Data>https://<redacted>.com.au:443/isonline.html</Data>
    <Data>/isonline.html</Data>
    <Data>14.200.189.202</Data>
    <Data>
    </Data>
    <Data>False</Data>
    <Data>
    </Data>
    <Data>IIS APPPOOL\<redacted></Data>
    <Data>49</Data>
    <Data>IIS APPPOOL\<redacted></Data>
    <Data>False</Data>
    <Data>   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args)
   at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
   at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
</Data>
  </EventData>
</Event>

Is it possible that this error is not cleared and causes the headed exception?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.