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

RadBinaryImage in web user control not showing for anonymous users

1 Answer 94 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 04 Jan 2011, 07:09 PM
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">
    <ItemTemplate>
        <h1>
            <telerik:RadBinaryImage ID="imgLogo" runat="server"
                AlternateText='<%# Eval("PortalName") %>' CssClass="floatleft"
                DataValue='<%# Eval("PortalImage") %>' />
            <asp:Label ID="PortalNameLabel" runat="server" Text='<%# Bind("PortalName") %>' />
        </h1>
    </ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="dsConfig" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="GetData" TypeName="dsConfigTableAdapters.qryConfigTableAdapter">
</asp:ObjectDataSource>

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?

1 Answer, 1 is accepted

Sort by
0
Accepted
Cori
Top achievements
Rank 2
answered on 05 Jan 2011, 02:11 PM
Hello Derek,

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

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

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

I hope that helps.
Tags
BinaryImage
Asked by
Derek
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or