Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tri Mandir Prajapati 42 posts 60 karma points
    Jun 09, 2017 @ 15:51
    Tri Mandir Prajapati
    0

    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(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()

  • Marcel Wege 4 posts 84 karma points
    Jun 09, 2017 @ 17:16
    Marcel Wege
    1

    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

  • Tri Mandir Prajapati 42 posts 60 karma points
    Jul 05, 2017 @ 03:25
    Tri Mandir Prajapati
    0

    Hello Marcel,

    Here is the line from 240+ in web.config.

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear />
        <remove name="UmbracoMembershipProvider"/>
        <add name="UmbracoMembershipProvider" type="Umbraco.Web.Security.Providers.MembersMembershipProvider, Umbraco" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="8" useLegacyEncoding="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Member" passwordFormat="Hashed" />
        <add name="UsersMembershipProvider" type="Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="8" useLegacyEncoding="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
      </providers>
    </membership>
    

    Regards

    Tri Mandir

  • Nick 1 post 71 karma points
    Jul 05, 2017 @ 06:27
    Nick
    0

    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

  • Camilla Skibsted 14 posts 84 karma points
    May 08, 2018 @ 07:59
    Camilla Skibsted
    0

    Hi Tri,

    How did you solve this?

    /Camilla

  • patrick iversen 15 posts 40 karma points
    Sep 22, 2019 @ 20:18
    patrick iversen
    3

    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

  • Matty 34 posts 148 karma points
    Jun 04, 2020 @ 03:35
    Matty
    0

    That fixed it for me, thank you very much patrick!

Please Sign in or register to post replies

Write your reply to:

Draft