1
The given key was not present in the dictionary - only on 2008 R2 but works in Cassini
Problem reported by MarkT - March 31, 2015 at 7:32 AM
Resolved
Hi
 
I have a Visual Studio 2013 project with a reference to FileUltimate.dll and the control added to a page.  When I run this in debug on my development machine (using the Cassini web server built into VS 2013) the page loads fine and the FileUltimate control starts.
 
However when I run this same project on my proper Windows 2008 R2 IIS 7.5 I get the exception:

The given key was not present in the dictionary

The stack trace shows the error occurring here:
 
[KeyNotFoundException: The given key was not present in the dictionary.]
   GleamTech.Web.HttpHandlerRouteHandler`1.GetUrl(String pathInfo, Boolean usesSession, String routeName) +367
   GleamTech.Web.ControlBase`2..ctor() +198
   GleamTech.FileUltimate.FileManager..ctor() +18
 
This is the trial version I am trying to verify it will work in our environment.  Any help would be much appreciated.
 
Many thanks in advance

5 Replies

Reply to Thread
0
Cem Alacayir Replied
March 31, 2015 at 8:50 AM
Employee Post
Strange, it seems the DLL could not run PreApplicationStart method to register the handlers thus the error occurs.
Is this a regular ASP.NET Web Application project or a ASP.NET Web Site project? If it's a Web Site project, maybe precompilation occurs and FileUltimate detects it's in development environment and thus does not run PreApplicationStart method.
 
 
Also do you run the compiled project directly on Windows 2008 R2 IIS 7.5 or do you run it with Visual Studio 2013 targeting IIS in project settings?
0
MarkT Replied
March 31, 2015 at 2:04 PM
Thanks for the info.  In order to try and make the PreApplicationStart method fire I tried restarting the app pool, then a full iisreset.  Neither worked; the error stayed the same.
 
There is no code in the App_Code folder.
 
I removed and re-added the reference to FileUltimate.dll, in case for some reason this would help, it did not.
 
Will see if I can get anything else to work tomorrow...
0
MarkT Replied
April 1, 2015 at 12:48 AM
I have got this working now.
 
I did not figure out why the PreApplicationStart method in the referenced assembly was not being called at the proper time.  However if I add the following line:
GleamTech.FileUltimate.PreApplicationStart.Run()
 
To my own applications startup method, everything works fine.
 
So rather than a fix, a workaround.  Thanks for pointing me in the right direction.  I just need to finish testing then hopefully we can use your product in our app! :-)
 
Thanks
 
0
Cem Alacayir Replied
May 20, 2015 at 9:09 AM
Employee Post
Hi Mark,
FYI, we released 4.5.2.0 today and I think it will solve this problem. We improved the way and the timing of how FileUltimate is initialized. So you should not need to add any method call to your applications startup method. By the way that method is removed, there is another method now but I am not writing it now in the hope that you will never need to use it. Let me know.
0
Brian Pautsch Replied
September 16, 2015 at 5:59 AM
Project: ASP.NET Web Forms
 
I have a homegrown CMS and dynamically load routes and they can be refreshed anytime (not just in Application_Start). I see there are 4 loaded by GleamTech. When I refresh the rules, I first clear them. How can I reload the FileUltimate v4.7.1.0 routes?
 

Reply to Thread