Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
WebAppStylist / StyleSetPath property cannot use .NET root-relative URLs ( " ~/ ")
posted

When I set the StyleSetPath property using a root-relative URL (using a leading tilde (~)), I get this error--
"Cannot use a leading .. to exit above the top directory."

This occurs in any and all of these scenarios--

  • Development environment (http://localhost/sitename)
  • Production environment (http://www.domain.com)
  • Set in web.config as <infragistics.web styleSetName="Default" styleSetPath="~/relativepath/StyleSets" />
  • Set at Design-Time in WebPageStyler control properties
  • Set at Run-Time in WebPageStyler.StyleSetPath property
  • Set at Design-Time in any IG control with EnableAppStyling property set to "False."
  • Set at Run-Time in any IG control in IGControlID.StyleSetPath, with IGControlID.EnableAppStyling = False.
  • WebPageStyler control and/or other IG control added to a UserControl.
  • WebPageStyler control and/or other IG control added to a web page.

 

In other words, there is NO situation where I can use a root-relative URL for the StyleSetPath property of ANY control without throwing the error.

Root-relative URLs work for each and every other control and property that normally supports it.

Root-relative URLs work for every Infragistics path property EXCEPT StyleSetPath.

The ONLY workaround I have been able to find is to use this syntax at Run-Time--
WebPageStyler.StyleSetPath = HttpContext.Current.Request.ApplicationPath & "/relativePath/StyleSets."

I must do this for EVERY page or UserControl where I need the StyleSetPath, since there is no web.config syntax equivalent to HttpContext.Current.Request.ApplicationPath, other than root-relativee (~/) URL.

This is clearly a bug. I can't find where to submit bug reports, so I sent it in as a support request, and I'm posting it here.

  • 45049
    posted

    dhaggard said:
    I can't find where to submit bug reports, so I sent it in as a support request, and I'm posting it here.

    Submitting a support request is the way to report potential bugs to us.

    Thank you for taking the time to inform us about this issue.  Developer Support will investigate the issue and provide you with further information.