我的本地服务器上的一切都很好。但是,在我发布到我的托管环境后,即使我从style.less文件中删除了所有内容,也会发生以下错误:
Message: Object doesn't support this property or method
Engine name: MSIE JavaScript engine
Engine version: Classic
Error code: -2146827850
Category: Microsoft JScript runtime error
Line number: 9
Column number: 17006
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: BundleTransformer.Core.Translators.AssetTranslationException:
During translation of LESS-code, readed from the file /Content/custom/style.less,
to CSS-code syntax error has occurred.
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.
Stack Trace:
AssetTranslationException: During translation of LESS-code, readed from the file '/Content/custom/style.less', to CSS-code syntax error has occurred. See more details:
BundleTransformer.Less.Translators.LessTranslator.InnerTranslate(IAsset asset, LessCompiler lessCompiler, Boolean enableNativeMinification) +270
BundleTransformer.Less.Translators.LessTranslator.Translate(IAsset asset) +166
BundleTransformer.Core.HttpHandlers.AssetHandlerBase.InnerTranslateAsset(String translatorName, IAsset asset, ITransformer transformer, Boolean isDebugMode) +97
BundleTransformer.Less.HttpHandlers.LessAssetHandler.TranslateAsset(IAsset asset, ITransformer transformer, Boolean isDebugMode) +28
BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessAsset(String assetVirtualPath, String bundleVirtualPath) +195
BundleTransformer.Core.HttpHandlers.AssetHandlerBase.GetProcessedAssetContent(String assetVirtualPath, String bundleVirtualPath) +206
BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessRequest(HttpContextBase context) +227
HttpException (0x80004005): During translation of LESS-code, readed from the file '/Content/custom/style.less', to CSS-code syntax error has occurred. See more details:
BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessRequest(HttpContextBase context) +288
BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessRequest(HttpContext context) +40
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
答案 0 :(得分:0)
我在安装了 IE8 的Windows Server 2008R2 Service Pack1上遇到了同样的问题。在我将IE更新到最新版本后,问题就消失了。