Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason Prothero 416 posts 1226 karma points c-trib
    Oct 08, 2010 @ 22:51
    Jason Prothero
    0

    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

     

    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?

  • Sebastiaan Janssen 4880 posts 14554 karma points MVP admin hq
    Oct 09, 2010 @ 16:23
    Sebastiaan Janssen
    0

    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..

  • Jason Prothero 416 posts 1226 karma points c-trib
    Oct 11, 2010 @ 17:03
    Jason Prothero
    0

    I'll check that out.

     

  • Jason Prothero 416 posts 1226 karma points c-trib
    Oct 11, 2010 @ 17:58
    Jason Prothero
    0

    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?

     

     

  • Jason Prothero 416 posts 1226 karma points c-trib
    Oct 11, 2010 @ 18:08
    Jason Prothero
    0

    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.

    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.
     
  • Jason Prothero 416 posts 1226 karma points c-trib
    Oct 15, 2010 @ 23:22
    Jason Prothero
    0

    Anyone have any ideas?

     

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Oct 18, 2010 @ 18:11
    Douglas Robar
    0

    The next version of XSLTsearch will be medium-trust friendly, with the script block moved to an xslt extension.

    cheers,
    doug.

  • Jason Prothero 416 posts 1226 karma points c-trib
    Oct 18, 2010 @ 18:18
    Jason Prothero
    0

    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

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Oct 18, 2010 @ 18:27
    Douglas Robar
    1

    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.

  • ConradoJr 13 posts 33 karma points
    Dec 06, 2010 @ 19:24
    ConradoJr
    0

    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)

  • Sebastiaan Janssen 4880 posts 14554 karma points MVP admin hq
    Dec 06, 2010 @ 21:39
    Sebastiaan Janssen
    0

    In your xsl:stylesheet definition, add this namespace:

    xmlns:ps="urn:percipientstudios-com:xslt"

    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.

  • Douglas Robar 3570 posts 4670 karma points MVP 6x admin c-trib
    Dec 07, 2010 @ 11:48
    Douglas Robar
    0

    @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:

    1. You do not have the /app_code/XSLTsearch.cs file (it should have been installed as part of the package)
    2. You are using an earlier version of Umbraco (prior to v4.5); in which case you should use XSLTsearch 2.8.1

    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.

  • ConradoJr 13 posts 33 karma points
    Dec 07, 2010 @ 13:41
    ConradoJr
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft