I'm getting a strange error when trying to use XSLTSearch with 4.52 on .NET 4
System.Xml.Xsl.XslLoadException: The type or namespace name
'SecurityRulesAttribute' does not exist in the namespace
'System.Security' (are you missing an assembly reference?) An error
occurred at
C:\umbraco_Starter452\xslt\634221425113906250_temp.xslt(952,3).
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String
fileName, String oldName, String fileContents, Boolean ignoreDebugging)
This happens on save of the xslt file. On the actual page it displays
Error reading XSLT file: \xslt\XSLTsearch.xslt
I only added this line:
and string(umbracoSearchHide) != '1'
Feels like a .NET 4 issue, but I'm not sure why. Is there saving to disk?
I'm not certain, but it appears that .NET 4 doesn't allow .NET directly in the XSLT files. Any chance this could be converted to an XSLT extension for the 4.5 version?
Actually, it *should* be supported, but perhaps the "EnableScript" property isn't set in the Umbraco XsltCompiledTransform class? This would make sense if it it designed to work in medium trust.
Support for embedded scripts is an optional XSLT setting on the XslCompiledTransform class. Script support is disabled by default. To enable script support, create an XsltSettings object with the EnableScript property set to true and pass the object to the Load method.
NOTE:
XSLT scripting should be enabled only if you require script support and you are working in a fully trusted environment. See System.Xml Security Considerations for more information.
As soon as I get done with ImageGen 2.5 I'm going to be working on XSLTsearch 3.0, which will be medium-trust, faster, bug fixes, have dictionary support for multi-lingual sites, etc. This is measured in weeks though.
But very easy to pull the <script> block out, shove it in an xslt extension in the meantime. A simple DIY project for you if you're in a hurry. :)
Error reading XSLT file: \xslt\XSLTsearch.xslt
I'm getting a strange error when trying to use XSLTSearch with 4.52 on .NET 4
System.Xml.Xsl.XslLoadException: The type or namespace name 'SecurityRulesAttribute' does not exist in the namespace 'System.Security' (are you missing an assembly reference?) An error occurred at C:\umbraco_Starter452\xslt\634221425113906250_temp.xslt(952,3).
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
This happens on save of the xslt file. On the actual page it displays
I only added this line:
and string(umbracoSearchHide) != '1'
Feels like a .NET 4 issue, but I'm not sure why. Is there saving to disk?
Strange! No idea what that temp file is needed for, caching maybe?
Are you sure your app pool is configured for .net 4 and that your web.config is of the .net 4 version?
You could try the tip from this blog post maybe..
I'll check that out.
It appears to be an issue with the msxml:script C# methods in the XSLT code.
http://www.local.dotnetnuke.com/Community/Forums/tabid/795/forumid/200/postid/388581/scope/posts/Default.aspx
I'm not certain, but it appears that .NET 4 doesn't allow .NET directly in the XSLT files. Any chance this could be converted to an XSLT extension for the 4.5 version?
Actually, it *should* be supported, but perhaps the "EnableScript" property isn't set in the Umbraco XsltCompiledTransform class? This would make sense if it it designed to work in medium trust.
Script Blocks Using msxsl:script - MSDN
http://msdn.microsoft.com/en-us/library/wxaw5z5e.aspx
Support for embedded scripts is an optional XSLT setting on the XslCompiledTransform class. Script support is disabled by default. To enable script support, create an XsltSettings object with the EnableScript property set to true and pass the object to the Load method.
Anyone have any ideas?
The next version of XSLTsearch will be medium-trust friendly, with the script block moved to an xslt extension.
cheers,
doug.
Excellent. Thanks for the response. Any estimate on when that might be complete?
Need any help? If its going to be long enough, I may be able to pull it in to an XSLT Extension.
Thanks,
Jason
As soon as I get done with ImageGen 2.5 I'm going to be working on XSLTsearch 3.0, which will be medium-trust, faster, bug fixes, have dictionary support for multi-lingual sites, etc. This is measured in weeks though.
But very easy to pull the <script> block out, shove it in an xslt extension in the meantime. A simple DIY project for you if you're in a hurry. :)
cheers,
doug.
Hello everyone!
just installed this plugin but it shows the following error, can someone help me?
The version of umbraco is the latest (just installed as well).
and umbraco is empty (with the XSLT SEARCH).
I am using ASP.NET 3.5.
SqlServer 2005
Error occured
System.Xml.Xsl.XslTransformException: Cannot find the script or external object that implements prefix 'urn:PS.XSLTsearch'.
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at startTime(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, TextWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
In your xsl:stylesheet definition, add this namespace:
And in the exclude-result-prefixes attribute add the ps prefix.
Make sure not to capitalize "ps" iin your xslt, it's case sensitive and should be lower cased.
@ConradoJr -
I suspect you are using XSLTsearch 3.0 because you have an upper-case 'PS'. That is different than prior versions which used a lower-case 'ps' prefix.
The message you receive indicates that the XSLT extension used by XSLTsearch cannot be found. This could happen for either of these reasons:
Hope this helps. Let us know what you find out.
BTW, your question should probably have been a new thread since the original post was answered and your error is different than that of the OP.
cheers,
doug.
Hello everyone,
Actually the folder was AppCode without written permission.
I had no access to IIS spoke with the responsible for the infrastructure and he gave blanket permission to all folders.
Thanks everyone, you're amazing
is working on a reply...