Error parsing XSLT file: on all XSLTs when site is deployed
My site works fine locally but when I deployed it all the XSLTs break. I've spent quite a bit of time searching through the forms and trying different solutions. I verified the path to the files are correct, I recycled the application pool, compared the DLLs in the bin folder to the local bin, verified all xsltExtensions in the xsltExtensions.config file point to assembly="umbraco" and that the umbraco.dll exists. Also tried forcing the scripts to save in Umbraco and saving them.
When I attempted to save I got:
Error occured
System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.b__0() 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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I'm using version 4.9.0 and I'm using the built in \xslt\umbTopNavigation.xslt, \xslt\umb2ndLevelNavigation.xslt that are breaking as well as 1 custom file.
Thank you for the suggestion. I verified I don't have that umbraco.standardformhandlers.dll as well as any of the following:
a.Iron*.dll (= all DLLs starting with iron)
b.Microsoft.Scripting*.dll
c.Microsoft.Dynamic.dll
d.umbraco.macroEngines.legacy.dll
e.RazorEngine.Core.dll
f.RazorEngine.Templates.dll
g.VistaDB*.dll
I've added ?umbdebugshowtrace=true to the end of my URL and I'm not seeing any more information. In my web.config I updated to the following, hoping this would allow me to see my errors,but I still don't. Any ideas on how I could get better look at the error in attempts to find the root cause?
Do you have any additional or custom dlls you are using? Can you take a fresh download of 4.9 and put the dlls in the bin folder and replace the current ones (backup what you have first though)
Thank you for your suggestion. I took a look at the link and that's the same error message I'm getting. However, their solution had to do with them adding their own dlls to the bin, which I hadn't done. I downloaded Umbraco 4.9 again, removed all my files from the bin folder and pushed the bin contents of the new one up. I got an error, which I had forgotten I was getting before. Before I think I had just removed that dll and then I was able to see the site but had the xslt issue. So I'll bet this is related to the issue. I'll chase this path for a while, but anybody that knows a solution to this, I'd gladly take it :) Thanks!
Server Error in '/' Application.
Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.IO.FileLoadException: Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Helpers' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileLoadException: Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
[FileLoadException: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +34
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +152
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +77
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +16
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +38
[ConfigurationErrorsException: Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +752
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +218
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +170
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +91
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +258
System.Web.Compilation.BuildManager.ExecutePreAppStart() +135
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Is this website based on a clean installation of Umbraco 4.9 or did you start having issues after an upgrade? If so do you by any chance use uComponents?
It is a fresh install. What I did was installed it locally and built the site that way. Then I pushed it up to the server. I cleared all the files and pushed it up fresh and now I'm not getting the last error I posted regarding System.Web.Helpers, the site will display but the xslts still all won't parse and this is what I see when I try to save an xslt file via Umbraco:
Error occured
System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.macro.GetXsltExtensionsImpl() at umbraco.macro.b__0() 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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
One thing I should note is in my local installation the file structure varies a bit from the server. The packages folder is placed within the root of the application on the server whereas it's outside locally:
Would it help to start with a fresh Umbraco, run the setup installation on the server and then copy my database and files over?
I'm a bit puzzled why you have placed the packages folder outside of the Umbraco root folder locally?
However have you checked that the proper permissions have been set for the iusr and network service user on the root folder containing Umbraco?
If so have you then also made sure that if you have any custom XSLT extensions that you have also copied the xsltExtensions.config file to the live server where the extensions have been defined?
That's 2 of the things that comes to mind when reading your post above.
Thanks Jan! Yeah, I'm not sure why it installed like that locally, it's been so long I don't recall the process so it could very well have been something I did. I ususally work on existing Umbraco sites so it was my first from-scratch project.
What I ended up trying was a fresh Umbraco install on the server where the deployed site will be. I think pushed up my umbraco.config, embedded database and all the the needed files (media, xslts, masterpages, etc). The site now works just fine!
Error parsing XSLT file: on all XSLTs when site is deployed
My site works fine locally but when I deployed it all the XSLTs break. I've spent quite a bit of time searching through the forms and trying different solutions. I verified the path to the files are correct, I recycled the application pool, compared the DLLs in the bin folder to the local bin, verified all xsltExtensions in the xsltExtensions.config file point to assembly="umbraco" and that the umbraco.dll exists. Also tried forcing the scripts to save in Umbraco and saving them.
When I attempted to save I got:
Error occured
System.NullReferenceException: Object reference not set to an instance of an object.
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.b__0()
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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Any ideas would be greatly appreciated!
Are you using any custom .xslt files or just the standard Umbraco ones? Also which version of Umbraco are you running?
I'm using version 4.9.0 and I'm using the built in \xslt\umbTopNavigation.xslt, \xslt\umb2ndLevelNavigation.xslt that are breaking as well as 1 custom file.
Check out this thread, may help.
http://our.umbraco.org/forum/getting-started/installing-umbraco/22985-More-47-upgrade-problems
*Try removing the umbraco.standardformhandlers dll from the bin folder*
Thank you for the suggestion. I verified I don't have that umbraco.standardformhandlers.dll as well as any of the following:
a. Iron*.dll (= all DLLs starting with iron)
b. Microsoft.Scripting*.dll
c. Microsoft.Dynamic.dll
d. umbraco.macroEngines.legacy.dll
e. RazorEngine.Core.dll
f. RazorEngine.Templates.dll
g. VistaDB*.dll
I've added ?umbdebugshowtrace=true to the end of my URL and I'm not seeing any more information. In my web.config I updated to the following, hoping this would allow me to see my errors,but I still don't. Any ideas on how I could get better look at the error in attempts to find the root cause?
Thanks!
OK,
Maybe it's this:
http://our.umbraco.org/forum/getting-started/installing-umbraco/34541-Can%27t-create-new-XSLT-files-after-upgrading-from-48-to-49
Do you have any additional or custom dlls you are using? Can you take a fresh download of 4.9 and put the dlls in the bin folder and replace the current ones (backup what you have first though)
Thanks:
Matt
Thank you for your suggestion. I took a look at the link and that's the same error message I'm getting. However, their solution had to do with them adding their own dlls to the bin, which I hadn't done. I downloaded Umbraco 4.9 again, removed all my files from the bin folder and pushed the bin contents of the new one up. I got an error, which I had forgotten I was getting before. Before I think I had just removed that dll and then I was able to see the site but had the xslt issue. So I'll bet this is related to the issue. I'll chase this path for a while, but anybody that knows a solution to this, I'd gladly take it :) Thanks!
Server Error in '/' Application.
Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.IO.FileLoadException: Could not load file or assembly 'System.Web.Helpers' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
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.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Helpers' could not be loaded.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Hi Hilary
Is this website based on a clean installation of Umbraco 4.9 or did you start having issues after an upgrade? If so do you by any chance use uComponents?
/Jan
Hi Jan,
It is a fresh install. What I did was installed it locally and built the site that way. Then I pushed it up to the server. I cleared all the files and pushed it up fresh and now I'm not getting the last error I posted regarding System.Web.Helpers, the site will display but the xslts still all won't parse and this is what I see when I try to save an xslt file via Umbraco:
Error occured
System.NullReferenceException: Object reference not set to an instance of an object.
at umbraco.macro.GetXsltExtensionsImpl()
at umbraco.macro.b__0()
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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
One thing I should note is in my local installation the file structure varies a bit from the server. The packages folder is placed within the root of the application on the server whereas it's outside locally:
Would it help to start with a fresh Umbraco, run the setup installation on the server and then copy my database and files over?
Hi Hilary
I'm a bit puzzled why you have placed the packages folder outside of the Umbraco root folder locally?
However have you checked that the proper permissions have been set for the iusr and network service user on the root folder containing Umbraco?
If so have you then also made sure that if you have any custom XSLT extensions that you have also copied the xsltExtensions.config file to the live server where the extensions have been defined?
That's 2 of the things that comes to mind when reading your post above.
Hope this helps.
/Jan
Thanks Jan! Yeah, I'm not sure why it installed like that locally, it's been so long I don't recall the process so it could very well have been something I did. I ususally work on existing Umbraco sites so it was my first from-scratch project.
What I ended up trying was a fresh Umbraco install on the server where the deployed site will be. I think pushed up my umbraco.config, embedded database and all the the needed files (media, xslts, masterpages, etc). The site now works just fine!
Thanks for your help on this!
is working on a reply...