Copied to clipboard

Flag this post as spam?

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

  • James Mangubat 2 posts 84 karma points
    Jun 25, 2019 @ 14:22
    James Mangubat

    No factory has been set.

    Hello! I'm new to Umbraco. When a project is ran, we encountered an error: "Exception Details: System.InvalidOperationException: No factory has been set."

    Stack Trace:

    [InvalidOperationException: No factory has been set.] Umbraco.Core.Composing.Current.get_Factory() +86 Umbraco.Web.Composing.ModuleInjector`1.Init(HttpApplication context) +325 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +584 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): No factory has been set.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724

    Any clue how this can be resolved please? Any help would be appreciated.

  • mrosiak 2 posts 95 karma points
    Jun 25, 2019 @ 18:46

    Did you replace Global.asax? It happened to me when I copied my Global.asax from previous Umbraco 7 didn't realise the approach to invoking code on application start has been completely changed. Check this link from umbraco docs here

  • James Mangubat 2 posts 84 karma points
    Jun 26, 2019 @ 03:19
    James Mangubat

    Thank you! Yes. After I made global.asax available again in the project. That specific error went away. Now another issue came in but is now superficial and clearer in detail.

  • Rakesh 10 posts 90 karma points
    May 13, 2020 @ 08:01

    Hi James, Even am getting the same error post installing the necessary packages. However i got a pop up stating do you want to replace Global.asax i said no so that i will retain mine as it is. Still am getting this error . Please let me know on this if you have any idea/observations while you were fixing this issue.

  • Rakesh 10 posts 90 karma points
    May 22, 2020 @ 12:51

    It will be great helpful if any one can help me out in resolving this issue. Am still facing same issue.

  • Jack Lawry 23 posts 145 karma points c-trib
    15 days ago
    Jack Lawry

    I just found this post having got the same error and fixed it by checking:

    • Permissions of the files on the server - check you have allowed the IIS user access to the site files.
    • Connection string - Check the connection string is correct.

    Hopefully this helps someone.

Please Sign in or register to post replies

Write your reply to: