locked
Error loading System.Web.WebPages.Deployment.dll RRS feed

  • Question

  • User652541368 posted

    I am seeing an error trying to run an ASP.Net application.  Site has multiple applications installed in the default web site.  Our app resides on the default web site and has its own app pool.  I see the following exception on first attempt to load an ASP.Net page:

    Item has already been added. Key in dictionary: 'System.Web.WebPages.Deployment.dll'  Key being added: 'System.Web.WebPages.Deployment.dll'

    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.ArgumentException: Item has already been added. Key in dictionary: 'System.Web.WebPages.Deployment.dll'  Key being added: 'System.Web.WebPages.Deployment.dll'

    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:

     

    [ArgumentException: Item has already been added. Key in dictionary: 'System.Web.WebPages.Deployment.dll'  Key being added: 'System.Web.WebPages.Deployment.dll']

       System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +14662241

       WebApplication.Global.LoadReferencedAssemblies() +163

       WebApplication.Global.Application_Start(Object sender, EventArgs e) +9

     

    [HttpException (0x80004005): Item has already been added. Key in dictionary: 'System.Web.WebPages.Deployment.dll'  Key being added: 'System.Web.WebPages.Deployment.dll']

       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12949749

       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175

       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304

       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404

       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

     

    [HttpException (0x80004005): Item has already been added. Key in dictionary: 'System.Web.WebPages.Deployment.dll'  Key being added: 'System.Web.WebPages.Deployment.dll']

       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12966756

       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159

       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12806561

     


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408

    Monday, May 4, 2015 11:59 AM

Answers

  • User-166373564 posted

    Hi,

    Welcome to asp.net forum.

    Item has already been added. Key in dictionary: 'System.Web.WebPages.Deployment.dll'  Key being added: 'System.Web.WebPages.Deployment.dll'

    According to the error message, it's recommended to remove the application from default web site, restart IIS, and try to add your asp.net application to IIS again, and check whether it makes any difference.

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 6, 2015 10:36 PM