Error parsing XSLT file After moving my website from 1 hosting location to another
Dear Ones,
I am a total n00b in this, but we urgently need to do it for one of our customers. We had our :
Website Backup, Database Backup & a Documentation on how to implement the website in our new hosting place.
We have followed it accurately and we ended up with the website up & running but an error is showing in our webpage as follows and our website tabs are not appearing at all
Error parsing XSLT file: \xslt\myNav.xslt
Kindly help in resolving this issue, since its very crtical to get it completed.
Do note that it was up & running in another hosting space, now we were trying to migrate the website from the old to the new hosting space.
Ok, here are the messages that are appearing with red
umbracoMacro InnerExceptionUnable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.<GetXsltExtensions>b__0() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)0.
umbracoMacro InnerExceptionUnable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.<GetXsltExtensions>b__0() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
libraryError returning dictionary item 'theEvent' No key theEvent exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at umbraco.library.GetDictionaryItem(String Key)
libraryError returning dictionary item 'Media' No key Media exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at umbraco.library.GetDictionaryItem(String Key)
libraryError returning dictionary item 'History' No key History exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at umbraco.library.GetDictionaryItem(String Key)
libraryError returning dictionary item 'Contact' No key Contact exists in dictionary at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at umbraco.library.GetDictionaryItem(String Key)
Exception occurred while populating cache, Will set RazorDataTypeModelTypes to null so that this error remains visible and you don't end up with an empty cache with silent failure.0.5924201674907060.046087 The exception was System.Exception and the message was Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)
Exception occurred while populating cache, Will set RazorDataTypeModelTypes to null so that this error remains visible and you don't end up with an empty cache with silent failure.0.6376166493359810.044048 The exception was System.Exception and the message was Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)
Exception occurred while populating cache, Will set RazorDataTypeModelTypes to null so that this error remains visible and you don't end up with an empty cache with silent failure.0.6806561392352890.042812 The exception was System.Exception and the message was Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)
umbracoMacro InnerExceptionUnable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute) at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute) at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.<GetXsltExtensions>b__0() at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) at umbraco.macro.GetXsltExtensions() at umbraco.macro.AddMacroXsltExtensions() at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
@ Matt Brailsford - I have checked all permissions and they seem to be all :
Full Control
Modify
Read & Execute
List Folder Contents
Read
Write
Full Control, Modify, Read & Execute, List folder Contents, Read , Write. " All are marked " - Is this ok? or should i change them?
@ Lee Kelleher - I am running Umbraco 4. & my hosting place told me they have tried to tweak something in regards of Medium Trust but were not able to resolve it, I am not sure about the SQL CE Database????
Thanks for the info. We'll need a more specific version number, as v4 has many minor versions (with many changes).
Can you open the "web.config" file (in the root of your website), scroll down to the <appSettings> section and find the following values:
"umbracoConfigurationStatus" - this has the value of your Umbraco version.
"umbracoDbDSN" - this is your database connection string - do not copy-n-paste the value, but check if it contains a parameter called "datalayer". If so, which datalayer does it use? SQLCE or MySQL? If it doesn't contain the "datalayer" parameter then you are using SQL Server (which is good to help resolve this Medium Trust issue).
OK cool, the quick fix for you to get your website back up and running is to remove the SQLCE assemblies, (of course, make a back-up first!!!), delete the following from your /bin folder:
/bin/amd64
/bin/x86
/bin/SQLCE4Umbraco.dll
/bin/System.Data.SqlServerCe.dll
/bin/System.Data.SqlServerCe.Entity.dll
Good luck... and remember to make a back-up of those files, just in case you need to restore them.
Thank you for your above resolution, i have removed the first 2 files that you posted above, but the 3 remaining .dll files are giving me access denided.
Any idea how to enforce removing them? I tried removing them from the File Manager and from a FTP account but could not do it.
They'll most likely be locked by the web application itself, so it would need to be restarted. Luckily you can do this by modifying the Web.config file ... try re-uploading it to the web-server. Then before you view your website again, delete those other files from your /bin folder.
Lee, do not know how to thank you , my problems are resolved :)
Cheers and the website is up and running.
P.S. a quick question - When i run my website using the debugging mode, it still show couple of errors, is it related to the same website service migration issue?
Seems to be an issue with SqlServerCE assemblies and medium trust...
"assembly version 4.0.0.0 and 4.0.0.1 is the same code, but 4.0.0.1 is isolated for desktop deployment and does not work with medium trust. Version 4.0 and 4.0 SP1 both support medium trust, as long as you use assembly version 4.0.0.0" - http://erikej.blogspot.dk/2011/10/sql-server-compact-40-under-aspnet.html
Error parsing XSLT file After moving my website from 1 hosting location to another
Dear Ones,
I am a total n00b in this, but we urgently need to do it for one of our customers. We had our :
Website Backup, Database Backup & a Documentation on how to implement the website in our new hosting place.
We have followed it accurately and we ended up with the website up & running but an error is showing in our webpage as follows and our website tabs are not appearing at all
Error parsing XSLT file: \xslt\myNav.xslt
Kindly help in resolving this issue, since its very crtical to get it completed.
Do note that it was up & running in another hosting space, now we were trying to migrate the website from the old to the new hosting space.
Hi Ayman,
First make sure debug is on in the web.config (look for umbracoDebugMode) - then open your website and add ?umbDebugShowTrace=True to the URL
Now you should be able to see a detailed error message in red somewhere on the page... what does it say?
/Chriztian
Also: Are you running the same Umbraco version in both locations?
Ok, here are the messages that are appearing with red
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.<GetXsltExtensions>b__0()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)0.
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.<GetXsltExtensions>b__0()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
No key theEvent exists in dictionary
at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key)
at umbraco.library.GetDictionaryItem(String Key)
No key Media exists in dictionary
at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key)
at umbraco.library.GetDictionaryItem(String Key)
No key History exists in dictionary
at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key)
at umbraco.library.GetDictionaryItem(String Key)
No key Contact exists in dictionary
at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key)
at umbraco.library.GetDictionaryItem(String Key)
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.MacroEngines.DynamicNode.TryGetMember(GetMemberBinder binder, Object& result)
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Unable to load one or more of the types in assembly 'System.Data.SqlServerCe, Version=4.0.0.1, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Exceptions were thrown:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Assembly assembly, Type attribute)
at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesMarkedWithAttribute(Type attribute)
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.<GetXsltExtensions>b__0()
at umbraco.cms.businesslogic.cache.Cache.GetCacheItem[TT](String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem)
at umbraco.macro.GetXsltExtensions()
at umbraco.macro.AddMacroXsltExtensions()
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
Yes, its a copy from the main server, i did not re-install it from scratch, so it should be the same version.
Hi again,
OK - that is most likely not an XSLT error - looks more like an error with the permissions... will try to call the cavalry (on twitter) for you...
/Chriztian
Sounds like a permissions problem to me too, please ensure your permissions are set as per this link
http://our.umbraco.org/wiki/reference/files-and-folders/permissions
Cheers
Matt
Maybe this can help: http://our.umbraco.org/forum/developers/xslt/1735-Problems-with-saving-a-xslt-file?p=2
The errors appears to be due to the new hosting being under Medium Trust.
Which version of Umbraco are you using? (and are you using the SQL CE database?)
I know where were definite issues with SQL CE and Medium Trust.
Cheers, Lee.
@ Matt Brailsford - I have checked all permissions and they seem to be all :
Full Control, Modify, Read & Execute, List folder Contents, Read , Write. " All are marked " - Is this ok? or should i change them?
@ Lee Kelleher - I am running Umbraco 4. & my hosting place told me they have tried to tweak something in regards of Medium Trust but were not able to resolve it, I am not sure about the SQL CE Database????
Hi Ayman,
Thanks for the info. We'll need a more specific version number, as v4 has many minor versions (with many changes).
Can you open the "web.config" file (in the root of your website), scroll down to the <appSettings> section and find the following values:
Thanks, Lee.
Hi Ayman,
OK cool, the quick fix for you to get your website back up and running is to remove the SQLCE assemblies, (of course, make a back-up first!!!), delete the following from your /bin folder:
Good luck... and remember to make a back-up of those files, just in case you need to restore them.
Cheers, Lee.
Thank you for your above resolution, i have removed the first 2 files that you posted above, but the 3 remaining .dll files are giving me access denided.
Any idea how to enforce removing them? I tried removing them from the File Manager and from a FTP account but could not do it.
They'll most likely be locked by the web application itself, so it would need to be restarted. Luckily you can do this by modifying the Web.config file ... try re-uploading it to the web-server. Then before you view your website again, delete those other files from your /bin folder.
Cheers, Lee.
Lee, do not know how to thank you , my problems are resolved :)
Cheers and the website is up and running.
P.S. a quick question - When i run my website using the debugging mode, it still show couple of errors, is it related to the same website service migration issue?
Hi Ayman,
Just marking the appropriate reply/post as the solution is thanks enough. Happy that it's resolved.
With the other errors, are those the same as your original post or different?
Cheers, Lee.
Done :) and i think other errors requires another post opening.
I will do open another post with the other issues.
Thanks again.
Have a good day.
Seems to be an issue with SqlServerCE assemblies and medium trust...
"assembly version 4.0.0.0 and 4.0.0.1 is the same code, but 4.0.0.1 is isolated for desktop deployment and does not work with medium trust. Version 4.0 and 4.0 SP1 both support medium trust, as long as you use assembly version 4.0.0.0"
- http://erikej.blogspot.dk/2011/10/sql-server-compact-40-under-aspnet.html
Thanks Morten, much appreciated. This has been resolved for the upcoming v6.0 release: http://issues.umbraco.org/issue/U4-677
Cheers, Lee.
is working on a reply...