当我尝试访问.less-file时,在IIS6站点中得到以下错误:
Detailed error information (authorized by permissions to functions)
Error occured 13.02.2013 10:30:19
User IP 93.89.112.52
User Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Url http://www.oppdal.kommune.no/Templates/SSP.MasterPages/Static/css/style.less
Referer (none)
Exception details:
ConfigurationErrorsException: Could not load type 'dotless.Core.LessCssHttpHandler ' from assembly 'dotless.Core'. (C:\prokom\Oppdal Kommune CMS6R2Newest2\web.config line 377)
Stack trace:
[ConfigurationErrorsException: Could not load type 'dotless.Core.LessCssHttpHandler
' from assembly 'dotless.Core'. (C:\prokom\Oppdal Kommune CMS6R2Newest2\web.config line 377)]
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)
at System.Web.Configuration.HttpHandlerAction.Create()
at System.Web.Configuration.HandlerFactoryCache..ctor(HttpHandlerAction mapping)
at System.Web.HttpApplication.GetFactory(HttpHandlerAction mapping)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[Inner exception TypeLoadException: Could not load type 'dotless.Core.LessCssHttpHandler
' from assembly 'dotless.Core'.]
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)httpHandlers中的Web.config -部分:
<add type="
dotless.Core.LessCssHttpHandler
,dotless.Core" validate="false"
path="*.LESS" verb="*" />1.3.1.0版本的dotless.Core在bin-文件夹中。
这个问题的原因是什么?我该如何解决它?
发布于 2013-04-01 01:22:51
我把我的放到了错误的httpHandlers部分。它放在system.web部分,而不是system.webServer部分。
我还发现了这个:Unable to get dotLess to work
它对我不起作用,但它给了我一个提示,我把它放在了错误的地方。
发布于 2019-10-28 16:15:23
在最后一个版本上是不同的:
<add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.AspNet" resourceType="File" preCondition="" />https://stackoverflow.com/questions/14850321
复制相似问题