Hello,
I just deploy the umbraco project in hosting server, but giving following error.
Exception information:
Exception type: TargetInvocationException
Exception message: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Owin.Loader.DefaultLoader.<>cDisplayClass12.b(IAppBuilder builder)
at Owin.Loader.DefaultLoader.<>cDisplayClass1.0(IAppBuilder builder)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.<>cDisplayClass2.0(IAppBuilder builder)
at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action1 startup)
at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action1 startup)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Exception has been thrown by the target of an invocation. (h:\root\home\samantapra-001\www\site1\web.config line 242)
at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
at System.Web.Configuration.ProvidersHelper.InstantiateProviders(ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType)
at System.Web.Security.Membership.InitializeSettings(Boolean initializeGeneralSettings, RuntimeConfig appConfig, MembershipSection settings)
at System.Web.Security.Membership.Initialize()
at System.Web.Security.Membership.get_Providers()
at Umbraco.Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider()
at Umbraco.Web.UmbracoDefaultOwinStartup.ConfigureServices(IAppBuilder app)
at Umbraco.Web.UmbracoDefaultOwinStartup.Configuration(IAppBuilder app)
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, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at System.Web.HttpRuntime.CreatePublicInstance(Type type)
at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
Object reference not set to an instance of an object.
at Umbraco.Web.Security.Providers.MembersMembershipProvider..ctor()
Did you check the database credentials? I've had the same 'weird' error message. Turned out that Umbraco didn't have the correct user rights on the database. Thus not being able to initialize the membershipprovider
Also see:
Object reference not set to an instance of an object. at Umbraco.Web.Security.Providers.MembersMembershipProvider..ctor()
I stumbled upon the same error message when deploying to Unoeuro server and it wasn't a error I had seen before. Turns out when uploading the files I forgot to include the Global.asax file, when I uploaded that one the error went away.
Configuration error in web.config
Hello, I just deploy the umbraco project in hosting server, but giving following error. Exception information: Exception type: TargetInvocationException Exception message: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Owin.Loader.DefaultLoader.<>cDisplayClass12.b(IAppBuilder builder) at Owin.Loader.DefaultLoader.<>cDisplayClass1.0(IAppBuilder builder) at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.<>cDisplayClass2.0(IAppBuilder builder) at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action
1 startup) at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action
1 startup) at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)Exception has been thrown by the target of an invocation. (h:\root\home\samantapra-001\www\site1\web.config line 242) at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType) at System.Web.Configuration.ProvidersHelper.InstantiateProviders(ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType) at System.Web.Security.Membership.InitializeSettings(Boolean initializeGeneralSettings, RuntimeConfig appConfig, MembershipSection settings) at System.Web.Security.Membership.Initialize() at System.Web.Security.Membership.get_Providers() at Umbraco.Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider() at Umbraco.Web.UmbracoDefaultOwinStartup.ConfigureServices(IAppBuilder app) at Umbraco.Web.UmbracoDefaultOwinStartup.Configuration(IAppBuilder app)
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, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at System.Web.HttpRuntime.CreatePublicInstance(Type type) at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
Object reference not set to an instance of an object. at Umbraco.Web.Security.Providers.MembersMembershipProvider..ctor()
Hy Tri,
Seems you are trying to add a missing membership provider in your web.config. Is it possible that you will post Line 240+ from your web.config?
Best regard
Marcel
Hello Marcel,
Here is the line from 240+ in web.config.
Regards
Tri Mandir
Did you check the database credentials? I've had the same 'weird' error message. Turned out that Umbraco didn't have the correct user rights on the database. Thus not being able to initialize the membershipprovider
Also see: Object reference not set to an instance of an object. at Umbraco.Web.Security.Providers.MembersMembershipProvider..ctor()
And the code: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs
It fails because there is no current context
Hi Tri,
How did you solve this?
/Camilla
I stumbled upon the same error message when deploying to Unoeuro server and it wasn't a error I had seen before. Turns out when uploading the files I forgot to include the Global.asax file, when I uploaded that one the error went away.
/Patrick
That fixed it for me, thank you very much patrick!
is working on a reply...