Copied to clipboard

Flag this post as spam?

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


  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 09:35
    Ben
    0

    Xslt doesn't run on a different machine

    Hi,

    I have copied my site to another server, and now I get some strange xslt errors - for the same macros that run well on the old server. umbDebugShowTrace shows me the following:


    Could not load file or assembly 'file:///C:\Windows\TEMP\tbsf-dsc.dll' or one of its dependencies. Access is denied.
      at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
      at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
      at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
      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.QilGenerator.CompileStylesheet(Compiler compiler)
      at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
      at System.Xml.Xsl.XslCompiledTransform.CompileXsltToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
      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.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode) in E:\umbraco-9199e2377587\Copy of umbraco_9199e2377587\umbraco\presentation\macro.cs:line 620
      at umbraco.macro.getXslt(String XsltFile) in E:\umbraco-9199e2377587\Copy of umbraco_9199e2377587\umbraco\presentation\macro.cs:line 600
      at umbraco.macro.loadMacroXSLT(macro macro, Hashtable attributes, Hashtable pageElements) in E:\umbraco-9199e2377587\Copy of umbraco_9199e2377587\umbraco\presentation\macro.cs:line 677

     

    I can't find any inforamtion about the error. Can you guess what the issue is?

    Ben

  • Lee 1130 posts 3088 karma points
    Jan 26, 2012 @ 10:22
    Lee
    0

    That looks like a permission error, make sure where you have the site running has the correct permissions and the application pool is running under network service.

  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 10:29
    Ben
    0

    This is v4.0.4 site. The app pool runs under network service, asp.net 2.0(calssic).

    I gave  the Full Control permission to Everyone on the root directory (just to check if it helps), but I still see the error...

  • Lee 1130 posts 3088 karma points
    Jan 26, 2012 @ 10:30
    Lee
    0

    Restarted IIS and clear your windows temp files and try again, its still pointing towards a permission problem.

  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 10:42
    Ben
    0

    I did this and I get the same error, maybe I have to give NETWORK_SERVICES a permission on the windows temp directory?

  • Jacob Jensen 40 posts 60 karma points
    Jan 26, 2012 @ 10:50
    Jacob Jensen
    0

    Please check ur permissions to the folder :

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

     

     


     

     

     

     

     

  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 10:52
    Ben
    0

    IIS USR has every permission except Full Control

    NETWORK_SERVICES has no permission on this directory

  • Jacob Jensen 40 posts 60 karma points
    Jan 26, 2012 @ 10:53
    Jacob Jensen
    0

    add network service to the folder, just give it full control.

    /J

  • Jacob Jensen 40 posts 60 karma points
    Jan 26, 2012 @ 10:56
    Jacob Jensen
    0

    and "users", give em full control to.

  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 11:05
    Ben
    0

    I gave users, IIS_USERS and NETWORK_SERVICE full control, then I restarted the iis, but the error is still showing up... :/

  • Jacob Jensen 40 posts 60 karma points
    Jan 26, 2012 @ 11:06
    Jacob Jensen
    0

    try look at this one:

    ww.google.dk/#sclient=psy-ab&hl=da&source=hp&q=could not load file or assembly access is denied asp.net

    EDIT: search on google = could not load file or assembly access is denied asp.net

    There are different solutions to fix the problem, some just give "everyone" full control.

     

  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 11:32
    Ben
    0

    I found no helpful suggestion in the google results.

    I have noticed that the xslt files taht can't be loaded include c# code (I'm not the xslt creator). It looks like:

    <msxsl:script language="CSharp" implements-prefix="ncscript">

    public int count = 0;

     

    public int Inc()

    {

     return ++count;

    }

    </msxsl:script>

     

    Xslt files with no c# code work well, so maybe that's the problem ?

  • Rodion Novoselov 694 posts 859 karma points
    Jan 26, 2012 @ 15:25
    Rodion Novoselov
    0

    This error is quite typical for .NET 2 since it uses C:\WINDOWS\Temp folder to store dynamically emitted assemblies (like the ones that are used for serialisation, compiled transform, etc). I've seen this error billion times working with some old versions of DotNetNuke (for some unknown reason it used to be prone to it lots). Just make sure one more time that the process that is trying to do that has at least "Modify" permission to that folder.

  • Ben 91 posts 111 karma points
    Jan 26, 2012 @ 15:42
    Ben
    0

    Hi guys,

    I gave Full Control permission to Everyone on 'c:\windows\temp' and now it seems like the problem is resolved, but I have too many files with Full Control permission for Everyone. Do you know a good guide that will help me to reorganize the permissions?

Please Sign in or register to post replies

Write your reply to:

Draft