RadWindow popup only working on local host

2 posts, 0 answers
  1. Justin
    Justin avatar
    20 posts
    Member since:
    Jul 2011

    Posted 21 Sep 2011 Link to this post

    Hello,

    I have created a rad window popup inside of a web page that passes back data to it's parent, very similar to the demo you provide on your website. The code works perfectly fine in my local dev environment (VS2010), however when we test the same code on another web server the radwindow gives an exception stating '...file does not exist'. We added some logging and it seems to be looking for a code behind file that frankly for what purpose we do not understand. It seems to fail on the .Show() method of the radwindow itself as far as we can tell, when looking for this file.

    Again the code works fine locally.

    Here is how we have the window set up on the parent page:

    <telerik:RadWindowManager ID="RadWindowManager1" <br>ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="true" runat="server" EnableShadow="True" <br>VisibleTitlebar="true" EnableTheming="True" AutoSize="true" Behaviors="None" Skin="Forest"><br>    <Windows><br>        <telerik:RadWindow ID="rwChemicalCropApplicationRates" runat="server" <br>                            Behaviors="Close, Move"<br>                            OnClientClose="rwChemicalCropApplicationRates_Close"<br>                            NavigateUrl="Dialogs/ModifyCropApplicationRate.aspx" Skin="Telerik"><br>        </telerik:RadWindow><br>    </Windows><br></telerik:RadWindowManager>

    On the radwindow itself we just use javascript to pass some of the data back to the parent page.

    Again please note this all works perfectly fine in Visual Studio 2010, when we publish the code to another web server this popup (and only this one) does not work.

    I am hoping you can help me look in the right direction.

    Please let me know what other information, if any, I can provide.

    Thank you very much in advance.
  2. Justin
    Justin avatar
    20 posts
    Member since:
    Jul 2011

    Posted 21 Sep 2011 Link to this post

    Problem solved...

    There is an error in one of the telerik demos and no indication that it will cause an error.

    Problem is with the declaration at the top of the .aspx page, more specifically with 'CodeFile'.

    Here is the code we had at the top of the page. Please note this example was copied directly from the demo on 'Returning Values From a Dialog' (some parts obviously modified). Notice that we declare 'CodeFile' here:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModifyCropApplicationRate.aspx.cs" Inherits="OnDemand.Pages.Dialogs.ModifyCropApplicationRate" %>

    When in fact 'CodeFile' should be 'CodeBehind' as follows:

    <%@ Page Language="C#" AutoEventWireup="true"
    CodeBehind="ModifyCropApplicationRate.aspx.cs"
    Inherits="OnDemand.Pages.Dialogs.ModifyCropApplicationRate" %>

    Again the first block of code will work in local dev environment, but when published to a production server, the page will simply fail, with really no indication why. After adding some logging we kept receiving and error message stating that the above code behind file did not exist. Similarly there was no documentation of any sort anywhere that this would cause problem.

    Took forever to figure this out and I am surprised that no one else has run into this problem as this was taken right from telerik's demo.

    Hopefully this saves someone else from wasting an incredible amount of time.

    Might I suggest changing the demo or perhaps providing some indication that this will cause an error.

    Thanks,
    -Justin
Back to Top