Telerik.Web.UI.InsecureExternalStyleSheetException

4 posts, 0 answers
  1. kfrancis
    kfrancis avatar
    69 posts
    Member since:
    Dec 2008

    Posted 07 Apr Link to this post

    Hi,

    I'm starting to profile my site locally (using http://www.prefix.io/) and I see the following exceptions that I can't seem to control:

    Telerik.Web.UI.InsecureExternalStyleSheetException: empty string
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference

    System.ArgumentException: Illegal characters in path.
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.QuickDemand
      at System.IO.Path.GetFullPath
      at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath
      at System.IO.Path.CheckInvalidPathChars
      at System.Security.Permissions.FileIOPermission.CheckIllegalCharacters
      at System.Security.Permissions.FileIOPermission.AddPathList
      at System.Security.Permissions.FileIOPermission..ctor
      at System.Web.InternalSecurityPermissions.PathDiscovery
      at System.Web.HttpRequest.MapPath
      at System.Web.HttpServerUtility.MapPath
      at Telerik.Web.UI.ExternalScriptHelper.ResolveSecurePath
      at Telerik.Web.UI.RadScriptManager.OnResolveScriptReference

    I can't seem to actually catch this exception during run time (debugging with all exceptions turned on), nor do I see any way to ignore/stop that exception from being used. Any ideas?

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 12 Apr Link to this post

    Hi,

    Can you paste the markup of the StyleSheetManager or StyleSheetManager configuration from the web.config? 

    Thanks

    Regards,
    Hristo Valyavicharski
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. kfrancis
    kfrancis avatar
    69 posts
    Member since:
    Dec 2008

    Posted 12 Apr in reply to Hristo Valyavicharski Link to this post

    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
    <add key="Telerik.Skin" value="Default" />
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />
    <add key="Telerik.Web.UI.StyleSheetFolders" value="~/Content;~/Scripts" />
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 13 Apr Link to this post

    Why you set Scripts forlder for the stylesheetmanager. Try this:

    <appsettings> <add key="Telerik.Web.UI.ScriptFolders" value="~/Scripts/;"/> </appsettings>

    http://docs.telerik.com/devtools/aspnet-ajax/controls/scriptmanager/combining-external-scripts

    Regards,
    Hristo Valyavicharski
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top