RadBinaryImage in web user control not showing for anonymous users

2 posts, 1 answers
  1. Derek
    Derek avatar
    118 posts
    Member since:
    Oct 2008

    Posted 04 Jan 2011 Link to this post

    We have a web user control that is used to display a logo and title on a master page, on a site that is using forms authentication. The control displays properly on pages when the user is authenticated, but on the login page only the text shows up, not the image. Here's the web control;

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="LogoAndTitle.ascx.vb"
        Inherits="assets_controls_LogoAndTitle" %>
    <link href="../css/Site.css" rel="stylesheet" type="text/css" />
    <asp:FormView ID="FormViewLogo" runat="server" DataKeyNames="ConfigID" DataSourceID="dsConfig">
                <telerik:RadBinaryImage ID="imgLogo" runat="server"
                    AlternateText='<%# Eval("PortalName") %>' CssClass="floatleft"
                    DataValue='<%# Eval("PortalImage") %>' />
                <asp:Label ID="PortalNameLabel" runat="server" Text='<%# Bind("PortalName") %>' />
    <asp:ObjectDataSource ID="dsConfig" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetData" TypeName="dsConfigTableAdapters.qryConfigTableAdapter">

    If the user isn't authenticated (yet), ie on the login page, the label shows up, but not the image. The image is stored in a database table, along with the title.

    Any ideas?
  2. Answer
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 05 Jan 2011 Link to this post

    Hello Derek,

    You need to add this line to your web.config file:

    <location path="Telerik.Web.UI.WebResource.axd">
                    <allow users="*" />        

    This is the file Telerik uses to display the RadBinaryImage's and the skin files used by their controls.

    I hope that helps.
  3. DevCraft R3 2016 release webinar banner
Back to Top