Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Houghton 33 posts 108 karma points
    Nov 06, 2017 @ 14:08
    David Houghton
    0

    Illegal charecters in path exception on the server.

    Hey all, having some issues on the live server, throwing an exception, details below:

    Exception information: 
        Exception type: ArgumentException 
        Exception message: Illegal characters in path.
       at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
       at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters(String[] str)
       at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
       at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
       at System.Web.InternalSecurityPermissions.PathDiscovery(String path)
       at System.Web.HttpRequest.get_PhysicalPath()
       at UrlRewritingNet.Web.UrlRewriteModule.OnBeginRequest(Object sender, EventArgs e)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    

    With the request information...

        Request URL: http://www.xxx.co.uk/Assets/fonts/north/north-webfont.woff2) format("woff2"), url(/Assets/fonts/north/north-webfont.woff) format("woff" 
        Request path: /Assets/fonts/north/north-webfont.woff2) format("woff2"), url(/Assets/fonts/north/north-webfont.woff) format("woff" 
        User host address: xxx.xxx.xxx.xxx 
        User:  Is authenticated: False 
        Authentication Type:  
    

    So its looking like this error is something to do with this webfont, ive added both .woff and .woff2 as mimetypes as font/woff and font/woff2 respectively on the live server thinking that is what was causing my issue but still the live server event logs show this as a repeatable exception.

    The way the css is handled here is as follows, I write all my css as smaller less files which I then compile together as the complete sheet for the page, however once this is over, I then pass the css through .net bundling which grabs all other dependancies for the page and bundles these all together.

    Vague description I know, but im a little unsure where this error could be thrown, even stranger is that this error wasnt captured locally, so theres something about my code that is causing a problem, but i cant think what it could be so any help here is greatly appreciated.

    Thanks all.

Please Sign in or register to post replies

Write your reply to:

Draft