An Unhandled Execution Error on opening oracle connection - c#

I'm using oracle ODP.Net library but I'm getting an Unhandled Execution Error at the cnn.open(); line without even one word in it's "message" property.
the most important point is that, this problem exists in my WCF project an not elsewhere.
Oracle.DataAccess.Client.OracleConnection cnn =
new Oracle.DataAccess.Client.OracleConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)) (CONNECT_DATA=(SID=orcl)));User Id=masoud;Password=123;");
cnn.Open();
more detail:
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: Oracle.DataAccess.Client.OracleException:
Stack Trace:
[OracleException (0x80004005)]
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable) +1336
Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +70
Oracle.DataAccess.Client.OracleConnection.Open() +8141
Fig.TradingSystem.Services.App_Code.Bootstrapper.AppInitialize() in d:\App_Code\Bootstrapper.cs:29
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
System.Web.Compilation.BuildResultMainCodeAssembly.CallAppInitializeMethod() +146
System.Web.Compilation.CodeDirectoryCompiler.CallAppInitializeMethod() +27
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +36
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +530
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9913572
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
What do you think?

Related

IIS Express: System.ComponentModel.Win32Exception: Access is denied

I just upgraded from VS 2015 to VS 2019. I create a standard MVC project, execute and this error appears "System.ComponentModel.Win32Exception: Access is denied" in the standard 500 error page.
I didn't change anything in the default microsoft code of the standard project.
Tried to execute VS as administrator but nothing changes.
I know there are a lot of people with this problem but they are all talking about problems in production, this happens to me when I start the app in debug from Visual Studio.
The processes of VS and IIS Express are owned by my user with administrator privileges.
Thanks in advance for the help.
Full error: ("Accesso negato" is italian for "Access denied")
Server Error in '/' Application.
Accesso negato
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.Win32Exception: Accesso negato
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:
[Win32Exception (0x80004005): Accesso negato]
[ExternalException (0x80004005): Cannot execute a program. The command being executed was "D:\Documenti\LavoriProgetti\MABE23\Grafoplast\Siglature\Siglature\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths #"C:\Users\Discount Elettronica\AppData\Local\Temp\Temporary ASP.NET Files\vs\48e6051c\3d3b0e0b\xcsytsyz.cmdline".]
System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +7083507
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine) +118
System.CodeDom.Compiler.Executor.ExecWaitWithCapture(IntPtr userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName) +85
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.Compile(CompilerParameters options, String compilerFullPath, String arguments, String& outputFile, Int32& nativeReturnValue) +274
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames) +682
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames) +186
System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames) +25
System.Web.Compilation.AssemblyBuilder.Compile() +985
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +10223794
System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +10113866
System.Web.Compilation.BuildManager.CompileGlobalAsax() +47
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +274
[HttpException (0x80004005): Cannot execute a program. The command being executed was "D:\Documenti\LavoriProgetti\MABE23\Grafoplast\Siglature\Siglature\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths #"C:\Users\Discount Elettronica\AppData\Local\Temp\Temporary ASP.NET Files\vs\48e6051c\3d3b0e0b\xcsytsyz.cmdline".]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +65
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +458
System.Web.Compilation.BuildManager.CallAppInitializeMethod() +35
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +605
[HttpException (0x80004005): Cannot execute a program. The command being executed was "D:\Documenti\LavoriProgetti\MABE23\Grafoplast\Siglature\Siglature\bin\roslyn\csc.exe" /shared /keepalive:"900" /noconfig /fullpaths #"C:\Users\Discount Elettronica\AppData\Local\Temp\Temporary ASP.NET Files\vs\48e6051c\3d3b0e0b\xcsytsyz.cmdline".]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10080656
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +99
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +263

How to fix System.IO.DirectoryNotFoundException in Windows Server IIS-10 when using Network Path in Owin.FileSystems PhysicalFileSystem

I have a .NET Framework 4.5 Website using Microsoft.Owin PhysicalFileSytem. In my workstation the website is running smoothly when hosting to IIS but when deploying to Windows Server IIS it throws a DirectoryNotFoundException. I'm using a shared folder as my network path in PhysicalFileSystem.
In the Windows Server I have already set the ApplicationPool Identity to Administrator account and set the Website Connect As to Administrator account
var fileSystem = new PhysicalFileSystem("\\10.12.50.40\Contents\");
var options = new FileServerOptions
{
FileSystem = fileSystem,
EnableDirectoryBrowsing = false,
RequestPath = "/InSysStorage/WebContent"
};
app.UseFileServer(options);
Exception:
Server Error in '/InSysReport' Application. \10.12.50.40\Contents\
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.DirectoryNotFoundException: \10.12.50.40\Contents\
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:
[DirectoryNotFoundException: \10.12.50.40\Contents]
Microsoft.Owin.FileSystems.PhysicalFileSystem..ctor(String root) +74
InSys.Report.Startup.Configuration(IAppBuilder app) in D:\TEAM
PROJECTS\InSys.HRMS\Development\Solution\Web\InSys.Report\Startup.cs:29
[TargetInvocationException: Exception has been thrown by the target of
an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object
target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
Object[] parameters, Object[] arguments) +150
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
+101 Owin.Loader.<>c__DisplayClass18_1.b__0(IAppBuilder
builder) +66
Owin.Loader.<>c__DisplayClass9_0.b__0(IAppBuilder
builder) +123
Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass5_0.b__0(IAppBuilder
builder) +81
Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1
startup) +462
Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
System.Threading.LazyInitializer.EnsureInitializedCore(T& target,
Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication
context) +106
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +536
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +296
[HttpException (0x80004005): Exception has been thrown by the target
of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10043408
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +254

The pre-application start initialization method... Run WebActivatorEx.ActivationManager - Exception has been thrown by the target of an invocation

I keep getting this error, usually after changing the web.config on a running ASP.NET MVC azure web service app. It will run fine the first time but after it recompiles after changing the web.config this is usually appearing. I think it happens sometimes by just starting and stopping the web app. The only way I can make it go away is by publishing the app again from visual studio to azure.
Method not found: 'Microsoft.Practices.Unity.IUnityContainer MyProject.Core.ContainerManager.GetConfiguredContainer()'.
The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation
Source File: D:\MyProject-master\src\MyProject.Web\App_Start\UnityMvcActivator.cs Line: 73
StackTrace
MissingMethodException: Method not found:
'Microsoft.Practices.Unity.IUnityContainer
MyProject.Core.ContainerManager.GetConfiguredContainer()'.]
MyProject.Web.App_Start.UnityWebActivator.Start() in D:\MyProject-master\src\MyProject.Web\App_Start\UnityMvcActivator.cs:73
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +87
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +73
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +350
WebActivatorEx.ActivationManager.Run() +78
[InvalidOperationException: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +615
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +141
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
System.Web.Compilation.BuildManager.ExecutePreAppStart() +157
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +549
[HttpException (0x80004005): The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10075124
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
This question seems very close to my issue but I haven't gotten this solution to work, there are two projects in my solution that use the RegisterTypes method:
interface and cannot be constructed on Unity config
These questions were related but not exactly this issue:
https://stackoverflow.com/questions/21078380/webactivatorex-dll-unity-bootstrap-is-firing-on-a-different-project
ActivationManager Exception during build process?
Unity Bootstrapper from NuGet is throwing error on App_Start
EDIT: If I merge the application into single assemblies during deployment the issue doesn't seem to happen anymore.
Install-Package Microsoft.AspNet.WebHelpers
For me, this turned out to be a problem where I was trying to inject something null into something that required a value -- didn't actually have anything to do with the error. For instance, I had a configuration setting that was missing, and it was trying to inject that missing setting somewhere. Once I realized which injection was going awry and fixed it, the error went away.

Blogengine.net asp.net exception

I was using blogengine.net and was configured to run on XML provider. But today when I opened the site, it's giving an exception.
You must reset your password using ALTER USER statement before executing this statement.
[MySqlException (0x80004005): You must reset your password using ALTER USER statement before executing this statement.]
That's weird because I'm using XML as provider and this exception is saying that I'm using SQL. I have also viewed web.config with these lines
<BlogEngine>
<blogProvider defaultProvider="DbBlogProvider" fileStoreProvider="XmlBlogProvider">
<providers>
<add description="Xml Blog Provider" name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core" />
<add connectionStringName="BlogEngine" description="Sql Database Provider" name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" />
</providers>
</blogProvider>
<blogFileSystemProvider defaultProvider="XmlBlogProvider">
<providers>
<add description="Xml Blog Provider" name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlFileSystemProvider, BlogEngine.Core" />
<add storageVariable="BlogEngine" description="Sql Database Provider" name="DbBlogProvider" type="BlogEngine.Core.Providers.DbFileSystemProvider, BlogEngine.Core" />
<!--<add storageVariable="\\UNCPath\BlogFiles" description="UNC Path Provider" name="UNCBlogProvider" type="BlogEngine.Core.Providers.UNCFileSystemProvider, BlogEngine.Core"/>-->
</providers>
</blogFileSystemProvider>
</BlogEngine>
Updated
[MySqlException (0x80004005): You must reset your password using ALTER USER statement before executing this statement.]
MySql.Data.MySqlClient.MySqlStream.ReadPacket() +342
MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) +383
MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +121
MySql.Data.MySqlClient.MySqlDataReader.NextResult() +1109
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +2538
BlogEngine.Core.Providers.DbBlogProvider.FillBlogs() +274
BlogEngine.Core.Blog.get_Blogs() +182
BlogEngine.Core.Blog.get_CurrentInstance() +516
BlogEngine.Core.Right.EnsureBlogInstanceDataLoaded() +38
BlogEngine.Core.Right..cctor() +777
[TypeInitializationException: The type initializer for 'BlogEngine.Core.Right' threw an exception.]
BlogEngine.Core.Right..ctor() +0
[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) +138
System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1481
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +191
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +82
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +229
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1114
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +140
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
How do I fix it?

System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)

As best as I can tell, this error has occurred in the past when Ninject is and the target for the site package are 4.x and do not match each other. I have checked on my machine and they match - both are 4.0.
I did just spend some time updating all the Nu-Get packages in my project. Prior to that, this error did not occur.
How can I eliminate this error?
Here is my full error output:
enter code here
Server Error in '/' Application.
Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'.
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.MissingMethodException: Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'.
Source Error:
Line 29: DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule));
Line 30: DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule));
Line 31: bootstrapper.Initialize(CreateKernel);
Line 32: }
Line 33:
Source File: C:\My Documents\Alcon_DEV\SecurityMasterData\Dev\Alcon.SecurityMasterData.WebUI\App_Start\NinjectWebCommon.cs Line: 31
Stack Trace:
[MissingMethodException: Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'.]
Ninject.Injection.DynamicMethodInjectorFactory.Create(ConstructorInfo constructor) in c:\Projects\Ninject\ninject\src\Ninject\Injection\DynamicMethodInjectorFactory.cs:48
Ninject.Planning.Strategies.ConstructorReflectionStrategy.Execute(IPlan plan) in c:\Projects\Ninject\ninject\src\Ninject\Planning\Strategies\ConstructorReflectionStrategy.cs:67
Ninject.Planning.<>c__DisplayClass1.<CreateNewPlan>b__0(IPlanningStrategy s) in c:\Projects\Ninject\ninject\src\Ninject\Planning\Planner.cs:109
Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map(IEnumerable`1 series, Action`1 action) in c:\Projects\Ninject\ninject\src\Ninject\Infrastructure\Language\ExtensionsForIEnumerableOfT.cs:32
Ninject.Planning.Planner.CreateNewPlan(Type type) in c:\Projects\Ninject\ninject\src\Ninject\Planning\Planner.cs:109
Ninject.Planning.Planner.GetPlan(Type type) in c:\Projects\Ninject\ninject\src\Ninject\Planning\Planner.cs:71
Ninject.Activation.Providers.StandardProvider.Create(IContext context) in c:\Projects\Ninject\ninject\src\Ninject\Activation\Providers\StandardProvider.cs:77
Ninject.Activation.Context.Resolve() in c:\Projects\Ninject\ninject\src\Ninject\Activation\Context.cs:157
Ninject.<>c__DisplayClass10.<Resolve>b__c(IBinding binding) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:386
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
System.Linq.<CastIterator>d__b1`1.MoveNext() +92
System.Linq.Enumerable.Single(IEnumerable`1 source) +196
Ninject.ResolutionExtensions.Get(IResolutionRoot root, IParameter[] parameters) in c:\Projects\Ninject\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:37
Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin.CreateDependencyResolver() in c:\Projects\Ninject\ninject.web.mvc\mvc3\src\Ninject.Web.Mvc\NinjectMvcHttpApplicationPlugin.cs:83
Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin.Start() in c:\Projects\Ninject\ninject.web.mvc\mvc3\src\Ninject.Web.Mvc\NinjectMvcHttpApplicationPlugin.cs:54
Ninject.Web.Common.Bootstrapper.<Initialize>b__0(INinjectHttpApplicationPlugin c) in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\Bootstrapper.cs:52
Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map(IEnumerable`1 series, Action`1 action) in c:\Projects\Ninject\ninject\src\Ninject\Infrastructure\Language\ExtensionsForIEnumerableOfT.cs:32
Ninject.Web.Common.Bootstrapper.Initialize(Func`1 createKernelCallback) in c:\Projects\Ninject\Ninject.Web.Common\src\Ninject.Web.Common\Bootstrapper.cs:52
Alcon.SecurityMasterData.WebUI.App_Start.NinjectWebCommon.Start() in C:\My Documents\Alcon_DEV\SecurityMasterData\Dev\Alcon.SecurityMasterData.WebUI\App_Start\NinjectWebCommon.cs:31
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +241
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +611
WebActivatorEx.ActivationManager.RunPreStartMethods(Boolean designerMode) +50
WebActivatorEx.ActivationManager.Run() +80
[InvalidOperationException: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +591
[HttpException (0x80004005): The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9010364
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
That method not exists in .net 4.5 - before then, Delegate.CreateDelegate should be used instead. It sounds to me like maybe NInject is incorrectly using that method in a 4.0 nuget package, in which case you should report that as a bug in NInject.
The first thing to do is to check you are using the correct version of the dll, i.e. specifically a 4.0 build.
After that, one of:
roll back to an earlier NInject version
upgrade your .net framework version
download the code, fix it, and submit a patch

Categories

Resources