This is a migrated thread and some comments may be shown as answers.

Telerik.Web.UI.InsecureExternalStyleSheetException

3 Answers 410 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Kori
Top achievements
Rank 2
Kori asked on 07 Apr 2016, 02:15 PM

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?

3 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 12 Apr 2016, 07:26 AM
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.
0
Kori
Top achievements
Rank 2
answered on 12 Apr 2016, 05:30 PM
<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" />
0
Hristo Valyavicharski
Telerik team
answered on 13 Apr 2016, 05:16 AM
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.
Tags
ScriptManager and StyleSheetManager
Asked by
Kori
Top achievements
Rank 2
Answers by
Hristo Valyavicharski
Telerik team
Kori
Top achievements
Rank 2
Share this question
or