
We have customized the physical location as well as file download behavior by using the sample code files 'CustomFileSystemProvider.cs' and 'FileSystemHandler.ashx'. The implementation works fine on developer machine, but getting 404 error on production server.
=========================================================================================================
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
--------------------------------------------------------------------------------
Please try the following:
•Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
•If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
•Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
--------------------------------------------------------------------------------
Technical Information (for support personnel)
•Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
•Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.
=========================================================================================================
Is that some configuration related to .ashx is missing on the server or what could be the issue. Please suggest.
Thanks,
Suresh.C
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function RowDblClick(sender, eventArgs) { sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); } </script> </telerik:RadCodeBlock> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid_License"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid_License" LoadingPanelID="RadAjaxLoadingPanel1"> </telerik:AjaxUpdatedControl> <telerik:AjaxUpdatedControl ControlID="divMsgs"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <telerik:RadGrid ID="RadGrid_License" runat="server" CellSpacing="0" DataSourceID="ODS_License" GridLines="None" style="margin-top: 0px" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True"> <MasterTableView AutoGenerateColumns="False" DataKeyNames="License_To_Operate_ID" DataSourceID="ODS_License" AllowFilteringByColumn="False" AllowPaging="False" CommandItemDisplay="Top"> <CommandItemSettings ExportToPdfText="Export to PDF" /> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"> </ExpandCollapseColumn> <Columns> <telerik:GridEditCommandColumn UniqueName="EditCommandColumn"> </telerik:GridEditCommandColumn> <telerik:GridBoundColumn DataField="License_To_Operate_ID" FilterControlAltText="Filter License_Number column" HeaderText="License_To_Operate_ID" SortExpression="License_To_Operate_ID" UniqueName="License_To_Operate_ID" Visible="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="License_Name" FilterControlAltText="Filter License_Name column" HeaderText="License Name" SortExpression="License_Name" UniqueName="License_Name"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="License_Number" FilterControlAltText="Filter License_Number column" HeaderText="License Number" SortExpression="License_Number" UniqueName="License_Number"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="License_Issuer" FilterControlAltText="Filter License_Issuer column" HeaderText="License Issuer" SortExpression="License_Issuer" UniqueName="License_Issuer"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Valid_From" DataType="System.DateTime" FilterControlAltText="Filter Valid_From column" HeaderText="Valid From" SortExpression="Valid_From" UniqueName="Valid_From" DataFormatString="{0: dd-MMM-yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Valid_Till" DataType="System.DateTime" FilterControlAltText="Filter Valid_Till column" HeaderText="Valid Till" SortExpression="Valid_Till" UniqueName="Valid_Till" DataFormatString="{0: dd-MMM-yyyy}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Issue_date" DataType="System.DateTime" FilterControlAltText="Filter Issue_date column" HeaderText="Issue Date" SortExpression="Issue_date" UniqueName="Issue_date" DataFormatString="{0: dd-MMM-yyyy}"> </telerik:GridBoundColumn> </Columns> <EditFormSettings EditFormType="Template"> <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1"> </EditColumn> <FormTemplate> <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="border-collapse: collapse;"> <tr class="EditFormHeader"> <td style="width:100px"> <asp:Label ID="Label5" Text="License Type" runat="server"></asp:Label> </td> <td> <telerik:RadDropDownList ID="rdl_license_type" runat="server" DataSourceID="LDS_License_type" DefaultMessage="Please select..." DataValueField="License_ID" DataTextField="License_name" > </telerik:RadDropDownList> <asp:Label ID="Lb_License_ID" runat="server" text='<%# Bind("License_ID") %>'></asp:Label> </td> </tr> <tr > <td > <asp:Label ID="lb" Text="License Number" runat="server"></asp:Label> </td> <td> <asp:TextBox ID="tb_License_Number" runat="server" Text='<%# Bind("License_Number") %>' TabIndex="2"></asp:TextBox> </td> </tr> <tr> <td> <asp:Label ID="Label1" Text="License Issuer" runat="server"></asp:Label> </td> <td> <asp:TextBox ID="tb_License_Issuer" runat="server" Text='<%# Bind("License_Issuer") %>' TabIndex="3"></asp:TextBox> </td> </tr> <tr> <td> <asp:Label ID="Label2" Text="Issue Date" runat="server"></asp:Label> </td> <td> <telerik:RadDatePicker ID="IssueDatePicker" runat="server" MinDate="1/1/1900" DbSelectedDate='<%# Bind("Issue_Date") %>' TabIndex="4"></telerik:RadDatePicker> </td> </tr> <tr> <td> <asp:Label ID="Label3" Text="Valid From" runat="server"></asp:Label> </td> <td> <telerik:RadDatePicker ID="RadDatePicker_ValidFrom" runat="server" MinDate="1/1/1900" DbSelectedDate='<%# Bind("Valid_From") %>' TabIndex="5"></telerik:RadDatePicker> </td> </tr> <tr> <td> <asp:Label ID="Label4" Text="Valid To" runat="server"></asp:Label> </td> <td> <telerik:RadDatePicker ID="RadDatePicker_ValidTill" runat="server" MinDate="1/1/1900" DbSelectedDate='<%# Bind("Valid_Till") %>' TabIndex="6"></telerik:RadDatePicker> </td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' > </asp:Button> <asp:Button ID="btnDelete" Text="Delete" runat="server" CausesValidation="False" CommandName="Delete"></asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr> </table> </FormTemplate></EditFormSettings> <PagerStyle PageSizeControlType="RadComboBox" /> </MasterTableView> <PagerStyle PageSizeControlType="RadComboBox" /> <FilterMenu EnableImageSprites="False"> </FilterMenu> </telerik:RadGrid> <asp:LinqDataSource ID="LDS_License_type" runat="server" ContextTypeName="dcLRDBDataContext" EntityTypeName="" TableName="db_Dictionary_Licenses"> </asp:LinqDataSource> <asp:ObjectDataSource ID="ODS_License" runat="server" SelectMethod="GetLicenseArrayByUserID" TypeName="LRDB"> <SelectParameters> <asp:SessionParameter DefaultValue="0" Name="id" SessionField="SelectedUserID" Type="String" /> </SelectParameters> </asp:ObjectDataSource> <asp:LinqDataSource ID="LDS_License" runat="server" ContextTypeName="dcLRDBDataContext" EntityTypeName="" TableName="db_Employee_Licenses" Where="UserID == @UserID"> <WhereParameters> <asp:SessionParameter Name="UserID" SessionField="SelectedUserID" Type="Int32" DefaultValue="0"/> </WhereParameters> </asp:LinqDataSource>Protected Sub RadGrid_License_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid_License.ItemCommand If e.CommandName = RadGrid.InitInsertCommandName Then 'Click Add New Record button Dim editColumn As GridEditCommandColumn = CType(RadGrid_License.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn) editColumn.Visible = False ElseIf (e.CommandName = RadGrid.RebindGridCommandName AndAlso e.Item.OwnerTableView.IsItemInserted) Then e.Canceled = True Else Dim editColumn As GridEditCommandColumn = CType(RadGrid_License.MasterTableView.GetColumn("EditCommandColumn"), GridEditCommandColumn) If Not editColumn.Visible Then 'Click Cancel button (both Insert and Update mode) editColumn.Visible = True End If Dim ddlLicense_id As RadDropDownList = DirectCast(e.Item.FindControl("rdl_license_type"), RadDropDownList) Dim txtLicense_Number As TextBox = DirectCast(e.Item.FindControl("tb_License_Number"), TextBox) Dim txtLicense_Issuer As TextBox = DirectCast(e.Item.FindControl("tb_License_Issuer"), TextBox) Dim dateIssue As RadDatePicker = DirectCast(e.Item.FindControl("IssueDatePicker"), RadDatePicker) Dim dateValidFrom As RadDatePicker = DirectCast(e.Item.FindControl("RadDatePicker_ValidFrom"), RadDatePicker) Dim dateValidTill As RadDatePicker = DirectCast(e.Item.FindControl("RadDatePicker_ValidTill"), RadDatePicker) Dim dc As New dcLRDBDataContext If e.CommandName = "PerformInsert" Then If Request.QueryString("EmployeeID") = "" Then 'New Employee Dim rnd As New Random() Dim tmpUserID As Integer 'allow 10 digit only tmpUserID = rnd.Next(100000, 999999) & DateTime.Now.Hour & DateTime.Now.Minute HttpContext.Current.Session("tmpUserID") = tmpUserID dc.insertEmployeeLicense(tmpUserID.ToString, ddlLicense_id.SelectedValue, txtLicense_Number.Text.Trim, txtLicense_Issuer.Text.Trim, _ dateIssue.SelectedDate, dateValidFrom.SelectedDate, dateValidTill.SelectedDate, "Y", DateTime.Now, HttpContext.Current.Session("UserID").ToString) Else dc.insertEmployeeLicense(Request.QueryString("EmployeeID").ToString, ddlLicense_id.SelectedValue, txtLicense_Number.Text.Trim, txtLicense_Issuer.Text.Trim, _ dateIssue.SelectedDate, dateValidFrom.SelectedDate, dateValidTill.SelectedDate, "Y", DateTime.Now, HttpContext.Current.Session("UserID").ToString) End If ElseIf e.CommandName = "Update" Then Dim lid As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("License_To_Operate_ID") Dim uid As Integer If Request.QueryString("EmployeeID") = "" Then uid = HttpContext.Current.Session("tmpUserID").ToString Else uid = GetUserIDbyEmployeeID(Request.QueryString("EmployeeID")).ToString End If Dim rec = (From p In dc.db_Employee_Licenses Where p.UserID = uid And p.License_To_Operate_ID = lid).FirstOrDefault If Not rec Is Nothing Then rec.License_ID = ddlLicense_id.SelectedValue rec.License_Number = txtLicense_Number.Text.Trim rec.License_Issuer = txtLicense_Issuer.Text.Trim rec.Issue_date = dateIssue.SelectedDate rec.Valid_From = dateValidFrom.SelectedDate rec.Valid_Till = dateValidTill.SelectedDate End If ElseIf e.CommandName = "Delete" Then Dim lid As Integer = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("License_To_Operate_ID") Dim uid As Integer If Request.QueryString("EmployeeID") = "" Then uid = HttpContext.Current.Session("tmpUserID").ToString Else uid = GetUserIDbyEmployeeID(Request.QueryString("EmployeeID")).ToString End If Dim rec2 = (From p In dc.db_Employee_Licenses Where p.UserID = uid And p.License_To_Operate_ID = lid).FirstOrDefault If Not IsNothing(rec2) Then dc.db_Employee_Licenses.DeleteOnSubmit(rec2) dc.SubmitChanges() End If End If dc.Dispose() End If End Sub Private Sub RadGrid_License_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid_License.ItemDataBound If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then Dim item As GridEditableItem = e.Item 'access/modify the edit item template settings here Dim list As RadDropDownList = item.FindControl("rdl_license_type") 'list.DataSource = Country_values 'list.DataBind() If (Not HttpContext.Current.Session("updatedValue") Is Nothing) Then list.SelectedValue = 2 'HttpContext.Current.Session("updatedValue") End If ElseIf (TypeOf e.Item Is GridDataItem AndAlso Not e.Item.IsInEditMode AndAlso Page.IsPostBack) Then Dim item As GridDataItem = e.Item Dim label As Label = item.FindControl("Lb_License_ID") 'update the label value label.Text = HttpContext.Current.Session("updatedValue") End If End Sub
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" BorderColor="Gray"> <telerik:RadTabStrip runat="server" ID="RadTabStrip1" SelectedIndex="0" MultiPageID="RadMultiPage1" CssClass="HeaderClass" Skin="Glow" BackColor="#DDDDDD" > <Tabs> <telerik:RadTab Text="Scratchcards" SelectedIndex="0"> </telerik:RadTab> <telerik:RadTab Text="Vouchers" > </telerik:RadTab> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" Width="400px" CssClass="multiPage" > <telerik:RadPageView runat="server" ID="RadPageView1" > <div class="CenterDiv"> <table style="width:400px;margin-left:25px;"> <tr> <td> <asp:Label ID="Account" runat="server" ForeColor="#444444" Text="Product"></asp:Label> </td> <td> <telerik:RadComboBox ID="cboProducts" runat="server" Width="100%"></telerik:RadComboBox> </td> </tr> <tr> <td> <asp:Label ID="lblSerial" runat="server" ForeColor="#444444" Text="Serial Number"></asp:Label> </td> <td> <telerik:RadMaskedTextBox ID="tbSerial" runat="server" AutoCompleteType="Disabled" CssClass="txtBox" DisplayPromptChar=" " Mask="#########" MaxLength="9" oncopy="return false" oncut="return false" onpaste="return false" PromptChar=" "> </telerik:RadMaskedTextBox> </td> </tr> </table> <br /> <table style="width:400px;margin-left:25px;"> <tr> <td colspan="3"> <asp:Label ID="lblInfo" runat="server" Font-Bold="true" Font-Size="14px" Text=""></asp:Label> <br /> </td> </tr> </table> <div class="scratchcardSave"> <br /> <asp:Button ID="btnCheck" runat="server" onclick="btnCheck_Click" Text="Activate" /> <asp:Button ID="btnClear" runat="server" onclick="btnClear_Click" Text="Clear" /> <asp:Button ID="btnNewScratchcard" runat="server" onclick="btnNewScratchcard_Click" Text="Sell Another" /> </div> </div> </telerik:RadPageView> <telerik:RadPageView runat="server" ID="RadPageView2" > <div class="CenterDiv"> <table style="width:400px;margin-left:25px;"> <tr> <td> <asp:Label ID="Label1" runat="server" ForeColor="#444444" Text="Product"></asp:Label> </td> <td> <telerik:RadComboBox ID="cboProductType" runat="server" Width="100%"></telerik:RadComboBox> </td> </tr> <tr> <td> <asp:Label ID="lblVoucherAmount" runat="server" ForeColor="#444444" Text="Amount"></asp:Label> </td> <td> <telerik:RadMaskedTextBox ID="tbGeneratePIN" runat="server" AutoCompleteType="Disabled" CssClass="txtBox" DisplayPromptChar=" " Mask="#########" MaxLength="9" oncopy="return false" oncut="return false" onpaste="return false" PromptChar=" "> </telerik:RadMaskedTextBox> </td> </tr> </table> <br /> <table style="width:400px;margin-left:25px;"> <tr> <td colspan="3"> <asp:Label ID="lblVoucherPIN" runat="server" Font-Bold="True" Font-Size="14px"></asp:Label> <br /> </td> </tr> </table> <div class="scratchcardSave"> <br /> <asp:Button ID="btnVoucherGenerate" runat="server" onclick="btnVoucherGenerate_Click" Text="Generate" /> <asp:Button ID="btnVoucherClear" runat="server" onclick="btnVoucherClear_Click" Text="Clear" /> </div> </div> </telerik:RadPageView> </telerik:RadMultiPage> </telerik:RadAjaxPanel>protected void btnVoucherGenerate_Click(object sender, EventArgs e) { if (tbGeneratePIN.Text == string.Empty) { lblVoucherPIN.ForeColor = System.Drawing.Color.Red; lblVoucherPIN.Text = "Please insert voucher amount"; } else { iThNkContext.Prepaid pre = new iThNkContext.Prepaid(); String newID = ""; newID = Guid.NewGuid().ToString().Replace("-", ""); newID = newID.Substring(newID.Length - 16); newID = newID.ToUpper(); // Add PIN to Prepaid DB var userInfo = (from c in db.Currencies from a in db.Accounts from s in db.Sites from u in db.Users where c.CurrencyID == a.CurrencyID && a.AccountID == u.AccountID && s.SiteID == u.SiteID && u.UserID == LoggedUserID) select new { AccountID = a.AccountID, CurrencyID = c.CurrencyID, CurrencySymbol = c.CurrencySymbol, SiteName = s.SiteName, AccountName = a.AccountName }).FirstOrDefault(); if (userInfo != null) { AccountID = userInfo.AccountID; CurrencyID = userInfo.CurrencyID; CurrencySymbol = userInfo.CurrencySymbol; } try { pre.CurrencyID = CurrencyID; pre.AccountID = AccountID; pre.Amount = Convert.ToDecimal(tbGeneratePIN.Text); pre.SerialNumber = ("_"); pre.Pin = newID; pre.TransactionTypeID = 2; pre.SalesUserID = LoggedUserID); pre.SalesDate = DateTime.Now; pre.IsActivated = true; pre.IsActive = true; db.Prepaids.InsertOnSubmit(pre); db.SubmitChanges(); pre.SerialNumber = Convert.ToString(pre.PrepaidID).PadLeft(9, '0'); db.SubmitChanges(); Amount = pre.Amount; SerialNumber = pre.SerialNumber; PinNumber = pre.Pin; SiteName = userInfo.SiteName; accountID = userInfo.AccountID; AccountName = userInfo.AccountName; // update the database and set isPrinted = 1 pre.IsPrinted = true; db.SubmitChanges(); tbGeneratePIN.Text = string.Empty; RadWindow newWindow = new RadWindow(); newWindow.NavigateUrl = "Vouchers.aspx"; newWindow.Top = Unit.Pixel(22); newWindow.VisibleOnPageLoad = true; newWindow.Left = Unit.Pixel(0); RadWindowManager1.Windows.Add(newWindow); } catch (Exception ex) { lblVoucherPIN.ForeColor = System.Drawing.Color.Red; lblVoucherPIN.Text = ex.Message; } } }protected void RadButton1_Click(object sender, EventArgs e) { RadWindow newWindow = new RadWindow(); newWindow.NavigateUrl = "http://www.google.com"; newWindow.Top = Unit.Pixel(22); newWindow.VisibleOnPageLoad = true; newWindow.Left = Unit.Pixel(0); RadWindowManager1.Windows.Add(newWindow); }
<ConfirmTemplate>
<div class="rwDialogPopup radconfirm">
<div class="rwDialogText">
{1}
</div>
<div>
<a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
<span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Yes]##</span></span></a>
<a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);">
<span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[No]##</span></span></a>
</div>
</div>
</ConfirmTemplate>
and javascript i use
function ConfirmReply(sender, args) {
var callBackFunction = Function.createDelegate(sender, function(shouldSubmit) {
if (shouldSubmit) {
this.click();
}
});
var text = "Do you want to close the message?";
var ss = radconfirm(text, callBackFunction, 300, 160, null, "Issue Bucket");
args.set_cancel(true);
}
I get error message
Object doesn't support property or method 'set_cancel'
Here:args.set_cancel(true);
if i call outside of grid it is working. Only call from grid template column button getting error.
Please any one help me.