Wednesday 15 September 2010

asp.net mvc - Illegal characters in path. while bundles javascript files -


I am trying to bundle my javascrip files and CSS files into the My MVC project. Throwing an exception while adding it. Illegal characters in the path

 : An uncontrolled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where the code has originated from it. Exception description: System. Archive Exception: Illegal characters in path source error: line 9: public static void RegisterBundles (BundleCollection bundles) Line 10: {Line 11:. Include Bundles.Add (New ScriptBundle ("~ / bundles / jQuery") ("~ / script / jquery- {version} .js", line 12: "~ / js / bootstrap.js", line 13: " ~ / Js / jquery.flexslider-min.js "~ / js / jquery.isotope.js" "~ / js / jquery.fancybox.pack.js? V = 2.1.0" "~ / RS-plugin / js / Jquery.themepunch.plugins.min.js "" ~ / RS-plugin / js / jquery.themepunch.revolution. Min.js "" / / js / revolution.custom.js "" / / js / custom.js ")); Stack trace: [ArgumentException :. Illegal characters en] System.IO.Path.CheckInvalidPathChars (String path, Boolean checkAdditional) 10,631,190 System.Security.Permissions.FileIOPermission.CheckIllegalCharacters (String [] str) using +30 System.Security.Permissions .FileIOPermission.AddPathList (FileIOPermissionAccess , AccessControlActions control, string [] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) using 97 System.Security.Permissions.FileIOPermission..ctor (FileIOPermissionAccess, string path) 63 System.Web. InternalSecurityPermissions.PathDiscovery (String path) +29 System.Web.HttpRequest.MapPath (VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) 149 System.Web.HttpServerUtility.MapPath (String path) 104 System.Web.Optimization.BundleTable. & Lt; Get_MapPathMethod & gt; b__0 (string virtualPath) 67 System.Web.Optimization.ItemRegistry.Include (String [] virtualPaths) [644 System.Web.Optimization.Bundle.Include (Strin C] Virtual path) +64 IntensifyTech.IntensifyTechConfig.RegisterBundles (bundled compilation bundles ) c: \ users \ sxxx \ SkyDrive \ Trunk \ IntensifyTech \ IntensifyTech \ App_Start \ IntensifyTechConfig.cs: 11 IntensifyTech.MvcApplication.Application_Start () in C: \ users \ sxxxx \ SkyDrive \ Trunk \ IntensifyTech \ IntensifyTech \ Global.asax. cs: 24 [HttpException (0x80004005): illegal character in the path.] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode (HttpContext context, HttpApplication app) + 9 859725 System.Web. HPAPCirmation Registrar Avent Subscriptions IIS (ITPPR App CONTAx, HTTP Contact Reference, Methodindia [] Handler) +118 System Web. HTTP application. Init Special (HTTPPTecution State, MathDinfo [] Handlers, Interpet App Contact, HTTP Contact Reference) +172 System. Web. Hpapitalizationfitter Gate Special Application (IntPtr appContext, HttpContext References) 336 System.Web.Hosting.PipelineRuntime.InitializeApplication (IntPtr appContext) 296 [HttpException (0x80004005): Invalid character tracer in path.] System.Web.HttpRuntime.FirstRequestInit (HttpContext Reference) + 9873912 System.Web.HttpRuntime.EnsureFirstRequestInit (HttpContext Reference) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest wr, HttpContext Reference) +254    

Yes, of course this item:" ~ / js / jquery.fancybox.pack.js? V = 2.1.0 ". This is a virtual path, not a URL, so '?' Characters in this context are invalid.

No comments:

Post a Comment