Problem with separate DLL Versions since ChangeSet d088ea7cacba

Apr 3, 2013 at 8:13 PM
today I have updated your great lib in one of my projects from Version 3.1.0398 to the current version. I only used some of your dlls in this project. (SQL, DataTypes, FileFormats and Reflection).
After I updated the libs, I got an exception each time I use the SQLHelper Static Class. The exception is at
protected static Cache<int> Cache = new Cache<int>();
The problem seems to be the 'AllowPartiallyTrustedCallersAttribute' flag in the project settings:
Attempt by security transparent method "Utilities.SQL.SQLHelper..cctor()" to access security critical method "Utilities.Caching.Cache`1<System.Int32>..ctor()" failed.
The complete DLL is working

Apr 3, 2013 at 10:21 PM
Sorry about the issue. I thought I had added the flag to all the DLLs but it looks like about 4 or 5 of them were missing it. I have a fix ready and pushed up already but it might be a day or two before I can push to nuget (in a hospital at the moment and I left the build server off by accident). Anyway, thank you for catching the issue.

James Craig
Apr 3, 2013 at 10:33 PM
Hi Craig,
thanks for your very quick response! It doesnt matter for me if it last some days till the new version is on nuget. It is more important that you will get well quickly!
Best wishes for you!

Apr 6, 2013 at 3:00 AM
Should have specified that I'm fine and that the hospital visit was for someone else. I'm just sleeping in a chair in the recovery room with them (hence I have time to make the fix, etc). That said, update should be up on Nuget tomorrow night. Also if you have any requests for features, let me know. I'm working on a side project at the moment that is getting my random ideas/thoughts and while some items may come over, it's not a ton.

James Craig
Apr 23, 2013 at 5:52 PM
Edited Apr 23, 2013 at 6:08 PM
Hello Craig,
sorry for my late answer. The new version is working as aspected. Maybe I have a new feature for your lib. I always hated, that I could not backup a SQLServer DB over the network. (Backupfile should go to the client). So I made a little class that does the trick. It simply writes the backupfile to the default backup location on the server, reads in into a binary field in a temp table, and then writes it back on the client to the filesystem. I found the principle of this "over the wire" backup somewhere on the Internet, and created a class for it. If you are interested, i can send you the VB classes, and you can maybe translate into C.
Ah, and the class can do the other way also: Restore to a remote Server from local disk!
And surely it is limited to size of 2GB for SQLServer 2005 an lower. In SQLServer 2008 and higher we could use a varbinary(max) filestream Field for the temp table.
Apr 23, 2013 at 10:19 PM
I've been meaning to write a couple more SQL Server helper functions/classes. That and branch into mysql, postgres, etc. and see if I can make a generic set of classes/methods. Backup and restore related functionality would be useful. It might not end up the same as you send it, but I'll definitely pull out the functionality that is generic enough for the library. So feel free to send the code (either fork the code, make a branch, and add your classes, or you should be able to send a message through here, or even just use gist and post the link).