This project has moved and is read-only. For the latest updates, please go here.

Install Error

Mar 21, 2012 at 9:28 PM

This is what I keep getting when trying to load the page

 

 

 

Server Error in '/' Application.

The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Resulting in: The underlying provider failed on Open.

Resulting in: An exception occurred while trying to get the value of property 'TicketDesk.Web.Client.MefManager.LuceneDirectory'.

Resulting in: Cannot get export 'TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory")' from part 'TicketDesk.Web.Client.MefManager'.
Element: TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory") --> TicketDesk.Web.Client.MefManager --> DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot set import 'TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory")' on part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory") --> TicketDesk.Domain.Services.TicketSearchService --> DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot get export 'TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService")' from part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService") --> TicketDesk.Domain.Services.TicketSearchService --> DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Resulting in: The underlying provider failed on Open.

Resulting in: An exception occurred while trying to get the value of property 'TicketDesk.Web.Client.MefManager.LuceneDirectory'.

Resulting in: Cannot get export 'TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory")' from part 'TicketDesk.Web.Client.MefManager'.
Element: TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory") --> TicketDesk.Web.Client.MefManager --> DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot set import 'TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory")' on part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory") --> TicketDesk.Domain.Services.TicketSearchService --> DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot get export 'TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService")' from part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService") --> TicketDesk.Domain.Services.TicketSearchService --> DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Resulting in: The underlying provider failed on Open.

Resulting in: An exception occurred while trying to get the value of property 'TicketDesk.Web.Client.MefManager.LuceneDirectory'.

Resulting in: Cannot get export 'TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory")' from part 'TicketDesk.Web.Client.MefManager'.
Element: TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory") -->  TicketDesk.Web.Client.MefManager -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot set import 'TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory")' on part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory") -->  TicketDesk.Domain.Services.TicketSearchService -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot get export 'TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService")' from part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService") -->  TicketDesk.Domain.Services.TicketSearchService -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")
]
   System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition) +338127
   System.ComponentModel.Composition.Hosting.CatalogExport.GetExportedValueCore() +155
   System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy(Export export) +80
   System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore(String contractName, ImportCardinality cardinality) +195
   TicketDesk.Web.Client.MvcApplication.Application_Start() in C:\Projects\Personal\VS2010\TicketDesk\TicketDesk-2-branch\TicketDesk.Web.Client\Global.asax.cs:94

[HttpException (0x80004005): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Resulting in: The underlying provider failed on Open.

Resulting in: An exception occurred while trying to get the value of property 'TicketDesk.Web.Client.MefManager.LuceneDirectory'.

Resulting in: Cannot get export 'TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory")' from part 'TicketDesk.Web.Client.MefManager'.
Element: TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory") -->  TicketDesk.Web.Client.MefManager -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot set import 'TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory")' on part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory") -->  TicketDesk.Domain.Services.TicketSearchService -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot get export 'TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService")' from part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService") -->  TicketDesk.Domain.Services.TicketSearchService -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")
]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4054421
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375

[HttpException (0x80004005): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

Resulting in: The underlying provider failed on Open.

Resulting in: An exception occurred while trying to get the value of property 'TicketDesk.Web.Client.MefManager.LuceneDirectory'.

Resulting in: Cannot get export 'TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory")' from part 'TicketDesk.Web.Client.MefManager'.
Element: TicketDesk.Web.Client.MefManager.LuceneDirectory (ContractName="LuceneDirectory") -->  TicketDesk.Web.Client.MefManager -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot set import 'TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory")' on part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService..ctor (Parameter="indexLocation", ContractName="LuceneDirectory") -->  TicketDesk.Domain.Services.TicketSearchService -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")

Resulting in: Cannot get export 'TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService")' from part 'TicketDesk.Domain.Services.TicketSearchService'.
Element: TicketDesk.Domain.Services.TicketSearchService (ContractName="TicketDesk.Domain.Services.TicketSearchService") -->  TicketDesk.Domain.Services.TicketSearchService -->  DirectoryCatalog (Path="C:\inetpub\wwwroot\TicketDesk\bin")
]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11697344
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4865861


Mar 21, 2012 at 10:14 PM

OK it looks like It is an app pool identity issue, When I switched the app pool to run using the local admin credentials on my test box everyhing worked.

Mar 23, 2012 at 8:06 PM

I'm having the exact same issue.  What exactly did you change to get it working?

Mar 23, 2012 at 9:36 PM

1) I created a new local administrator user account.

2) I created a new application pool in IIS named ticketdesk.

3) In the Advanced settings for the application pool I changed the Identity field from "ApplicationPoolIdentity" to the user account I created in step 1.

Coordinator
Mar 23, 2012 at 9:53 PM

The easiest solution is to simply tell IIS to load the user profile for the app pool. You don't necessarily need to create a different user account. See this thread on SO for more details.

 (image by LaTex)

Mar 23, 2012 at 10:02 PM

I forgot to mention changing the websites assigned application pool.

@StephenRedd, yeah, that would be easier.