I have a .NET MVC app that has been running version 6.5.2 of FileUltimate for the past couple of years with no issues. I recently updated Visual Studio, and ever since I have been getting the following error message whenever I try running it on localhost:
[ArgumentException: An item with the same key has already been added.]
System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +60
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +14413254
GleamTech.Globalization.CultureManager._6f(AssemblyResourceStore assemblyResourceStore, BackSlashPath relativeCultureFilePathTemplate, Char cultureSeparatorChar, IDictionary`2 cultureMappings) +429
GleamTech.FileUltimate.AspNet.FileUltimateWebConfiguration.RegisterLocalization() +813
System.Action.Invoke() +0
GleamTech.AspNet.GleamTechWebConfiguration.OnApplicationStarted() +76
GleamTech.AspNet.NetFramework.WebActivationModule.Init(HttpApplication httpApplication) +115
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): An item with the same key has already been added.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +719
upon publishing the project to our development server, the site works as expected. The only method I have found to make it work on localhost is by removing the assembly reference to FileUltimate and commenting out the code that uses it. Below is a list of troubleshooting steps I tried that did not work on localhost:
- Deleting Visual Studio temp files in C:\Users\[username]\AppData\Local.
- Deleting project files in the bin and obj folders.
- Uninstalling and reinstalling the FileUltimate, GleamTech.Core, ImageUltimate, VideoUltimate, and DocumentUltimate NuGet packages.
- Uninstalling (without reinstalling) the ImageUltimate, VideoUltimate and DocumentUltimate NuGet packages.
- Uninstalling and reinstalling all NuGet packages in the project.
- Deleting and redownloading the entire git repository for the project.
- Fresh install of Visual Studio.
The application is targeting .NET Framework 4.6.1 and runs on IIS Express.