Can't create or run XSLT files from hosting company site
Hi all !
This is my first post so please be gentle ;)
I've uploaded my first project to a hosting company (PipeTen) and have found that I'm not able ti either create or execute XSLT functions on the site.
When I initially uploaded the site it was at version 4.6 and found that I needed to upgrade to 4.7.1.1 so that I could get it to work in a mudium trust environment.
Since doing this most of the site is working, but none of the XSLT's will run and I get the debug output below which complains about SQLServer CE (Which I'm not using as far as I know).
I've spoken to the hosting company and they are sating that this is because Umbraco wants to run in full trust mode, but if that's the case I don't see how they can have anybody running as they also tell me that a full trust solution won't be available for a couple of weeks yet.
I'm really lost at this point so any input would be greatly appreciated.
Many Thanks in advance
Kevin
Request Details
Session Id:
id1qvb3abrlewpdogzgkuq5k
Request Type:
GET
Time of Request:
01/02/2012 11:27:34
Status Code:
200
Request Encoding:
Unicode (UTF-8)
Response Encoding:
Unicode (UTF-8)
Trace Information
Category
Message
From First(s)
From Last(s)
aspx.page
Begin PreInit
umbracoInit
handling request
2.2784E-05
0.000023
request handler
current url '/virtual-tour/classroom-1.aspx'
0.000116288
0.000094
umbracoRequestHandler
Just before xPath query (True, '1345')
0.000152848
0.000037
umbracoRequestHandler
After xPath query
0.000175056
0.000022
umbracoRequestHandler
Access checking started
0.000206624
0.000032
umbracoRequestHandler
Page not protected
0.0002308
0.000024
umbracoRequestHandler
Access checking ended
0.000249088
0.000018
umbracoInit
Done handling request
0.00026704
0.000018
umbracoPage
Element loaded: mediaFolderId
0.000444832
0.000178
umbracoPage
Pagedata loaded for Classroom 1 (ID: 1345)
0.00047256
0.000028
umbracoPage
Looking up skin information
0.000501072
0.000029
aspx.page
End PreInit
0.000716992
0.000216
aspx.page
Begin Init
0.000743744
0.000027
renderMacro
Rendering started (macro: umb2ndLevelNavigation, type: 1, cacheRate: 0)
0.000779808
0.000036
umbracoMacro
Before adding extensions
0.00082256
0.000043
umbracoMacro InnerException
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. 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__6() 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.030990384
0.030168
item
Start parsing 'pagecontent'
0.031235744
0.000245
item
Done parsing 'pagecontent'
0.031288592
0.000053
renderMacro
Rendering started (macro: Get Gallery Images, type: 1, cacheRate: 0)
0.031326048
0.000037
umbracoMacro
Before adding extensions
0.031374304
0.000048
umbracoMacro InnerException
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. 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__6() 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)
Hi. From the trace I can see that CAS exceptions are caused by the lack of permission to access Sql Server CE stuff. I have never dealt with CE actually and am not aware how it works in a partial-trusted house, but probably you have opportunity to deploy your installation there on the usual SQL Server, don't you?
Strange thing is that I'm not actually using SQL CE, but am using a SQL Server 2005 database which I've transferred over to the hosting company. This database must be working as I can see the pages ok, but none of the XSLT code will run. I also get the same error if I try and create a new XSLT script.
I've just tried to create a document type and got the message below :-
Is there any way I can check the database out ?
Server Error in '/' Application.
Cannot insert the value NULL into column 'id', table 'osbit_umbraco.dbo.umbracoNode'; column does not allow nulls. INSERT fails. The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'id', table 'osbit_umbraco.dbo.umbracoNode'; column does not allow nulls. INSERT fails. The statement has been terminated.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Yeah. It's an infamous error usually happening exactly after something like moving the database to a new place with some tool. It's caused by loosing the IDENTITY option of the ID column. The sad thing is that it's not that easy to set this option back - you'll need to copy the table to somewhere else, than drop truncate it then drop and recreate the ID column with IDENTITY and copy the table content back there providing that old ID values preserved (i.e. with SET IDENTITY_INSERT ON) and set IDENTITY_INSERT OFF after all. Rather dull and boring indeed.
You are quite correct as I eventually figured out last night after many hours :(
Thanks very much for you're help on this, appreciated !
Just in case someone else this problem, here's what I did wrong . . .
When I transferred the database from my dev environment to the live environment I use the SQL Server Export/Import tool.
This tool only transfers the data and creates the 'basic' tables, but does not create primary/foriegn keys and identity fields, etc so my data was a bit of a mess :(
I had to use the 'Generate Scripts' tool (right click on database in SSMS and it's under the 'tasks' menu) to create the tables correctly, without the foriegn keys.
I then used the tool again to transfer just the data (Without blowing any foriegn key contraints as they haven't been created).
Then I ran the tool a third time to create the missing foriegn keys.
BTW - I also used SQL Data Compare (Redgate tool) to make sure the databases were in sync).
I used the msdeploy.exe tool several times - it takes some time to learn but it proved to copy the database without problems. However, I think that the ultimate solution would be to use the Courier though it's a paid product.
Things are 'better' now in that I can create document and media types without a major crash, but XSLT's still do not run on the site and I still can't create them as before :(
The database is definately fully syncronised so I know that's not the issue now.
Has anyone got this working on MediumTrust anywhere ? (As that's what the hosting company say is wrong).
Hi. I know there're some articles on Wiki regarding running umbraco with medium trust like this: http://our.umbraco.org/wiki/install-and-setup/medium-trust-with-umbraco-45plus. However I haven't had such experience, bur probably wiki will be of help. What exception do you get? (If you cannot see it in the page then try to find it in the log table in the database).
I've actually stopped trying to get XSLT working now as I haven't got time to try and work out what's wrong, I'm just not that experianced with Umbraco yet :(
I have instead now re-written the navigation in Razor and am currently doing the same with the gallery.
Strangely I was still seeing the SQLCE error with the XSLT macro in my template, even if it was commented out !
Once I removed it completly, it went away - odd.
I am still getting an error with my Razor script, but that's just down to the fact my coding skills a crap with Razor at the moment ;)
I'll have a look at the XSLT issue again as soon as I get this update out though.
Just before xPath query (False, '/root/*/* [@urlName = "virtual-tour"]/* [@urlName = "hall"] | /root/* [@urlName = "hall"]')
0.147212976
0.000047
umbracoRequestHandler
pageXPathQueryStart: '/root'
0.147249056
0.000036
umbracoRequestHandler
Adding to cache... ('/virtual-tour/hall.aspx')
0.17713624
0.029887
umbracoRequestHandler
After xPath query
0.1771864
0.000050
umbracoRequestHandler
Access checking started
0.177246256
0.000060
umbracoRequestHandler
Page not protected
0.196426512
0.019180
umbracoRequestHandler
Access checking ended
0.1964568
0.000030
umbracoInit
Done handling request
0.196476496
0.000020
umbracoPage
Element loaded: mediaFolderId
0.204520288
0.008044
umbracoPage
Pagedata loaded for Hall (ID: 1338)
0.20455008
0.000030
umbracoPage
Looking up skin information
0.204732976
0.000183
template
Master template is the same as the current template. It would cause an endless loop! Make sure that the current template ''Template with id: '-1' has another Master Template than itself. You can change this in the template editor under 'Settings'
0.25500632
0.050273
aspx.page
End PreInit
0.661212896
0.406207
aspx.page
Begin Init
0.661253232
0.000040
renderMacro
Rendering started (macro: Razor-2ndlevel Nav, type: 6, cacheRate: 0)
RazorDynamicNode got datatype ead69342-f06d-4253-83ac-28000225583b for mediaFolderId on Gallery
1.095874928
0.010659
RazorDataTypeModelTypes cache is empty, populating cache using TypeFinder...
1.09590456
0.000030
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.
1.3070984
0.211194
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)
1.336297936
0.029200
Checking for a RazorDataTypeModel for data type guid ead69342-f06d-4253-83ac-28000225583b...
1.33633632
0.000038
Checking the RazorDataTypeModelTypes static mappings to see if there is a static mapping...
1.336355984
0.000020
There isn't a staticMapping defined so checking the RazorDataTypeModelTypes cache...
1.338575984
0.002220
RazorDataTypeModelTypes is null, probably an exception while building the cache, falling back to ConvertPropertyValueByDataType
1.338607008
0.000031
umbracoMacro
Error Loading Razor Script (file: Razor- Display Photos) The type initializer for 'Examine.ExamineManager' threw an exception. at Examine.ExamineManager.get_Instance() at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id) at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id) at umbraco.MacroEngines.DynamicNode.MediaById(String Id) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at ASP._Page_macroScripts_Razor_DisplayPhotos_cshtml.Execute() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) at System.Web.WebPages.WebPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage) at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
1.416166816
0.077560
umbracoMacro
Loading IMacroEngine script [done]
1.416350864
0.000184
umbracoMacro
Error loading MacroEngine script (file: Razor-DisplayPhotos.cshtml, Type: '' The type initializer for 'Examine.ExamineManager' threw an exception. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
1.416610448
0.000260
renderMacro
Rendering started (macro: List Media Folder, type: 6, cacheRate: 0)
1.430571952
0.013962
umbracoMacro
MacroEngine script added (ListMediaFolder.cshtml)
1.430603776
0.000032
umbracoMacro
Loading IMacroEngine script
1.430623408
0.000020
umbracoMacro
Error Loading Razor Script (file: List Media Folder) Ambiguous match found. at System.DefaultBinder.BindToMethod(BindingFlags bindingAttr, MethodBase[] match, Object[]& args, ParameterModifier[] modifiers, CultureInfo cultureInfo, String[] names, Object& state) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at umbraco.MacroEngines.DynamicNode.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) at CallSite.Target(Closure , CallSite , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at ASP._Page_macroScripts_ListMediaFolder_cshtml.Execute() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) at System.Web.WebPages.WebPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage) at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
1.654806736
0.224183
umbracoMacro
Loading IMacroEngine script [done]
1.65488504
0.000078
umbracoMacro
Error loading MacroEngine script (file: ListMediaFolder.cshtml, Type: '' Ambiguous match found. at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Hi. I suspect that the reason of this security exception can be that the System.Data.SqlServerCe assembly requires CAS permissions to call unmanaged code (that's not granted in medium trust). If you don't use SQL CE at all then you could try to remove this assembly from the ~/bin folder - perhaps it would help.
Can't create or run XSLT files from hosting company site
Hi all !
This is my first post so please be gentle ;)
I've uploaded my first project to a hosting company (PipeTen) and have found that I'm not able ti either create or execute XSLT functions on the site.
When I initially uploaded the site it was at version 4.6 and found that I needed to upgrade to 4.7.1.1 so that I could get it to work in a mudium trust environment.
Since doing this most of the site is working, but none of the XSLT's will run and I get the debug output below which complains about SQLServer CE (Which I'm not using as far as I know).
I've spoken to the hosting company and they are sating that this is because Umbraco wants to run in full trust mode, but if that's the case I don't see how they can have anybody running as they also tell me that a full trust solution won't be available for a couple of weeks yet.
I'm really lost at this point so any input would be greatly appreciated.
Many Thanks in advance
Kevin
Request Details
Trace Information
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__6()
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)
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__6()
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)
Control Tree
Session State
Application State
Request Cookies Collection
Response Cookies Collection
Headers Collection
Response Headers Collection
Form Collection
Querystring Collection
Server Variables
Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Hi. From the trace I can see that CAS exceptions are caused by the lack of permission to access Sql Server CE stuff. I have never dealt with CE actually and am not aware how it works in a partial-trusted house, but probably you have opportunity to deploy your installation there on the usual SQL Server, don't you?
Hi Rodion, thanks for the reply.
Strange thing is that I'm not actually using SQL CE, but am using a SQL Server 2005 database which I've transferred over to the hosting company. This database must be working as I can see the pages ok, but none of the XSLT code will run. I also get the same error if I try and create a new XSLT script.
I think my database might be broke somehow :(
I've just tried to create a document type and got the message below :-
Is there any way I can check the database out ?
Server Error in '/' Application.
Cannot insert the value NULL into column 'id', table 'osbit_umbraco.dbo.umbracoNode'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'id', table 'osbit_umbraco.dbo.umbracoNode'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Yeah. It's an infamous error usually happening exactly after something like moving the database to a new place with some tool. It's caused by loosing the IDENTITY option of the ID column. The sad thing is that it's not that easy to set this option back - you'll need to copy the table to somewhere else, than drop truncate it then drop and recreate the ID column with IDENTITY and copy the table content back there providing that old ID values preserved (i.e. with SET IDENTITY_INSERT ON) and set IDENTITY_INSERT OFF after all. Rather dull and boring indeed.
Hi Rodion,
You are quite correct as I eventually figured out last night after many hours :(
Thanks very much for you're help on this, appreciated !
Just in case someone else this problem, here's what I did wrong . . .
When I transferred the database from my dev environment to the live environment I use the SQL Server Export/Import tool.
This tool only transfers the data and creates the 'basic' tables, but does not create primary/foriegn keys and identity fields, etc so my data was a bit of a mess :(
I had to use the 'Generate Scripts' tool (right click on database in SSMS and it's under the 'tasks' menu) to create the tables correctly, without the foriegn keys.
I then used the tool again to transfer just the data (Without blowing any foriegn key contraints as they haven't been created).
Then I ran the tool a third time to create the missing foriegn keys.
BTW - I also used SQL Data Compare (Redgate tool) to make sure the databases were in sync).
Hope it helps !
I used the msdeploy.exe tool several times - it takes some time to learn but it proved to copy the database without problems. However, I think that the ultimate solution would be to use the Courier though it's a paid product.
Hi Rodion,
Thanks for the tip, I'll give that a go as well !
Things are 'better' now in that I can create document and media types without a major crash, but XSLT's still do not run on the site and I still can't create them as before :(
The database is definately fully syncronised so I know that's not the issue now.
Has anyone got this working on MediumTrust anywhere ? (As that's what the hosting company say is wrong).
Thanks
Kevin
Hi. I know there're some articles on Wiki regarding running umbraco with medium trust like this: http://our.umbraco.org/wiki/install-and-setup/medium-trust-with-umbraco-45plus. However I haven't had such experience, bur probably wiki will be of help. What exception do you get? (If you cannot see it in the page then try to find it in the log table in the database).
Hi Rodion,
Sorry for the delay in getting back to you.
I've actually stopped trying to get XSLT working now as I haven't got time to try and work out what's wrong, I'm just not that experianced with Umbraco yet :(
I have instead now re-written the navigation in Razor and am currently doing the same with the gallery.
Strangely I was still seeing the SQLCE error with the XSLT macro in my template, even if it was commented out !
Once I removed it completly, it went away - odd.
I am still getting an error with my Razor script, but that's just down to the fact my coding skills a crap with Razor at the moment ;)
I'll have a look at the XSLT issue again as soon as I get this update out though.
Thanks again for the help !
Request Details
Trace Information
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)
at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(Int32 Id)
at umbraco.MacroEngines.Library.RazorLibraryCore.MediaById(String Id)
at umbraco.MacroEngines.DynamicNode.MediaById(String Id)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ASP._Page_macroScripts_Razor_DisplayPhotos_cshtml.Execute()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
The type initializer for 'Examine.ExamineManager' threw an exception.
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at umbraco.MacroEngines.DynamicNode.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result)
at CallSite.Target(Closure , CallSite , Object , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ASP._Page_macroScripts_ListMediaFolder_cshtml.Execute()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
Ambiguous match found.
at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)
Control Tree
Session State
Application State
Request Cookies Collection
Response Cookies Collection
Headers Collection
Response Headers Collection
Form Collection
Querystring Collection
Server Variables
Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Hi. I suspect that the reason of this security exception can be that the System.Data.SqlServerCe assembly requires CAS permissions to call unmanaged code (that's not granted in medium trust). If you don't use SQL CE at all then you could try to remove this assembly from the ~/bin folder - perhaps it would help.
Hi Rodion,
Sorry for the delay in getting back to you on this, busy week :(
I've now got the site working by removing everything from the hosting compant (except the database) and pubilshing a fresh 4.7.1.1 install.
I then published my scipts, etc to this new install and now have everything working as excepted.
Looks like I've done something stupid when I upgraded from 4.6 to 4.7.1.1 and copied something over that I shouldn't have done :(
Thanks again for the help.
Kev
is working on a reply...