Copied to clipboard

Flag this post as spam?

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


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 09, 2011 @ 22:18
    Bjarne Fyrstenborg
    0

    Events and iCal export

    Hi..

    I have used some of the features from the Business Website Starter Pack among other the event calendar here: http://ak-security.dk/events.aspx

    But somehow I can't get the iCal Export to work.. I have manually added the xslt-files, created the templates I needed and compared with a working version installed with the package. I can't see any difference in the templates or xslt.. is something else installed with the package, I have missed?

    Bjarne

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Aug 09, 2011 @ 22:29
    Tom Fulton
    1

    Hi Bjarne,

    If you look at the output you'll see an error reading eventsIcalExportAll.xslt, and if you add &umbdebugshowtrace=1  to the querystring you'll get the actual error:  "Could not load file or assembly 'file:///C:\Windows\TEMP\wphl1cvf.dll' or one of its dependencies. Access is denied."

    It looks like that XSLT file has some inline C# code and it's failing to compile.  I would double check your site permissions and maybe make sure you are running in full trust?

    -Tom

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 09, 2011 @ 22:53
    Bjarne Fyrstenborg
    0

    Hi Tom

    Yes, the eventsIcalExportAll.xslt has some C# code in the beginning:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
            version="1.0" 
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
            xmlns:msxml="urn:schemas-microsoft-com:xslt" 
            xmlns:gecko="urn:gecko-com:xslt"
            xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
            exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets gecko">
    <xsl:output method="text" omit-xml-declaration="yes"/>


    <msxml:script language="CSharp" implements-prefix="gecko">
    <msxml:assembly name="System.Web" />
    <msxml:using namespace="System.Web" />
     
    <![CDATA[
    public void changeOutPut(String ContentType, String FileName) {
            HttpContext.Current.Response.ContentType = ContentType;
            HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" + FileName);
    }
    ]]>

    </msxml:script>

    The site is hostet at Surftown, which use medium trust: https://surftown.dk/support/hvordan-tilfojer-jeg-skriverettigheder-aspnet ..previously I needed to give it write permissions to install Umbraco, but now I don't need to change anything to install Umbraco. But when I check I FileZilla, it don't seem to the folder have write permission (777) ..

     So it might be that I need to change.. I'll give it a try..

    Bjarne

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Aug 16, 2011 @ 14:21
    Bjarne Fyrstenborg
    0

    It caused the error:

    Error loading XSLT eventsIcalExportAll.xslt
    Could not load file or assembly 'file:///C:\Windows\TEMP\etekvcgp.dll' or one of its dependencies. Access is denied.
      at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
      at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
      at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
      at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
      at System.Xml.Xsl.Xslt.Scripts.CompileAssembly(List`1 scriptsForLang)
      at System.Xml.Xsl.Xslt.Scripts.CompileScripts()
      at System.Xml.Xsl.Xslt.QilGenerator.Compile(Compiler compiler)
      at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
      at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
      at umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode)
      at umbraco.macro.getXslt(String XsltFile)
      at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)

    The file was accessed by impersonated user and not NETWORK_SERVICE, which had write permissions to the Temp folder.

    But now it works.

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft