www.webdeveloper.com
Results 1 to 9 of 9

Thread: Exception has been thrown by the target of an invocation

Threaded View

  1. #1
    Join Date
    Mar 2010
    Posts
    11

    Exclamation Exception has been thrown by the target of an invocation

    I am writing a ASP.NET (C#) web application. I am using a custom MySQL session provider (session provider class)

    It works great on my production server, but I'm trying to get it to work on my machine so that I can continue developing it, I have run into a few problems while trying to do this, but I have fixed them all except this one.

    When I run the site on my computer through localhost I receive the following error: "Exception has been thrown by the target of an invocation." (Error can be seen in context in the attached image).

    Below are the event contents:

    Code:
    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          1/16/2011 6:30:02 PM
    Event ID:      1310
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      Christopher-PC
    Description:
    Event code: 3008 
    Event message: A configuration error has occurred. 
    Event time: 1/16/2011 6:30:02 PM 
    Event time (UTC): 1/16/2011 5:30:02 AM 
    Event ID: 5b7a15443ee64ba4856923b0fb1bc751 
    Event sequence: 8 
    Event occurrence: 7 
    Event detail code: 0 
     
    Application information: 
        Application domain: /LM/W3SVC/2/ROOT-1-129396289941470000 
        Trust level: Full 
        Application Virtual Path: / 
        Application Path: C:\Users\Christopher\Documents\Twisted Pixel\Twisted Pixel\Pixelate\ 
        Machine name: CHRISTOPHER-PC 
     
    Process information: 
        Process ID: 5476 
        Process name: w3wp.exe 
        Account name: IIS APPPOOL\Pixelate CMS 
     
    Exception information: 
        Exception type: ConfigurationErrorsException 
        Exception message: Exception has been thrown by the target of an invocation. (C:\Users\Christopher\Documents\Twisted Pixel\Twisted Pixel\Pixelate\web.config line 24)
       at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
       at System.Web.SessionState.SessionStateModule.SecureInstantiateProvider(ProviderSettings settings)
       at System.Web.SessionState.SessionStateModule.InitCustomStore(SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.InitModuleFromConfig(HttpApplication app, SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.Init(HttpApplication app)
       at System.Web.HttpApplication.InitModulesCommon()
       at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
       at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
       at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
       at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
    
    Exception has been thrown by the target of an invocation.
       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)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Web.HttpRuntime.CreatePublicInstance(Type type)
       at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
    
    Response is not available in this context.
       at System.Web.HttpContext.get_Response()
       at Pixelate.MySqlSessionStateStore..ctor() in C:\Users\Christopher\Documents\Twisted Pixel\Twisted Pixel\Pixelate\classes\MySqlSessionStateStore.cs:line 75
    
     
     
    Request information: 
        Request URL: http://pixelatecms.com.localhost/pokeintest.aspx 
        Request path: /pokeintest.aspx 
        User host address: 127.0.0.1 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: Christopher-PC\Christopher 
     
    Thread information: 
        Thread ID: 15 
        Thread account name: Christopher-PC\Christopher 
        Is impersonating: False 
        Stack trace:    at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
       at System.Web.SessionState.SessionStateModule.SecureInstantiateProvider(ProviderSettings settings)
       at System.Web.SessionState.SessionStateModule.InitCustomStore(SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.InitModuleFromConfig(HttpApplication app, SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.Init(HttpApplication app)
       at System.Web.HttpApplication.InitModulesCommon()
       at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
       at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
       at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
       at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
     
     
    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">1310</EventID>
        <Level>3</Level>
        <Task>3</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2011-01-16T05:30:02.000000000Z" />
        <EventRecordID>9698</EventRecordID>
        <Channel>Application</Channel>
        <Computer>Christopher-PC</Computer>
        <Security />
      </System>
      <EventData>
        <Data>3008</Data>
        <Data>A configuration error has occurred.</Data>
        <Data>1/16/2011 6:30:02 PM</Data>
        <Data>1/16/2011 5:30:02 AM</Data>
        <Data>5b7a15443ee64ba4856923b0fb1bc751</Data>
        <Data>8</Data>
        <Data>7</Data>
        <Data>0</Data>
        <Data>/LM/W3SVC/2/ROOT-1-129396289941470000</Data>
        <Data>Full</Data>
        <Data>/</Data>
        <Data>C:\Users\Christopher\Documents\Twisted Pixel\Twisted Pixel\Pixelate\</Data>
        <Data>CHRISTOPHER-PC</Data>
        <Data>
        </Data>
        <Data>5476</Data>
        <Data>w3wp.exe</Data>
        <Data>IIS APPPOOL\Pixelate CMS</Data>
        <Data>ConfigurationErrorsException</Data>
        <Data>Exception has been thrown by the target of an invocation. (C:\Users\Christopher\Documents\Twisted Pixel\Twisted Pixel\Pixelate\web.config line 24)
       at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
       at System.Web.SessionState.SessionStateModule.SecureInstantiateProvider(ProviderSettings settings)
       at System.Web.SessionState.SessionStateModule.InitCustomStore(SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.InitModuleFromConfig(HttpApplication app, SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.Init(HttpApplication app)
       at System.Web.HttpApplication.InitModulesCommon()
       at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
       at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
       at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
       at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
    
    Exception has been thrown by the target of an invocation.
       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)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Web.HttpRuntime.CreatePublicInstance(Type type)
       at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
    
    Response is not available in this context.
       at System.Web.HttpContext.get_Response()
       at Pixelate.MySqlSessionStateStore..ctor() in C:\Users\Christopher\Documents\Twisted Pixel\Twisted Pixel\Pixelate\classes\MySqlSessionStateStore.cs:line 75
    
    </Data>
        <Data>http://pixelatecms.com.localhost/pokeintest.aspx</Data>
        <Data>/pokeintest.aspx</Data>
        <Data>127.0.0.1</Data>
        <Data>
        </Data>
        <Data>False</Data>
        <Data>
        </Data>
        <Data>Christopher-PC\Christopher</Data>
        <Data>15</Data>
        <Data>Christopher-PC\Christopher</Data>
        <Data>False</Data>
        <Data>   at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
       at System.Web.SessionState.SessionStateModule.SecureInstantiateProvider(ProviderSettings settings)
       at System.Web.SessionState.SessionStateModule.InitCustomStore(SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.InitModuleFromConfig(HttpApplication app, SessionStateSection config)
       at System.Web.SessionState.SessionStateModule.Init(HttpApplication app)
       at System.Web.HttpApplication.InitModulesCommon()
       at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
       at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
       at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
       at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
    </Data>
      </EventData>
    </Event>
    Thanks for any help anyone can provide.
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles