【发布时间】:2012-03-08 08:04:37
【问题描述】:
当我尝试将 ScriptRegistrar(Telerik 版本 2011.3.1115)中的脚本与此代码组合时,它会引发异常:
@Html.Telerik().ScriptRegistrar().DefaultGroup(c => c.DefaultPath("~/Scripts/").Add("jquery.tools.min.js").Add("Common.js?v=1.1").Add("date.js").Add("jquery.validate.min.js").Add("jquery.validate.unobtrusive.min.js").Add("jquery.notty.js").Combined(true))
当我删除 combine (.Combined(true)) 时效果很好(希望我没有组合脚本)。
例外是:
Server Error in '/' Application.
Illegal characters in path.
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.ArgumentException: Illegal characters in path.
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:
[ArgumentException: Illegal characters in path.]
System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str) +9360949
System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +73
System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) +43
System.IO.File.GetLastWriteTimeUtc(String path) +107
System.Web.Compilation.TimeStampChecker.AddFileInternal(String virtualPath, String path) +33
System.Web.Hosting.MapPathBasedVirtualFile.Open() +46
System.Web.Hosting.VirtualPathProvider.OpenFile(String virtualPath) +31
Telerik.Web.Mvc.Infrastructure.Implementation.VirtualPathProviderWrapper.ReadAllText(String virtualPath) +120
Telerik.Web.Mvc.Infrastructure.Implementation.WebAssetGroupReader.Read(WebAssetGroup group) +286
Telerik.Web.Mvc.WebAssetHttpHandler.ProcessRequest(HttpContextBase context) +340
Telerik.Web.Mvc.Infrastructure.HttpHandlerBase.ProcessRequest(HttpContext context) +63
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
【问题讨论】:
标签: asp.net-mvc-3 telerik