report viewer 14 error: Failed to load expression host assembly - webforms

I have a simple .rdlc file which has a parameter defined, when i fill(send) a value to the parameter, i get the error:
Failed to load expression host assembly.
Details: Type 'System.Web.HttpContextWrapper'
in assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
is not marked as serializable.
however, removing the value for the parameter, renders report without any problem.
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report/report1.rdlc");
//If following line commented, there is no problem,
//and report is rendered correctly.
ReportViewer1.LocalReport.SetParameters(new ReportParameter("test1", "some value"));
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", Data));
ReportViewer1.DataBind();
target .net framework is : 4.5.2, project is asp.net webform(web application), Microsoft.ReportingServices.ReportViewerControl.WebForms version 140.1000.523 is added by nuget.
update
I have added System.Web as reference to rdlc file, and now get full error:
[SerializationException: Type 'System.Web.HttpContextWrapper' in assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.]
System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName) +0
Microsoft.ReportingServices.Diagnostics.AssemblyLocationResolver.CreateResolver(AppDomain tempAppDomain) +98
Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.ResolveAssemblylocations(List`1 codeModules, CompilerParameters options, ErrorContext errorContext, AppDomain compilationTempAppDomain) +35
Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.InternalCompile(AppDomain compilationTempAppDomain, Boolean refusePermissions) +377
Microsoft.ReportingServices.RdlExpressions.<>c__DisplayClass2.<Compile>b__0() +19
Microsoft.ReportingServices.Diagnostics.<>c__DisplayClass1.<Run>b__0(Object state) +116
System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state) +13049529
Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback) +99
Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, Boolean refusePermissions, PublishingVersioning versioning) +184
Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase3(ParameterInfoCollection& parameters, Dictionary`2& groupingExprCountAtScope) +1445
Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) +125
Microsoft.ReportingServices.ReportPublishing.ReportPublishing.CreateIntermediateFormat(Byte[] definition, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) +82
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash) +122
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext) +192
[ReportProcessingException: An unexpected error occurred in Report Processing.]
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext) +1006
Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot) +195
[DefinitionInvalidException: The definition of the report 'F:\*****************\report1.rdlc' is invalid.]
Microsoft.Reporting.ReportCompiler.CompileReport(ICatalogItemContext context, Byte[] reportDefinition, Boolean generateExpressionHostWithRefusedPermissions, ControlSnapshot& snapshot) +261
Microsoft.Reporting.LocalService.GetCompiledReport(PreviewItemContext itemContext, Boolean rebuild, ControlSnapshot& snapshot) +228
Microsoft.Reporting.LocalService.CompileReport() +29
Microsoft.Reporting.LocalService.Microsoft.Reporting.ILocalProcessingHost.CompileReport() +5
Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession() +61
[LocalProcessingException: An error occurred during local report processing.]
Microsoft.Reporting.WebForms.LocalReport.EnsureExecutionSession() +149
Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters) +57
Microsoft.Reporting.WebForms.Report.SetParameters(ReportParameter parameter) +48
***********.btnPrint_Click(Object sender, EventArgs e) in F:\************.cs:199
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9782450
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

Related

Server Error in '/' Application after build solution in Visual Studio

Im trying to sync my projects with Sitecore database but when I build the solution provided by Sitecore Learning (Clothing Company), my website is not loaded and an error appears. It was working fine before I try to build it.
`Server Error in '/' Application.
Could not load type 'Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder' from assembly 'Sitecore.Kernel, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'.
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.TypeLoadException: Could not load type 'Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder' from assembly 'Sitecore.Kernel, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'.
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:
[TypeLoadException: Could not load type 'Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder' from assembly 'Sitecore.Kernel, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null'.]
Sitecore.ContentSearch.SolrProvider.DependencyInjection.ContentSearchServicesConfigurator.AddContentSearchHealthChecks(IServiceCollection serviceCollection) +0
Sitecore.DependencyInjection.BaseServicesConfiguratorFactory.Configure(IServiceCollection serviceCollection) +171
Sitecore.DependencyInjection.BaseServicesConfiguratorFactory.Configure(IServiceCollection serviceCollection) +171
Sitecore.DependencyInjection.BaseServiceProviderBuilder.ConfigureServiceCollection() +142
Sitecore.DependencyInjection.ServiceLocator.ConfigureServiceProvider() +225
Sitecore.DependencyInjection.ServiceLocator.get_ServiceProvider() +513
Sitecore.DependencyInjection.SitecorePerRequestScopeModule..ctor() +13
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
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) +142
System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +80
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +234
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1153
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +139
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724`
Looking at error, it seems the Sitecore.Kernel.dll is getting replaced with different version in your website bin or your web.config file is getting replaced which might be having different assembly binding version info for Sitecore.kernel.dll.
I would suggest, check the Sitecore.kernel.dll version from your original website bin, in dotpeek.
Update Sitecore.kernel.dll of this version in your project solution via Nuget manager or update your DLL in your managed lib folder or DLL location folder.
Keep the assembly binding info in solution web.config as same as in the original web.config if you have.
If the DLL version is same both the place already, then load the Sitecore.kernel.dll in dotpeek, check for class Sitecore.HealthCheck.DependencyInjection.HealthChecksBuilder if there or not. If not, then some config file is having an entry for this class. Search word HealthChecksBuilder in App_config folder files, and comment the setting where you find and see if the site is up or not.
Then VS publish hope the issue gets resolved.

Invalid Pointer error while debugging web application in visual studio 2015

I tried to run my web application using F5 key. I am getting invalid pointer error while debugging application.
Also getting below error in "ActivityLog.xml" file of visual studio.
CreateInstance failed for package [Microsoft.VisualStudio.TraceLogPackage.TraceLogPackage]Source: 'mscorlib' Description: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.HubExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.VisualStudio.TraceLogPackage.TraceLogPackage..ctor()
--- End of inner exception 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.RuntimeType.CreateInstanceDefaultCtor(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(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Diagnostics.HubExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Diagnostics.HubExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.VisualStudio.TraceLogPackage.TraceLogPackage..ctor() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I tried many solutions listed as below..
Clear temp files
Reset visual studio environment
Restart system
Repair Visual Studio 2015
But still I am not able to fix this issue. Please help me this fix this.

The service '/app/notificationsregistrationhandler.svc' cannot be activated due to an exception during compilation

On developement site this REST web service works fine but on production site I get this error:
Server Error in '/app' Application.
The specified module could not be found. (Exception from HRESULT: 0x8007007E)
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.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
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:
[FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
>System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +83
System.Web.Compilation.BuildManager.GetCompiledCustomString(String virtualPath) +27
System.ServiceModel.HostingManager.GetCompiledCustomString(String normalizedVirtualPath) +134
System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +25
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479
[ServiceActivationException: The service '/app/notificationsregistrationhandler.svc' cannot be activated due to an exception during compilation. The exception message is: The specified module could not be found. (Exception from HRESULT: 0x8007007E).]
System.ServiceModel.AsyncResult.End(IAsyncResult result) +11653822
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +23
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
web.config on development site is the same on production site (except for datasource connection info).
KB is developed using Genexus EV3 U3 and was migrated from EV2 U7
Development site is Windows 7 sp3 and production site is Windows Server 2008 R2
Production site works fine except for REST web services
URL Rewrite module is configured
anotificationsregistrationhandler.dll is on bin directory
What else can I check?
Could you please empty the following directories:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
And then Restart IIS: cmd.exe "iisreset"
Besides de URL Rewrite Module, you must also enable the following Windows Features:
1).NET Framework 4.5 Advanced Services -> WCF Services -> HTTP Activation
2) Microsoft .NET Framework 3.5 -> Windows Communication Foundation HTTP-Activation

could not load type 'Nancy.Hosting.Aspnet.NancyHttpRequestHandler' on apphb

That is the errormessage when I deploy a website project to appharbor.
And have no idea where to start looking...
Any push in the right direction would be great, thanks!
More details:
[HttpException (0x80004005): Could not load type 'Nancy.Hosting.Aspnet.NancyHttpRequestHandler'.]
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +9671464
System.Web.Configuration.HandlerFactoryCache.GetTypeWithAssert(String type) +38
System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +13
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +19
System.Web.HttpApplication.GetFactory(String type) +86
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +262
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Fluent NHibernate - Configure Oracle Data Provider ODP

I am brand new to NHibernate and Fluent NHibernate and I am trying to get the following confguration to work.
private static ISessionFactory CreateSessionFactory()
{
return Fluently.Configure()
.Database(
OracleDataClientConfiguration.Oracle10.ConnectionString("Data Source=mysource;User ID=myid;Password=mypwd;")
)
.Mappings(m =>
m.FluentMappings.AddFromAssemblyOf<Program>())
.BuildSessionFactory();
}
I have the Oracle.DataAccess assembly referenced. I am using VS 2010 and .Net 4
I get the following exception :
FluentNHibernate.Cfg.FluentConfigurationException was unhandled
Message=An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
Source=FluentNHibernate
StackTrace:
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in d:\Builds\FluentNH\src\FluentNHibernate\Cfg\FluentConfiguration.cs:line 98
at HibernateLearning.Program.CreateSessionFactory() in C:\Projects\CPS Test Concepts\Main\Source\CPSTestConcepts\Source\HibernateLearning\Program.cs:line 48
at HibernateLearning.Program.Main(String[] args) in C:\Projects\CPS Test Concepts\Main\Source\CPSTestConcepts\Source\HibernateLearning\Program.cs:line 21
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: NHibernate.HibernateException
Message=Could not create the driver from NHibernate.Driver.OracleDataClientDriver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
Source=NHibernate
StackTrace:
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary2 settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary2 settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary2 settings)
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary2 properties)
at NHibernate.Cfg.Configuration.BuildSettings()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in d:\Builds\FluentNH\src\FluentNHibernate\Cfg\FluentConfiguration.cs:line 93
InnerException: System.Reflection.TargetInvocationException
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
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.Activator.CreateInstance(Type type)
at NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type)
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 settings)
InnerException: NHibernate.HibernateException
Message=The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use element in the application configuration file to specify the full name of the assembly.
Source=NHibernate
StackTrace:
at NHibernate.Driver.ReflectionBasedDriver..ctor(String driverAssemblyName, String connectionTypeName, String commandTypeName)
at NHibernate.Driver.OracleDataClientDriver..ctor()
InnerException:
I figured it out. When you reference the ODP you have to set the the copy local property of the reference to true otherwise it won't find the objects it is looking for.
One hurdle down, I'm sure there will be more but I am loving these tools!
Paul
You might also get this problem if you have a mismatch between the platforms of the ODP dll and the platform of your application (x86 vs x64). Change your project to compile against the correct platform.

Resources