Telerik MVC3 ScriptRegistrar Объединить исключение - PullRequest
1 голос
/ 08 марта 2012

Выдает исключение, когда я пытаюсь объединить сценарии в 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))

, когда я удаляю объединение (.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

1 Ответ

3 голосов
/ 25 марта 2012

"Common.js? V = 1.1" не является допустимым путем к файлу.ScriptRegistrar нужен правильный путь, потому что он должен прочитать файл из файловой системы.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...