locked
Auto-Starting doesn't work!

    Question

  • I have read the post: http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx

    And I am sure about the applicationHost.config and root web.config was well configured, both x86 and x64.

    But when I start the application pool, the Preload function seems never be executed, I get the following error event:

    WebHost failed to process a request.
     Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/53517805
     Exception: System.ServiceModel.ServiceActivationException: The service '/OfficeReporting/ServiceManagement.svc' cannot be activated due to an exception during compilation.  The exception message is: A base address with the uri scheme 'net.pipe' needs to be specified if using service management endpoint 'ServiceManagementNetPipeEndpoint'. Verify a base address exists on the site and the protocol is enabled on the application.. ---> System.Configuration.ConfigurationErrorsException: A base address with the uri scheme 'net.pipe' needs to be specified if using service management endpoint 'ServiceManagementNetPipeEndpoint'. Verify a base address exists on the site and the protocol is enabled on the application.
       at Microsoft.ApplicationServer.Hosting.Configuration.ServiceManagementConfiguration.LoadAndVerifyEndpoints(HashSet`1 enabledUriSchemes, HashSet`1 configuredEndpoints)
       at Microsoft.ApplicationServer.Hosting.Configuration.ServiceManagementConfiguration.GetEnabledEndpoints(Uri[] baseAddresses)
       at Microsoft.ApplicationServer.Hosting.Management.ServiceManagementFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
       --- End of inner exception stack trace ---
       at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
       at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
     Process Name: w3wp
     Process ID: 7660

    Then I googled some articles and they said that the net.pipe should be enabled, but when I added it to protocols, the application generated other 2 error events:

    Log Name:      Application
    Source:        Microsoft-Windows-IIS-W3SVC-WP
    Date:          2011-09-08 17:08:55
    Event ID:      2281
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      xxx
    Description:
    The worker process failed to initialize communication with the W3SVC and therefore could not be started.  The data is the error.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-IIS-W3SVC-WP" Guid="{670080D9-742A-4187-8D16-41143D1290BD}" EventSourceName="W3SVC-WP" />
        <EventID Qualifiers="49152">2281</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2011-09-08T09:08:55.000000000Z" />
        <EventRecordID>21821</EventRecordID>
        <Correlation />
        <Execution ProcessID="0" ThreadID="0" />
        <Channel>Application</Channel>
        <Computer>xxx</Computer>
        <Security />
      </System>
      <EventData>
        <Binary>E7000780</Binary>
      </EventData>
    </Event>

     

    Log Name:      Application
    Source:        Microsoft-Windows-IIS-W3SVC-WP
    Date:          2011-09-08 17:08:55
    Event ID:      2276
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      xxx
    Description:
    The worker process failed to initialize correctly and therefore could not be started.  The data is the error.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-IIS-W3SVC-WP" Guid="{670080D9-742A-4187-8D16-41143D1290BD}" EventSourceName="W3SVC-WP" />
        <EventID Qualifiers="49152">2276</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2011-09-08T09:08:55.000000000Z" />
        <EventRecordID>21822</EventRecordID>
        <Correlation />
        <Execution ProcessID="0" ThreadID="0" />
        <Channel>Application</Channel>
        <Computer>xxx</Computer>
        <Security />
      </System>
      <EventData>
        <Binary>E7000780</Binary>
      </EventData>
    </Event>

    Even I commented out all the codes in the Preload function, the above errors are still there.

    Any idea?

    BTW: How can I debug the Preload function? It couldn't be attached while the w3wp process wasn't launched, and I think that also couldn't be debugged in the Visual Studio ASP.NET Development Server, right?

     

    Thanks!
    dotAge


    • Edited by dotAge Thursday, September 08, 2011 9:52 AM
    Thursday, September 08, 2011 9:49 AM

All replies