Some XSLT transformations fail after a manual upgrade

fragment from stacktrace:

{“ClassName”:“CZ.Advantages.Asap.AsapException”,“Message”:“Error loading data from table ‘Counter’ into entity ‘Counter’\r\nMessage: Fehler bei der Anfrage.”,“Data”:null,“InnerException”:{“ClassName”:“System.Exception”,“Message”:“Error loading data from table ‘Counter’ into entity ‘Counter’\r\nMessage: Fehler bei der Anfrage.”,“Data”:null,“InnerException”:{“ClassName”:“System.Exception”,“Message”:“Transformation result invalid.”,“Data”:null,“InnerException”:{“ClassName”:“System.Xml.XPath.XPathException”,“Message”:“Die Funktion ‘AS:GenerateSerial()’ ist fehlgeschlagen.”,“Data”:null,“InnerException”:{“ClassName”:“System.Reflection.TargetInvocationException”,“Message”:“Ein Aufrufziel hat einen Ausnahmefehler verursacht.”,“Data”:null,“InnerException”:{“ClassName”:“System.Exception”,“Message”:“Error loading data from table ‘Counter’ into entity ‘Counter’\r\nMessage: Fehler bei der Anfrage.”,“Data”:null,“InnerException”:{“ClassName”:“System.Security.SecurityException”,“Message”:“Fehler bei der Anfrage.”,“Data”:null,“InnerException”:null,“HelpURL”:null,“StackTraceString”:" bei System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)\r\n bei System.Security.PermissionSet.Demand()\r\n bei System.Data.Common.DbConnectionOptions.DemandPermission()\r\n bei System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)\r\n bei System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry)\r\n bei System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\r\n bei System.Data.SqlClient.SqlConnection.Open()\r\n bei CZ.Advantages.Asap.DA.Service.DataLoader.Fill() in C:\Users\urbanekv\git\asap-backend\CZ.Advantages.Asap.DA.Service\AbstractSqlDataService.cs:Zeile 81.",“RemoteStackTraceString”:null,“RemoteStackIndex”:0,“ExceptionMethod”:“8\nCheck\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Security.CodeAccessSecurityEngine\nVoid Check(System.Object, System.Threading.StackCrawlMark ByRef, Boolean)”,“HResult”:-2146233078,“Source”:“mscorlib”,“WatsonBuckets”:

Notice the System.Security.CodeAccessSecurityEngine.Check in the stack trace. That means you downloaded updated bin files which were blocked by Windows.

  1. Stop IIS or at least the application pool of your application.
  2. To “unblock” a file, right-click it in Windows Explorer, choose Properties from the context menu, click the Unblock button in the lower right-hand corner of the resulting dialog, and hit OK or Apply:

    Important: ZIP files should be “unblocked” before their contents are extracted.
  3. Copy the extracted bin files to the bin folder again.

If it does not work you will need to delete your complete bin folder and copy in the new unblocked files again.

Picture taken from http://blogs.msdn.com/b/delay/p/unblockingdownloadedfile.aspx.