RadUpload Ajax callback error. Source url returned invalid content:

Thread is closed for posting
10 posts, 1 answers
  1. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 28 Jan 2010 Link to this post

    Hi,
    I have a problem with my radUpload.
    I have an application with a RadTabStrip :
    In the first tab, you can upload file and in the second tab you can see the uploaded file in a Radgrid (which contains the filename, uploaded date, comments, and an imageButton to download the file).

    My application works great on IE but on Firefox I have an issue when I click on the imagebutton to download the file$
    (the problem doesn't appear when I download a file the first time but when I want to download a second file).

    The error message :
    RadUpload Ajax callback error. Source url returned invalid content:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="ctl00_Head1"><title>
        Untitled Page
    </title><link rel="stylesheet" type="text/css" href="../Styles/Gestion_fichier.css" /><link rel="stylesheet" type="text/css" href="../Styles/Header.css" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2sWvmp8JHWejDpn6-UaQ38hwQonICRE7G3ul_7K0cMs0A2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2utFtjFTBITBWrDphFdnooY_qJTMmw1rrCaL2NoqNHWGvZBVxsxtbUM7wUHY-N4j281&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2uiogmc2JCHZb67Xisq151i0&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2vWjFu0k0k3jG-8uQL88ac4ISEI2PCZ3vDTwrL8V5ZvQ2-V0uMWSpjQB9QFq_6UDaw1&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2vkbJZdD6cZC76fLGZFaelQ0&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2vyp7Dg5URUdEc6glbCIWcMZBWz2gKoKPM682CK9kltOw2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2urlITzqvOXImacYqbcX_Z01uExUTOOzgAtCdkz-A20yA2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2sKPX7Ghyc3_17zEDcSu5VnPJhTVXnlOdlDvENl-A7ZGyI9dDMGWXK3qZrlzGeRtno1&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2stKf62BY4e4dAinxsKQApN4d14TnoC-NFdLijphxZqxA2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2tqhg6bUumop9np7RVQ_VxcSUUtTGR_F1lgmPg2aAHrKw2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2uPBOEiQiTg7uCG6hu-2nRFmyB_ujs7eQ0qJqgwJ2j5PNQL-MNGS_KX4oI8m1ZWLcM1&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2t9QwP3zAW5-qwz9T7Jmfip0&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2um4yb8g64amKHg5AE-iq9fBVTSMZRqVtE92rDTa-5xxQ2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2t3AnAKRvVKMNkU84gfskd50&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2ubM9zNfHzdCreqigUeqVwf_CKktbVWgdEdloXYRiG61Q2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2tSiodf94wY6RG88P6wr_xtPEGUpwOQhXWiGNOcq1FH4u0mwA5DzxuAz_1Nh2h11ew1&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/WebResource.axd?d=JzhdWPeE-cy7nyq3-m2MBHAEjXTU-13nbeox9brqq2sOhtA_HgfRw9wo7i25Rc9MQuSUAudz1gxT_pq5M_74Tw2&amp;t=633927821740000000" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /></head>
    <body>
        <form name="aspnetForm" method="post" action="DepotFichier.aspx?RadUrid=069d2777-ae4d-4aae-b320-7133ba2c60b8" id="aspnetForm">
    <div>
    <input type="hidden" name="ctl00_ContentPlaceHolder1_RadScriptManager1_HiddenField" id="ctl00_ContentPlaceHolder1_RadScriptManager1_HiddenField" value="" />
    <input type="hidden" name="__EVENTTARGET" id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LDqXB1YmxpcXVlIHRjaMOocXVlHwMFAkNaHwpoZGQCFA8PFgYfBwUIUm91bWFuaWUfAwUCUk8fCmhkZAIVDw8WBh8HBQZSdXNzaWUfAwUCUlUfCmhkZAIWDw8WBh8HBQlTbG92YXF1aWUfAwUCU0sfCmhkZAIXDw8WBh8HBQlTbG92w6luaWUfAwUCU0kfCmhkZAIYDw8WBh8HBQZTdWlzc2UfAwUCQ0gfCmhkZAIZDw8WBh8HBQdUdXJxdWllHwMFAlRSHwpoZGQCGg8PFgYfBwUHVWtyYWluZR8DBQJVQR8KaGRkAgkPDxYCHwcFGkZpY2hpZXIgw6AgdHJhbnNmw6lyZXIqIDogZGQC


    My .aspx :
    <%@ Page Language="C#" MasterPageFile="~/Backoffice/Header.master" AutoEventWireup="true" CodeFile="DepotFichier.aspx.cs" Inherits="Backoffice_DepotFichier_DepotFichier" Title="Untitled Page" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"
        <script type="text/javascript">  
            function Validation_fichier(sender, eventArgs) 
            { 
                var input = eventArgs.get_fileInputField();            
                var nomfichier = input.value; 
                if (nomfichier != ""
                { 
                    Obj = document.getElementById("submit"); 
                    if (Obj) 
                    { 
                        Obj.style.display = ""
                    } 
                }                         
            } 
            function refreshDepotFichier() 
            { 
                var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID%>"); 
                ajaxManager.ajaxRequest('RefreshDepotFichier'); 
            } 
            function refreshDepotFichierZip() 
            { 
                var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID%>"); 
                ajaxManager.ajaxRequest('RefreshDepotFichierZip'); 
            }         
        </script> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadProgressManager ID="RadProgressManager1" runat="server" EnableTheming="True" /> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" ControlsToSkip="Textbox" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager_AjaxRequest">        
            <AjaxSettings> 
                <telerik:AjaxSetting> 
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings>     
        </telerik:RadAjaxManager>   
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
        </telerik:RadAjaxLoadingPanel> 
        <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose" 
                Width="650" Height="80" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" 
                Position="MiddleRight" ShowEvent="OnClick"
        </telerik:RadToolTipManager>  
        <telerik:RadWindowManager ID="RadWindow" runat="server" ReloadOnShow="True" VisibleStatusbar="False" Behaviors="Move, Close" Animation="Resize"
            <Windows> 
                <telerik:RadWindow ID="RadWindowValidationFichier" runat="server" Width="480px" Height="480px" OnClientClose="refreshDepotFichier" Animation="Resize" Behaviors="Move" Title="Validation fichier" VisibleStatusbar="False" ShowContentDuringLoad="False" Behavior="Move" InitialBehavior="None" Left="" Top=""></telerik:RadWindow> 
                <telerik:RadWindow ID="RadWindowValidationZip" runat="server" Width="480px" Height="480px" OnClientClose="refreshDepotFichierZip" Animation="Resize" Behaviors="Move" Title="Validation fichier compress&#233;" VisibleStatusbar="False" ShowContentDuringLoad="False" Behavior="Move" InitialBehavior="None" Left="" Top=""></telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager>    
        <div id="divTitre_KoosMos" style="width:980px; margin:auto;"
            <div style="padding: 3px 0px 0px 0px; margin: 0px 0px 0px 30px;"
                <asp:Literal ID="trad_listeAppli" runat="server" Text="Gestion de fichier" /> 
                <asp:Label ID="lbl_test" runat="server" Text="" ForeColor="red"></asp:Label> 
            </div> 
        </div> 
        <div style="width:980px; margin:auto; margin-top:10px;"
            <telerik:RadTabStrip ID="RadTabGestionFichier" runat="server" MultiPageID="RadMultiPageGestionFichier" 
                ShowBaseLine="True"
                <Tabs> 
                    <telerik:RadTab runat="server" PageViewID="RadPageViewDepose" Value="1" Selected="true"
                    </telerik:RadTab> 
                    <telerik:RadTab runat="server" PageViewID="RadPageViewSuivi" Value="2"
                    </telerik:RadTab> 
                </Tabs> 
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage ID="RadMultiPageGestionFichier" runat="server"
                <telerik:RadPageView ID="RadPageViewDepose" runat="server" Selected="true"
                    <div class="cadre_depose" style="padding-top:20px;"
                        <div style="width:400px; margin:auto;"
                            <div> 
                                <div style="float:left; margin-right:40px; margin-top:4px;"
                                    <asp:Label ID="mtrad_lbl_ipn" runat="server" Text="[IPN] : "></asp:Label> 
                                    <asp:Label ID="lbl_ipn_value" runat="server"></asp:Label> 
                                </div> 
                                <div style="float:left; margin-top:4px;"
                                    <asp:Label ID="mtrad_lbl_pays" runat="server" Text="[Pays] : "></asp:Label> 
                                </div> 
                                <div> 
                                    <telerik:RadComboBox ID="RCB_Pays" runat="server" Skin="Default"
                                    </telerik:RadComboBox> 
                                </div> 
                            </div> 
                            <div style="clear:both; margin-top:20px;"
                                <asp:Label ID="mtrad_lbl_transfert" runat="server" Text="[Fichier à transférer] : "></asp:Label> 
                                <telerik:RadUpload ID="RadUpload1" runat="server" Culture="french" ControlObjectsVisibility="None" OverwriteExistingFiles="false" OnClientFileSelected="Validation_fichier" AllowedFileExtensions=".txt,.zip,.tar,.gz" InputSize="50" ReadOnlyFileInputs="True"
                                </telerik:RadUpload>  
                            </div> 
                            <div id="submit" style="margin-top:20px; display:none;"
                                <asp:Button ID="trad_submit_fichier" runat="server" Text="Analyser" OnClick="submit_fichier_Click" /> 
                            </div> 
                        </div> 
                        <div style="width:400px; margin:auto; margin-top:20px;"
                            <asp:Label ID="lbl_msg" runat="server" ForeColor="red" Visible="false"></asp:Label> 
                        </div> 
                        <telerik:RadProgressArea ID="RadProgressArea1" runat="server" Width="400px" Culture="French" style="position:absolute; top:190px; left:400px;" DisplayCancelButton="True" ProgressIndicators="TotalProgressBar, TotalProgress, TotalProgressPercent, RequestSize, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed" EnableTheming="True"
                            <Localization Uploaded="Uploaded" /> 
                        </telerik:RadProgressArea> 
                    </div> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageViewSuivi" runat="server"
                    <div class="cadre_suivi" style="padding-top:10px"
                        <div class="filtre"
                            <table width="100%"
                                <tr> 
                                    <td> 
                                        <asp:Label ID="mtrad_lbl_nom_fichier" runat="server" Text="[Nom fichier] :"></asp:Label> 
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="tb_fichier" runat="server" CssClass="txbox"></asp:TextBox> 
                                    </td> 
                                    <td> 
                                        <asp:Label ID="mtrad_lbl_date_reception" runat="server" Text="[Date réception] :"></asp:Label> 
                                    </td> 
                                    <td> 
                                        <telerik:RadDatePicker ID="RadDatePickerDeb" runat="server" Skin="Default" Width="100px"
                                            <Calendar ID="CalendarDeb" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                                            </Calendar> 
                                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                                        </telerik:RadDatePicker> 
                                    </td> 
                                    <td> 
                                        <asp:Label ID="mtrad_lbl_date_traitement" runat="server" Text="[Début traitement] :"></asp:Label> 
                                    </td> 
                                    <td> 
                                        <telerik:RadDatePicker ID="RadDatePickerDebTrt" runat="server" Skin="Default" Width="100px"
                                            <Calendar ID="CalendarDebTrt" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                                            </Calendar> 
                                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                                        </telerik:RadDatePicker> 
                                    </td> 
                                    <td> 
                                        <asp:Label ID="mtrad_lbl_etat" runat="server" Text="[Etat] :"></asp:Label> 
                                    </td> 
                                    <td> 
                                        <telerik:RadComboBox ID="RadComboBoxEtat" runat="server"
                                        </telerik:RadComboBox> 
                                    </td> 
                                    <td> 
                                        <asp:ImageButton ID="ImgFiltrer" runat="server" ImageUrl="~/Backoffice/Images/search.gif" OnClick="ImgFiltrer_Click" /> 
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td> 
                                        <asp:Label ID="mtrad_lbl_origine" runat="server" Text="[Origine] :"></asp:Label> 
                                    </td> 
                                    <td> 
                                        <asp:TextBox ID="tb_origine" runat="server" CssClass="txbox"></asp:TextBox> 
                                    </td> 
                                    <td>&nbsp;</td> 
                                    <td> 
                                        <telerik:RadDatePicker ID="RadDatePickerFin" runat="server" Skin="Default" Width="100px"
                                            <Calendar ID="CalendarFin" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                                            </Calendar> 
                                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                                        </telerik:RadDatePicker> 
                                    </td> 
                                    <td>&nbsp;</td> 
                                    <td> 
                                        <telerik:RadDatePicker ID="RadDatePickerFinTrt" runat="server" Skin="Default" Width="100px"
                                            <Calendar ID="CalendarFinTrt" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                                            </Calendar> 
                                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                                        </telerik:RadDatePicker> 
                                    </td> 
                                    <td> 
                                        <asp:Label ID="mtrad_lbl_crt" runat="server" Text="[CRT] :"></asp:Label> 
                                    </td> 
                                    <td> 
                                        <telerik:RadComboBox ID="RadComboBoxCRT" runat="server"
                                        </telerik:RadComboBox> 
                                    </td> 
                                    <td> 
                                        <asp:ImageButton ID="ImgeClear" runat="server" ImageUrl="~/Backoffice/Images/clear.gif" OnClick="ImgeClear_Click" /> 
                                    </td> 
                                </tr> 
                            </table> 
                        </div> 
                        <div> 
                            <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AutoGenerateColumns="False"  
                                OnItemCommand="RadGrid1_ItemCommand" AllowPaging="True" AllowSorting="True"  
                                OnItemDataBound="RadGrid1_ItemDataBound" Height="347px" AllowFilteringByColumn="False"  
                                PageSize="8" OnNeedDataSource="RadGrid1_NeedDataSource"
                                <MasterTableView DataSourceID="SqlDataSourceFichier_Recu" DataKeyNames="fic_id" CommandItemDisplay="Bottom" NoMasterRecordsText="Aucune donn&#233;es &#224; afficher."
                                    <Columns> 
                                        <telerik:GridBoundColumn DataField="fic_id" DataType="System.Int32" 
                                            SortExpression="fic_id" UniqueName="fic_id"
                                            <HeaderStyle HorizontalAlign="Left" Width="60px" /> 
                                            <ItemStyle HorizontalAlign="Left" Width="60px" /> 
                                        </telerik:GridBoundColumn>                              
                                        <telerik:GridTemplateColumn SortExpression="fic_nom"  
                                            UniqueName="TemplateColumn"
                                            <ItemTemplate> 
                                                <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("fic_nom") %>'></asp:HyperLink> 
                                            </ItemTemplate> 
                                            <HeaderStyle HorizontalAlign="Left" Width="160px" /> 
                                            <ItemStyle HorizontalAlign="Left" Width="160px" /> 
                                        </telerik:GridTemplateColumn>                   
                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="download" HeaderButtonType="None" 
                                            ImageUrl="../Images/Download.gif" UniqueName="fic_id" DataType="System.Int32"
                                            <HeaderStyle HorizontalAlign="Center" Width="40px" /> 
                                            <ItemStyle HorizontalAlign="Center" Width="40px" /> 
                                        </telerik:GridButtonColumn> 
                                        <telerik:GridBoundColumn DataField="fic_date_reception" DataType="System.DateTime" 
                                            SortExpression="fic_date_reception" UniqueName="fic_date_reception"
                                            <HeaderStyle HorizontalAlign="Left" /> 
                                            <ItemStyle HorizontalAlign="Left" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="fic_origine" SortExpression="fic_origine" 
                                            UniqueName="fic_origine"
                                            <HeaderStyle HorizontalAlign="Left" Width="70px" /> 
                                            <ItemStyle HorizontalAlign="Left" Width="70px" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="fic_date_trt_deb" DataType="System.DateTime" 
                                            SortExpression="fic_date_trt_deb" UniqueName="fic_date_trt_deb"
                                            <HeaderStyle HorizontalAlign="Left" /> 
                                            <ItemStyle HorizontalAlign="Left" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="fic_date_trt_fin" DataType="System.DateTime" 
                                            SortExpression="fic_date_trt_fin" UniqueName="fic_date_trt_fin"
                                            <HeaderStyle HorizontalAlign="Left" /> 
                                            <ItemStyle HorizontalAlign="Left" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="ficetat_lib" 
                                            SortExpression="ficetat_lib" UniqueName="ficetat_lib"
                                            <HeaderStyle HorizontalAlign="Left" Width="100px" /> 
                                            <ItemStyle HorizontalAlign="Left" Width="100px" /> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridTemplateColumn  SortExpression="crt_lib"  
                                            UniqueName="TemplateColumnCRT"
                                            <ItemTemplate> 
                                                <asp:HyperLink ID="targetControl2" runat="server" NavigateUrl="#" Text='<%# Eval("crt_lib") %>' style="text-decoration:underline;"></asp:HyperLink> 
                                            </ItemTemplate> 
                                            <HeaderStyle HorizontalAlign="Left" Width="120px" /> 
                                            <ItemStyle HorizontalAlign="Left" Width="120px" /> 
                                        </telerik:GridTemplateColumn> 
                                        <telerik:GridBoundColumn DataField="fic_comment" UniqueName="fic_comment" Visible="False"
                                        </telerik:GridBoundColumn> 
                                    </Columns> 
                                    <CommandItemSettings ShowExportToCsvButton="True" /> 
                                </MasterTableView> 
                                <ClientSettings AllowAutoScrollOnDragDrop="False"
                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                                </ClientSettings> 
                                <ExportSettings HideStructureColumns="True" IgnorePaging="True"
                                    <Csv ColumnDelimiter="Semicolon" /> 
                                </ExportSettings>   
                                <PagerStyle PageSizeLabelText="Taille de la page :" /> 
                            </telerik:RadGrid> 
                            <asp:SqlDataSource ID="SqlDataSourceFichier_Recu" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:Galileo_ConnectionString %>"
                            </asp:SqlDataSource> 
                        </div> 
                    </div>            
                </telerik:RadPageView> 
            </telerik:RadMultiPage> 
        </div> 
    </asp:Content> 


    My .aspx.cs :
    using System; 
    using System.Data; 
    using System.Configuration; 
    using System.Collections; 
    using System.Web; 
    using System.Web.Security; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    using System.Web.UI.WebControls.WebParts; 
    using System.Web.UI.HtmlControls; 
    using Telerik.Web.UI; 
    using Telerik.Web.UI.Upload; 
    using System.Web.Configuration; 
    using System.Data.SqlClient; 
    using System.IO; 
    using System.Threading; 
    using Backoffice.DepotFichier; 
    using BOGeneral; 
    using Mx_Drive; 
    using Mx_Export; 
     
    public partial class Backoffice_DepotFichier_DepotFichier : CurrentPage 
        traduction t; 
     
        string targetFolder = "G:\\CFT_Data\\histo\\tmp\\"
     
        protected void Page_Load(object sender, EventArgs e) 
        { 
            t = new traduction(Convert.ToInt32(Session["langue"]), connexionBDD.st_PMBase); 
            RadTabGestionFichier.Tabs[0].Text = t.getLibelle("Dépose de fichiers"); 
            RadTabGestionFichier.Tabs[1].Text = t.getLibelle("Suivi des fichiers reçus"); 
            RadUpload1.Localization.Select = t.getLibelle("Parcourir"); 
            RadGrid1.Columns[0].HeaderText = t.getLibelle("ID"); 
            RadGrid1.Columns[1].HeaderText = t.getLibelle("Fichier"); 
            RadGrid1.Columns[3].HeaderText = t.getLibelle("Date réception"); 
            RadGrid1.Columns[4].HeaderText = t.getLibelle("Origine"); 
            RadGrid1.Columns[5].HeaderText = t.getLibelle("Début traitement"); 
            RadGrid1.Columns[6].HeaderText = t.getLibelle("Fin traitement"); 
            RadGrid1.Columns[7].HeaderText = t.getLibelle("Etat"); 
            RadGrid1.Columns[8].HeaderText = t.getLibelle("CRT"); 
            RadGrid1.Columns[9].HeaderText = t.getLibelle("Commentaire"); 
            RadGrid1.MasterTableView.CommandItemSettings.RefreshText = t.getLibelle("Rafraichir"); 
            RadGrid1.MasterTableView.NoMasterRecordsText = t.getLibelle("Aucune données à afficher."); 
            RadGrid1.PagerStyle.PageSizeLabelText = t.getLibelle("Taille de la page :"); 
     
            Drive.CheckForGDrive(); 
     
            lbl_ipn_value.Text = Session["IPN"].ToString(); 
             
            if (!IsPostBack) 
            { 
                CurrentPage.PageContext.CurrentFichier.Uploaded_file = null
                DataTable Liste_pays = BO.GetListePays(TApplication.DepotDeFichier); 
                if (Liste_pays.Rows.Count > 1) 
                { 
                    RadComboBoxItem MyRadItemAdmin = new RadComboBoxItem(); 
                    MyRadItemAdmin.Text = "Fichier zip"
                    MyRadItemAdmin.Value = "0"
                    RCB_Pays.Items.Add(MyRadItemAdmin); 
                } 
                foreach (DataRow Rows in Liste_pays.Rows) 
                { 
                    RadComboBoxItem MyRadItem = new RadComboBoxItem(); 
                    MyRadItem.Text = Rows["LIBELLE_PAYS"].ToString(); 
                    MyRadItem.Value = Rows["PAYS_ID"].ToString(); 
                    RCB_Pays.Items.Add(MyRadItem); 
                } 
     
                string connStr = WebConfigurationManager.ConnectionStrings["Galileo_ConnectionString"].ToString(); 
                SqlConnection oDC = new SqlConnection(connStr); 
                string sql = "SELECT [ficetat_id], [ficetat_lib] FROM [REF_FICHIER_ETAT]"
                SqlCommand oCmd = new SqlCommand(sql, oDC); 
                oCmd.Connection.Open(); 
                SqlDataReader oReader = oCmd.ExecuteReader(); 
                RadComboBoxItem MyRadItemVide = new RadComboBoxItem(); 
                MyRadItemVide.Text = ""
                MyRadItemVide.Value = ""
                RadComboBoxEtat.Items.Add(MyRadItemVide); 
                while (oReader.Read()) 
                { 
                    RadComboBoxItem MyRadItem = new RadComboBoxItem(); 
                    MyRadItem.Text = oReader["ficetat_lib"].ToString(); 
                    MyRadItem.Value = oReader["ficetat_id"].ToString(); 
                    RadComboBoxEtat.Items.Add(MyRadItem); 
                } 
                oCmd.Connection.Close(); 
     
                string sql2 = "SELECT [crt_id], [crt_lib] FROM [REF_FICHIER_CRT]"
                SqlCommand oCmd2 = new SqlCommand(sql2, oDC); 
                oCmd2.Connection.Open(); 
                SqlDataReader oReader2 = oCmd2.ExecuteReader(); 
                RadComboBoxItem MyRadItemVide2 = new RadComboBoxItem(); 
                MyRadItemVide2.Text = ""
                MyRadItemVide2.Value = ""
                RadComboBoxCRT.Items.Add(MyRadItemVide2); 
                while (oReader2.Read()) 
                { 
                    RadComboBoxItem MyRadItem2 = new RadComboBoxItem(); 
                    MyRadItem2.Text = oReader2["crt_lib"].ToString(); 
                    MyRadItem2.Value = oReader2["crt_id"].ToString(); 
                    RadComboBoxCRT.Items.Add(MyRadItem2); 
                } 
                oCmd2.Connection.Close(); 
            } 
        } 
     
        protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            filtrer(); 
            RadGrid1.DataSourceID = "SqlDataSourceFichier_Recu"
            RadToolTipManager1.TargetControls.Clear(); 
     
            if (e.CommandName.ToString() == "download"
            { 
                Drive.CheckForGDrive(); 
                int fichier_id = Convert.ToInt32((e.Item as GridDataItem).GetDataKeyValue("fic_id").ToString()); 
     
                string connStr = WebConfigurationManager.ConnectionStrings["Galileo_ConnectionString"].ToString(); 
                SqlConnection oDC = new SqlConnection(connStr); 
                string sql = "SELECT fic_path, fic_nom_reel FROM tbl_fichier_recu WHERE fic_id = " + fichier_id; 
                SqlCommand oCmd = new SqlCommand(sql, oDC); 
                oCmd.Connection.Open(); 
                SqlDataReader oReader = oCmd.ExecuteReader(); 
                oReader.Read(); 
                string Location = oReader["fic_path"].ToString() + oReader["fic_nom_reel"]; 
                Location = Location.Replace("D:""\\\\Varel\\Galileo"); 
                oCmd.Connection.Close(); 
                if (File.Exists(Location)) 
                { 
                    FileInfo file = new System.IO.FileInfo(Location); 
                    Response.AppendHeader("Content-Disposition""attachment; filename=" + file.Name.Replace(" ""_")); 
                    Response.AppendHeader("Content-Length", file.Length.ToString()); 
                    Response.ContentType = "application/octet-stream"
                    Response.TransmitFile(Location); 
                } 
            } 
     
            if (e.CommandName == "ExportToCsv"
            { 
                RadGrid1.MasterTableView.GetColumn("fic_id").Visible = false
                RadGrid1.MasterTableView.GetColumn("fic_comment").Visible = true
                RadGrid1.MasterTableView.ExportToCSV(); 
            } 
        } 
     
        protected void submit_fichier_Click(object sender, EventArgs e) 
        { 
            foreach (UploadedFile file in RadUpload1.UploadedFiles) 
            { 
                CurrentPage.PageContext.CurrentFichier.Uploaded_file = file; 
            } 
            if (CurrentPage.PageContext.CurrentFichier.Uploaded_file != null
            { 
                CurrentPage.PageContext.CurrentFichier.Pays_text = RCB_Pays.SelectedItem.Text; 
                CurrentPage.PageContext.CurrentFichier.Pays_value = RCB_Pays.SelectedItem.Value; 
                if (CurrentPage.PageContext.CurrentFichier.Uploaded_file.GetExtension() == ".txt"
                { 
                    RadWindowValidationFichier.NavigateUrl = "ValidationFichier.aspx"
                    RadWindowValidationFichier.VisibleOnPageLoad = true
                } 
                else 
                { 
                    Drive.CheckForGDrive(); 
                    UploadedFile file = CurrentPage.PageContext.CurrentFichier.Uploaded_file; 
                    string extension = file.GetExtension(); 
                    file.SaveAs(Path.Combine(targetFolder, file.GetName()), true); 
                    if (!Object.Equals(file, null)) 
                    { 
                        LooongMethodWhichUpdatesTheProgressContext(file); 
                    } 
     
                    RadWindowValidationZip.NavigateUrl = "ValidationFichierZip.aspx"
                    RadWindowValidationZip.VisibleOnPageLoad = true
                } 
                lbl_msg.Visible = false
            } 
            else 
            { 
                lbl_msg.Text = t.MultiTrad("[Fichier non pris en charge.]<br>[Vérifier qu'il s'agit bien d'un fichier .txt, .zip, .tar ou .gz .]"); 
                lbl_msg.Visible = true
            } 
        } 
     
        protected void RadAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        { 
            if (e.Argument == "RefreshDepotFichier"
            { 
                CurrentPage.PageContext.CurrentFichier.Uploaded_file = null
            } 
            if (e.Argument == "RefreshDepotFichierZip"
            { 
                if (CurrentPage.PageContext.CurrentFichier.Uploaded_file != null
                { 
                    File.Delete(targetFolder + CurrentPage.PageContext.CurrentFichier.Uploaded_file.GetName()); 
                    CurrentPage.PageContext.CurrentFichier.Uploaded_file = null
                } 
            } 
        } 
     
        private void LooongMethodWhichUpdatesTheProgressContext(UploadedFile file) 
        { 
            const int total = 100; 
     
            RadProgressContext progress = RadProgressContext.Current; 
     
            for (int i = 0; i < total; i++) 
            { 
                progress.PrimaryTotal = 1; 
                progress.PrimaryValue = 1; 
                progress.PrimaryPercent = 100; 
     
                progress.SecondaryTotal = total; 
                progress.SecondaryValue = i; 
                progress.SecondaryPercent = i; 
     
                progress.CurrentOperationText = file.GetName() + " is being processed..."
     
                if (!Response.IsClientConnected) 
                { 
                    break
                } 
            } 
        } 
     
        protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) 
        { 
            this.UpdateToolTip(args.Value, args.UpdatePanel); 
        } 
     
        private void UpdateToolTip(string fichier_id, UpdatePanel panel) 
        { 
            Control ctrl = Page.LoadControl("DetailFichier.ascx"); 
            panel.ContentTemplateContainer.Controls.Add(ctrl); 
            CurrentPage.PageContext.CurrentFichier.Fichier_id = fichier_id; 
        } 
     
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
        { 
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) 
            { 
                Control target = e.Item.FindControl("targetControl"); 
                if (!Object.Equals(target, null)) 
                { 
                    if (!Object.Equals(this.RadToolTipManager1, null)) 
                    { 
                        this.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("fic_id").ToString(), true); 
                    } 
                } 
                Control target2 = e.Item.FindControl("targetControl2"); 
                if (!Object.Equals(target2, null)) 
                { 
                    if (!Object.Equals(this.RadToolTipManager1, null)) 
                    { 
                        this.RadToolTipManager1.TargetControls.Add(target2.ClientID, (e.Item as GridDataItem).GetDataKeyValue("fic_id").ToString(), true); 
                    } 
                } 
            } 
     
            if (e.Item is GridCommandItem) 
            { 
                GridCommandItem cmdItem = (GridCommandItem)e.Item; 
                Button btn1 = (Button)cmdItem.FindControl("AddNewRecordButton"); 
                btn1.Visible = false
                LinkButton lnkbtn1 = (LinkButton)cmdItem.FindControl("InitInsertButton"); 
                lnkbtn1.Visible = false
            }   
        } 
     
        protected void ImgFiltrer_Click(object sender, ImageClickEventArgs e) 
        { 
            filtrer(); 
        } 
     
        protected void filtrer() 
        { 
            DataTable Liste_pays = BO.GetListePays(TApplication.DepotDeFichier); 
            SqlDataSourceFichier_Recu.SelectParameters.Clear(); 
     
            string sql = @"SELECT fic.fic_id, fic.fic_nom, fic.fic_path, fic.fic_date_reception, fic.fic_origine, fic.fic_date_trt_deb, fic.fic_date_trt_fin, etat.ficetat_lib, (CASE WHEN crt.crt_lib = 'REJET' THEN crt.crt_lib + ' (' + CAST(fic.fic_nb_rejet AS VARCHAR) + ')' ELSE crt.crt_lib END) as crt_lib, fic.fic_comment, fic.fic_fichier_original
                FROM tbl_fichier_recu fic 
                LEFT OUTER JOIN ref_fichier_etat etat ON fic.ficetat_id = etat.ficetat_id 
                LEFT OUTER JOIN ref_fichier_crt crt ON fic.crt_id = crt.crt_id 
                LEFT OUTER JOIN ref_fichier ref ON fic.fichier_id = ref.fichier_id
                WHERE 1 = 1"
            if (Liste_pays.Rows.Count == 1) 
            { 
                sql += " AND ref.pays_id = '" + Liste_pays.Rows[0].ItemArray[0] + "'"
            } 
            if (tb_fichier.Text != ""
            { 
                sql += " AND fic_nom LIKE '%" + tb_fichier.Text + "%'"
            } 
            if (tb_origine.Text != ""
            { 
                sql += " AND fic_origine LIKE '%" + tb_origine.Text + "%'"
            } 
            if (RadDatePickerDeb.SelectedDate != null
            { 
                DateTime date_deb = this.RadDatePickerDeb.SelectedDate.Value; 
     
                sql += " AND fic_date_reception >= @date_deb"
                SqlDataSourceFichier_Recu.SelectParameters.Add("date_deb", TypeCode.DateTime, date_deb.ToString()); 
            } 
            if (RadDatePickerFin.SelectedDate != null
            { 
                DateTime date_fin = this.RadDatePickerFin.SelectedDate.Value.AddHours(23).AddMinutes(59); 
     
                sql += " AND fic_date_reception <= @date_fin"
                SqlDataSourceFichier_Recu.SelectParameters.Add("date_fin", TypeCode.DateTime, date_fin.ToString()); 
            } 
            if (RadDatePickerDebTrt.SelectedDate != null
            { 
                DateTime date_deb_trt = this.RadDatePickerDebTrt.SelectedDate.Value; 
     
                sql += " AND fic_date_trt_deb >= @date_deb_trt"
                SqlDataSourceFichier_Recu.SelectParameters.Add("date_deb_trt", TypeCode.DateTime, date_deb_trt.ToString()); 
            } 
            if (RadDatePickerFinTrt.SelectedDate != null
            { 
                DateTime date_fin_trt = this.RadDatePickerFinTrt.SelectedDate.Value.AddHours(23).AddMinutes(59); 
     
                sql += " AND fic_date_trt_deb <= @date_fin_trt"
                SqlDataSourceFichier_Recu.SelectParameters.Add("date_fin_trt", TypeCode.DateTime, date_fin_trt.ToString()); 
            } 
            if (RadComboBoxEtat.SelectedValue != ""
            { 
                sql += " AND fic.ficetat_id = " + RadComboBoxEtat.SelectedValue; 
            } 
            if (RadComboBoxCRT.SelectedValue != ""
            { 
                sql += " AND fic.crt_id = " + RadComboBoxCRT.SelectedValue; 
            } 
     
            sql += " ORDER BY fic.fic_date_reception DESC"
     
            SqlDataSourceFichier_Recu.SelectCommand = sql; 
            RadToolTipManager1.TargetControls.Clear(); 
        } 
     
        protected void ImgeClear_Click(object sender, ImageClickEventArgs e) 
        { 
            tb_fichier.Text = ""
            tb_origine.Text = ""
            RadDatePickerDeb.Clear(); 
            RadDatePickerDebTrt.Clear(); 
            RadDatePickerFin.Clear(); 
            RadDatePickerFinTrt.Clear(); 
            RadComboBoxCRT.ClearSelection(); 
            RadComboBoxEtat.ClearSelection(); 
            filtrer(); 
        } 
     
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
        { 
            DataTable Liste_pays = BO.GetListePays(TApplication.DepotDeFichier); 
            if (Liste_pays.Rows.Count == 1) 
            { 
                SqlDataSourceFichier_Recu.SelectCommand = @"SELECT fic.fic_id, fic.fic_nom, fic.fic_path, fic.fic_date_reception, fic.fic_origine, fic.fic_date_trt_deb, fic.fic_date_trt_fin, etat.ficetat_lib, (CASE WHEN crt.crt_lib = 'REJET' THEN crt.crt_lib + ' (' + CAST(fic.fic_nb_rejet AS VARCHAR) + ')' ELSE crt.crt_lib END) as crt_lib, fic.fic_comment, fic.fic_fichier_original
                FROM tbl_fichier_recu fic 
                LEFT OUTER JOIN ref_fichier_etat etat ON fic.ficetat_id = etat.ficetat_id 
                LEFT OUTER JOIN ref_fichier_crt crt ON fic.crt_id = crt.crt_id 
                LEFT OUTER JOIN ref_fichier ref ON fic.fichier_id = ref.fichier_id
                WHERE ref.pays_id = '" + Liste_pays.Rows[0].ItemArray[0] + @"'
                ORDER BY fic.fic_date_reception DESC"
            } 
            else 
            { 
                SqlDataSourceFichier_Recu.SelectCommand = @"SELECT fic.fic_id, fic.fic_nom, fic.fic_path, fic.fic_date_reception, fic.fic_origine, fic.fic_date_trt_deb, fic.fic_date_trt_fin, etat.ficetat_lib, (CASE WHEN crt.crt_lib = 'REJET' THEN crt.crt_lib + ' (' + CAST(fic.fic_nb_rejet AS VARCHAR) + ')' ELSE crt.crt_lib END) as crt_lib, fic.fic_comment, fic.fic_fichier_original
                FROM tbl_fichier_recu fic 
                LEFT OUTER JOIN ref_fichier_etat etat ON fic.ficetat_id = etat.ficetat_id 
                LEFT OUTER JOIN ref_fichier_crt crt ON fic.crt_id = crt.crt_id 
                ORDER BY fic.fic_date_reception DESC"
            } 
            RadGrid1.DataSourceID = "SqlDataSourceFichier_Recu"
        } 
     
        protected void export_rejet_csv(string fichier_id) 
        { 
            string fichier_nom = ""
            DateTime date_trt_debut = new DateTime(); 
            DateTime date_trt_fin = new DateTime(); 
     
            string connStr = WebConfigurationManager.ConnectionStrings["Galileo_ConnectionString"].ToString(); 
            SqlConnection oDC = new SqlConnection(connStr); 
            string sql = @"SELECT fic.fic_nom, fic.fic_date_trt_deb, fic.fic_date_trt_fin
            FROM tbl_fichier_recu fic
            WHERE fic.fic_id = " + fichier_id; 
            SqlCommand oCmd = new SqlCommand(sql, oDC); 
            oCmd.Connection.Open(); 
            SqlDataReader oReader = oCmd.ExecuteReader(); 
            oReader.Read(); 
            fichier_nom = oReader["fic_nom"].ToString(); 
            (DateTime)date_trt_debut = Convert.ToDateTime(oReader["fic_date_trt_deb"]); 
            (DateTime)date_trt_fin = Convert.ToDateTime(oReader["fic_date_trt_fin"]); 
            oCmd.Connection.Close(); 
     
            DataTable MyTable = new DataTable(); 
            string sql_rejet = @"SELECT rejet_date, rejet_data, rejet_raison
            FROM sys_rejet
            WHERE (rejet_date BETWEEN @date_debut AND @date_fin) AND rejet_fichier = '" + fichier_nom + "'"
            SqlCommand oCmd_rejet = new SqlCommand(sql_rejet, oDC); 
            oCmd_rejet.Parameters.Add("@date_debut", SqlDbType.DateTime); 
            oCmd_rejet.Parameters.Add("@date_fin", SqlDbType.DateTime); 
            oCmd_rejet.Parameters["@date_debut"].Value = date_trt_debut; 
            oCmd_rejet.Parameters["@date_fin"].Value = date_trt_fin; 
            oCmd_rejet.Connection.Open(); 
            SqlDataAdapter adapter = new SqlDataAdapter(oCmd_rejet); 
            adapter.Fill(MyTable); 
            oCmd_rejet.Connection.Close(); 
     
            string fichier_rejet = Path.Combine(getDev.st_racineSite, "tempdata\\rejet_" + DateTime.Now.ToString("yyMMdd_HHmmss") + "_" + fichier_nom + ".csv"); 
            string en_tete = "date; données; raison"
     
            Export.CSV(MyTable, fichier_rejet, en_tete); 
     
            FileInfo file = new System.IO.FileInfo(fichier_rejet); 
            Response.AppendHeader("Content-Disposition""attachment; filename=" + file.Name); 
            Response.AppendHeader("Content-Length", file.Length.ToString()); 
            Response.ContentType = "application/octet-stream"
            Response.TransmitFile(fichier_rejet); 
        } 


    My web.config :

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
        <configSections> 
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/> 
                        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    </sectionGroup> 
                </sectionGroup> 
            </sectionGroup> 
        </configSections> 
        <appSettings> 
            <add key="loginBackOffice" value="http://galileobo.orca.lan/Portail_bo/ASPX/login.aspx?statut=2"/> 
            <add key="loginFrontOffice" value="http://galileo.orca.lan"/> 
            <add key="com.orcaformation.webserv.Service1" value="http://webserv.orcaformation.com/Service1.asmx"/> 
            <add key="com.orcaformation.arcadecrypt.decrypt" value="http://arcadecrypt.orcaformation.com/decrypt.asmx"/> 
        </appSettings> 
        <connectionStrings> 
            <remove name="LocalSqlServer"/> 
            <add name="PORTAIL_MONDEConnectionString" connectionString="Data Source=;Initial Catalog=PORTAIL_MONDE;Persist Security Info=True;User ID=;Password=" providerName="System.Data.SqlClient"/> 
            <add name="Galileo_ConnectionString" connectionString="Data Source=;Initial Catalog=Galileo_Pays_Work;Persist Security Info=True;User ID=;Password=" providerName="System.Data.SqlClient"/> 
        </connectionStrings> 
        <system.web> 
            <trace enabled="true" localOnly="false"/> 
            <sessionState cookieless="UseCookies"/> 
            <customErrors mode="Off"/> 
            <compilation debug="true" urlLinePragmas="true"
                <assemblies> 
                    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                    <add assembly="AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28F01B0E84B6D53E"/> 
                    <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                    <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                    <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                    <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
                    <add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies> 
            </compilation> 
            <pages maintainScrollPositionOnPostBack="True"
                <controls> 
                    <add assembly="AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" namespace="AjaxControlToolkit" tagPrefix="atk"/> 
                    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                </controls> 
            </pages> 
            <httpHandlers> 
          <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" /> 
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> 
          <remove verb="*" path="*.asmx"/>       
                <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> 
            </httpHandlers> 
            <httpModules> 
                <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/> 
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            </httpModules> 
            <httpRuntime executionTimeout="3600" maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true" requestLengthDiskThreshold="2097151" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/> 
        </system.web> 
        <system.webServer> 
            <validation validateIntegratedModeConfiguration="false"/> 
            <modules> 
                <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
            </modules> 
            <handlers> 
                <remove name="WebServiceHandlerFactory-Integrated"/> 
                <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
                <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/> 
            </handlers> 
        </system.webServer> 
    </configuration> 
     

    Sorry for the long message, but I can't find the problem.
    Thanks.



  2. Answer
    Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 03 Feb 2010 Link to this post

    Hi Pierre MAUREL,

    Could you please try to add the following lines right after your script manager declaration:

       <script type="text/javascript">
            var prm = Sys.WebForms.PageRequestManager.getInstance();
            var originalClientSubmit;
      
            if (!originalClientSubmit) {
                originalClientSubmit =
    Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler;
            }
     
            Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler = function(e) {
                if(!prm._postBackSettings.async) {
                    originalClientSubmit.apply(this, [e]);
                }
            }
        </script>

    Does the issue persist?

    Greetings,
    Genady Sergeev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mohamed Bahri
    Mohamed Bahri avatar
    5 posts
    Member since:
    Jan 2010

    Posted 04 Feb 2010 Link to this post

    Thanks this worked for me.
    using VS2008 targeting IIS6.
  5. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2010 Link to this post

    Thank you a lot, it works great.
  6. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2010 Link to this post

    I have just a litlle problem.
    With your code my RadToolTipManager doesn't work.
    I don't know why.
  7. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 17 Feb 2010 Link to this post

    Hello Pierre MAUREL,

    What do you mean by RadToolTipManager stopped working? Are there any JavaScript errors on the page?

    Regards,
    Genady Sergeev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 17 Feb 2010 Link to this post

    No, nothing.
    It just doesn't work.
  9. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 22 Feb 2010 Link to this post

    Hi Pierre MAUREL,

    I have added the aforementioned code to this RadToolTipManager demo and everything seemed to work as expected. Can you please open a support ticket and provide us with some details on how to reproduce the problem. Sample project that reproduces the issue would be best.

    Greetings,
    Genady Sergeev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  10. Rajnikanth
    Rajnikanth avatar
    2 posts
    Member since:
    Feb 2011

    Posted 17 Nov 2011 Link to this post

    Hi,

    I wanted to know what causes this error(RadUpload Ajax callback error. Source url returned invalid content), i am facing this rarely so very difficult to reproduce.

    anyways i am handling it this way,
    Telerik.Web.UI.RadProgressManager.prototype._showInvalidContentMessage = function (args) { var winRad = radalert('Invalid Content', 400, 150, "Session Expired"); winRad.add_close(gotoHome); } 

    Please let me know the obivious reason for this so i can decide whether we can supress this.

    Rajani.
  11. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 21 Nov 2011 Link to this post

    Hello Rajnikanth,

    Please review the following two threads from our forum - ajax error, ajax error.

    Greetings,
    Peter Filipov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017