Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Web Form will not load automatically Redirects user to Login

$
0
0

Hello, I am having a serious issue, with one page it is the only page that for some reason will not load, when i navigate to it it automatically redirects the user to the login. When it does this i receive no errrors or anything. Can someone tell how canu diagnose something like this that doesn't give an error, also keep in mind I am using custom security, all page on the same folder as this Form with the issue, and doesn't redirect me to the login page. Keep inmind this has nothing to do with security, nor are there any redirects that are performed on this page.

Also when this happends on mydevelopment machine and on the server, on the development machine i add a login status control to let me know whether or not user is loggged in when this happens, it displays log out instead of login the user is still logged in but only this one page redirects user to login form.

<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="CouponBankMasterPage.master" AutoEventWireup="true" CodeFile="CouponBank.aspx.cs" Inherits="User_CouponBank" %><asp:Content ContentPlaceHolderID="ContentMiddle" runat="server"><asp:UpdatePanel ID="upd" runat="server"><ContentTemplate><div class="GridHeader"><div class="GridHeaderText">
                    Coupon Bank</div></div><div style="height: 10px;"></div><div style="width: 900px; border: 0px solid #ff0000;"><div style="padding-left: 10px;"><asp:DropDownList ID="ddlLocation" runat="server" DataSourceID="SqlLocation" DataTextField="Location" DataValueField="ID" OnDataBound="BindLocation" OnSelectedIndexChanged="RefreshList" AutoPostBack="true"></asp:DropDownList><asp:SqlDataSource ID="SqlLocation" runat="server" SelectCommand="FT_Location_Select" SelectCommandType="StoredProcedure" ConnectionString="<%$ConnectionStrings:mpfc %>"></asp:SqlDataSource><asp:DropDownList ID="ddlVendors" runat="server" DataSourceID="SqlVendor" DataTextField="Name" DataValueField="ID" OnDataBound="BindVendor" OnSelectedIndexChanged="RefreshList" AutoPostBack="true"></asp:DropDownList><asp:SqlDataSource ID="SqlVendor" runat="server" SelectCommand="FT_Vendor_Select" SelectCommandType="StoredProcedure" ConnectionString="<%$ConnectionStrings:mpfc %>"><SelectParameters><asp:Parameter Name="LocationID" DefaultValue="0" /></SelectParameters></asp:SqlDataSource><asp:LinkButton ID="lnkReset" runat="server" ForeColor="#ff0000" Font-Bold="true" Font-Size="14px" Text="Reset" OnClick="Reset"></asp:LinkButton></div></div><div style="height: 30px;"></div><div style="text-align: right; width: 890px;"><a style="text-decoration: underline; font-family: Arial; font-size: 14px; font-weight: bold; color: #ff0000; cursor: pointer;" onclick="javascript:PrintAll();">Print All</a></div><div style="height: 10px;"></div><div style="padding-left: 10px;"><asp:ListView ID="CouponListView" runat="server" DataSourceID="CouponBankSql" DataKeyNames="ID" OnItemDataBound="CouponListView_DataBound"><ItemTemplate><div align="left" style="width: 880px; border: 5px solid #Ff0000; border-radius: 5px; background-color: #fff;"><table border="0" cellpadding="0" cellspacing="0" width="880px"><tr><td style="padding: 10px; width: 100px; height: 100px; vertical-align: top;"><img alt="Product" src='<%# FileUtilities.GetAbsProductPhotoPath(Eval("strProductImage").ToString(), ((Int64)Eval("intProductID"))) %>' width="100" height="100" /></td><td width="10px"></td><td align="left" style="padding: 10px; width: 500px; vertical-align: top;"><table border="0" cellpadding="0" cellspacing="0" width="500px"><tr><td valign="top" style="font-family: Arial; font-size: 22px; font-weight: bold;"><asp:Label ID="lblProductName" runat="server" ForeColor="GrayText" Style="text-decoration: underline;" Text='<%#Eval("strProductName")%>'></asp:Label></td></tr><tr><td height="5px"></td></tr><tr><td valign="top" style="font-family: Arial; font-size: 14px; font-weight: normal; height: 80px; padding-bottom: 5px;"><asp:Label ID="lblMessage" runat="server" Text='<%#Eval("Message")%>'></asp:Label></td></tr><tr><td style="height: 2px; background-color: #ff0000;"></td></tr><tr><td align="left" style="background-color: #fff; padding-top: 5px;"><table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top" style="border: 1px solid #cecece;"><img alt="logo" src="<%# FileUtilities.GetAbsBusinessPhotoPath(Eval("Logo").ToString()) %>" height="40" width="60" /></td><td width="10px"></td><td valign="top" style="font-family: Arial; font-size: 12px; font-weight: normal; color: graytext; vertical-align: top;"><table border="0" cellpadding="0" cellspacing="0"><tr><td style="font-size: 16px; font-weight: bold;"><asp:Label ID="Businessname" runat="server" Text='<%#Eval("Name")%>'></asp:Label></td></tr><tr><td height="5px;"></td></tr><tr><td style="vertical-align: top;"><asp:Label ID="BusinessInfo" CssClass="LabelText" runat="server" Text='<%#Eval("Info")%>'></asp:Label></td></tr></table></td></tr></table></td></tr></table></td><td width="10px"></td><td align="left" width="250px;"><table border="0" cellpadding="0" cellspacing="0" style="width: 230px; height: 100%;"><tr><td height="10px"></td></tr><tr><td style="border: 1px solid #cecece; border-radius: 0px;" class="ListPriceBackground GridHeader"><table border="0" cellpadding="0" cellspacing="0"><tr><td height="10px"></td></tr><tr><td width="10px"></td><td style="font-family: Arial; font-size: 20px; font-weight: bold; color: #ffffff;"><table border="0" cellpadding="0" cellspacing="0"><tr><td align="left">Price : </td><td width="10"></td><td align="right"><asp:Label ID="ProductCost" runat="server" Text='<%#String.Format("{0} {1}","$", Eval("strProductPrice"))%>'></asp:Label></td></tr><tr><td height="10px"></td></tr><tr><td align="left">Discount : </td><td width="10"></td><td align="right"><asp:Label ID="Discount" runat="server" Text='<%#String.Format("{0} {1}","$", Eval("Discount"))%>'></asp:Label></td></tr><tr><td height="10px"></td></tr><tr><td align="left" style="font-family: Arial; font-size: 15px;">Sales Tax: </td><td width="10"></td><td align="right" style="font-family: Arial; font-size: 15px;">6 %</td></tr><tr><td height="10px"></td></tr><tr><td align="left" colspan="3"><div id="Show" runat="server" onclick="javascript:show(this);" style="cursor: pointer; font-size: 15px; font-weight: bold; color: #ffffff; text-decoration: underline;">
                                                                                Show Discount</div><div style="display: none; color: green;" id="costToYou" runat="server"><asp:HiddenField ID="hdnPrice" runat="server" Value='<%#Eval("strProductPrice") %>' /><asp:HiddenField ID="hdnDisc" runat="server" Value='<%#Eval("Discount") %>' />
                                                                                Due Cost :<asp:Label ID="lblCostToYou" runat="server" Text=""></asp:Label></div></td></tr></table></td></tr><tr><td height="10px"></td></tr><tr><td></td><td align="left" style="font: bold 16px Arial; color: #ffffff; text-decoration: underline; cursor: pointer;"><div onclick='javascript:share(<%#Eval("ID") %>);'>
                                                                    Share With Friends</div></td></tr><tr><td height="10px"></td></tr><tr><td></td><td align="left" style="font: bold 16px Arial; color: #ffffff;">Time Left : <span class="timeleft"></span></td></tr><tr><td height="10px"></td></tr></table></td></tr></table></td><td width="10px"></td></tr><tr><td height="10"></td></tr><tr><td align="center"><%--<asp:LinkButton ID="barcodeLink" runat="server" Text="View Barcode" ForeColor="#ff0000" Font-Bold="true" OnCommand="ShowBarcode" CommandArgument=' <%#String.Format("{0}:{1}", Eval("strProductName"),  Eval("ID")) %>'></asp:LinkButton>--%><asp:LinkButton ID="barcodeLink" runat="server" Text="View Barcode" ForeColor="#ff0000" Font-Bold="true" OnCommand="ShowBarcode" CommandArgument=' <%#String.Format("{0}_{1}:{2}:{1}", Eval("strProductName"), Eval("intProductID"), Eval("ID")) %>'></asp:LinkButton></td></tr><tr><td height="10"></td></tr></table></div><div style="height: 10px;"></div></ItemTemplate></asp:ListView></div><asp:SqlDataSource ID="CouponBankSql" runat="server" ConnectionString="<%$ConnectionStrings:mpfc%>" SelectCommand="FT_CouponBank_Select" SelectCommandType="StoredProcedure"><SelectParameters><asp:QueryStringParameter Name="UserID" DefaultValue="1" QueryStringField="id" /><asp:Parameter Name="Location" DefaultValue="0" /><asp:Parameter Name="BusinessID" DefaultValue="0" /></SelectParameters></asp:SqlDataSource><%--Modal Popup for Barcode Print--%><asp:UpdatePanel ID="updModal" runat="server" UpdateMode="Conditional"><ContentTemplate><asp:Button ID="HdnBtnForMpeThanks" runat="server" Style="display: none;" EnableViewState="false" /><ajaxToolkit:ModalPopupExtender ID="mpe" runat="server" TargetControlID="HdnBtnForMpeThanks" BackgroundCssClass="modalBackground" PopupControlID="Panel1"></ajaxToolkit:ModalPopupExtender><asp:Panel ID="Panel1" runat="server"><div style="border-left: 5px solid #ff0000; border-top: 5px solid #ff0000; border-right: 5px solid #ff0000; border-bottom: 5px solid #ff0000; border-radius: 5px;"><table border="0" cellpadding="0" cellspacing="0" style="background-color: #FFFFFF;"><tr><td height="10px"></td></tr><tr><td width="10px"></td><td></td><td align="right" valign="top" style="vertical-align: top;"><img alt="close" width="15" height="15" src="../App_Themes/Default/images/exit.png" style="cursor: pointer;" onclick="javascript:closePopUp();" /></td><td width="10px"></td></tr><tr><td height="10px"></td></tr><tr><td width="10px"></td><td align="left" colspan="2" style="border: 1px solid #cecece; background: -moz-linear-gradient(top, #ff0000 0%, #ff0000 15%, #000000 130%);"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="10px"></td></tr><tr><td width="10"></td><td style="border: 1px solid #cecece; width: 15%;" align="center"><img src='<%# FileUtilities.GetAbsBusinessPhotoPath(Eval("Logo").ToString()) %>' alt="businesslogo" height="50" id="Blogo" runat="server" /></td><td width="10"></td><td valign="middle" style="font-family: Arial; font-size: 15px; font-weight: bold; color: #ffffff; cursor: pointer;" onclick="javascript:window.location='<%=FullRootPath%>/Business/BDashboard.aspx';"><asp:Label ID="BName" runat="server" Font-Underline="true"></asp:Label></td><td align="right"><img alt="" src="../App_Themes/Default/images/idealogosmall.png" height="50" /></td><td width="10"></td></tr><tr><td height="10px"></td></tr></table></td><td width="10px"></td></tr><tr><td height="10px"></td></tr><tr><td align="left" colspan="4" height="2px" style="background-color: #ff0000;"></td></tr><tr><td height="10px"></td></tr><tr><td width="10px"></td><td colspan="3" valign="top" style="vertical-align: top;"><table border="0" cellpadding="0" cellspacing="0" width="400px"><tr><td style="font-family: Arial; font-size: 15px; font-weight: bold; color: #000000;" align="left"><asp:Label ID="PName" runat="server"></asp:Label></td><td width="40px"></td><td style="font-family: Arial; font-size: 15px; font-weight: bold; color: #000000;" align="center">Barcode</td></tr><tr><td height="10px"></td></tr><tr><td><img src='<%# FileUtilities.GetAbsProductPhotoPath(Eval("strProductImage").ToString(), ((int)(Eval("intProductID")))) %>' style="border: 1px solid #cecece;" alt="Product Image" width="100" height="90" id="Pimg" runat="server" /></td><td width="40px"></td><td align="center"><asp:Image ID="BarcodeImage" runat="server" Height="90" /></td></tr><tr><td height="10px"></td></tr><tr><td valign="top" colspan="3" align="left"><asp:Label ID="lblMessage" runat="server"></asp:Label></td><td width="10"></td></tr><tr><td height="10px"></td></tr><tr><td align="left" colspan="3"><table border="0" cellpadding="0" cellspacing="0"><tr><td height="10px"></td></tr><tr><td align="left">Due Cost : &nbsp;</td><td></td><td align="right"><asp:Label ID="CostToYou" runat="server" Font-Bold="true"></asp:Label></td></tr></table></td></tr></table></td></tr><tr><td height="10px"><asp:HiddenField ID="HdnPID" runat="server" /><asp:HiddenField ID="HdnPName" runat="server" /><asp:HiddenField ID="HdnCBID" runat="server" /></td></tr><tr><td colspan="3" align="right"><input type="button" id="btnPrintLater" runat="server" value="Print Later" /><input type="button" value="Print" onclick="javascript: CallPrint();" /></td><td></td></tr><tr><td height="10px"></td></tr></table></div></asp:Panel></ContentTemplate></asp:UpdatePanel><%--MODAL Popup for Share User--%><asp:UpdatePanel ID="updShare" runat="server" UpdateMode="Conditional"><ContentTemplate><asp:Button ID="HdnBtnForupdShare" runat="server" Style="display: none;" EnableViewState="false" /><ajaxToolkit:ModalPopupExtender ID="mpeShare" runat="server" TargetControlID="HdnBtnForupdShare" BackgroundCssClass="modalBackground" PopupControlID="Panel2"></ajaxToolkit:ModalPopupExtender><asp:Panel ID="Panel2" runat="server"><div style="border-left: 5px solid #ff0000; border-top: 5px solid #ff0000; border-right: 5px solid #ff0000; border-bottom: 5px solid #ff0000; border-radius: 5px;"><table border="0" cellpadding="0" cellspacing="0" style="background-color: #FFFFFF;" width="500px"><tr><td height="10px"></td></tr><tr><td width="10px"></td><td></td><td align="right" valign="top" style="vertical-align: top;"><img alt="close" width="15" height="15" src="../App_Themes/Default/images/exit.png" style="cursor: pointer;" onclick="javascript:closePopUpShare();" /></td><td width="10px"></td></tr><tr><td height="10px"></td></tr><tr><td width="10px"></td><td align="left" colspan="2" style="border: 1px solid #cecece; background: -moz-linear-gradient(top, #ff0000 0%, #ff0000 15%, #000000 130%);"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="10px"></td></tr><tr><td width="10"></td><td style="font-family: Arial; font-size: 16px; color: #ffffff; font-weight: bold; vertical-align: middle;">Your Friend List</td><td width="10"></td><td valign="middle" style="font-family: Arial; font-size: 15px; font-weight: bold; color: #ffffff; cursor: pointer;"></td><td align="right"><img alt="" src="../App_Themes/Default/images/idealogosmall.png" height="50" /></td><td width="10"></td></tr><tr><td height="10px"></td></tr></table></td><td width="10px"></td></tr><tr><td height="10px"></td></tr><tr><td width="10px"></td><td align="left" valign="top"><asp:ListView ID="lstFriendList" runat="server" DataSourceID="SqlFriendList" DataKeyNames="ID"><ItemTemplate><table border="0" cellpadding="0" cellspacing="0"><tr><td><img alt="" style="cursor: pointer;" onclick='javascript:window.location="<%=FullRootPath%>/User/IDashboard.aspx?id=<%#Eval("ID") %>";' src='<%=FullRootPath %><%#Eval("UserPicture") %>' width="70" height="70" /></td><td width="30"></td><td width="150" onclick='javascript:window.location="<%=FullRootPath%>/User/IDashboard.aspx?id=<%#Eval("ID") %>";' style="font-family: Arial; font-size: 14px; color: #000000; font-weight: bold; vertical-align: middle; cursor: pointer; text-decoration: underline;"><asp:Label ID="UserName" runat="server" Text='<%# Eval("LastName") + "," + Eval("FirstName") %>'></asp:Label></td><td width="30"></td><td style="vertical-align: middle;"><asp:Button runat="server" ID="btnShare" CommandArgument='<%#Eval("ID") %>' OnCommand="ShareWithFriends" CssClass="dashboardButton" Text="Share With Friend" /></td></tr><tr><td height="10"></td></tr></table></ItemTemplate></asp:ListView><asp:SqlDataSource ID="SqlFriendList" runat="server" ConnectionString="<%$ConnectionStrings:mpfc%>" SelectCommand="SELECT * FROM [tbUser] WHERE ID <> 1" SelectCommandType="Text"></asp:SqlDataSource></td><td width="10px"></td></tr></table></div></asp:Panel></ContentTemplate></asp:UpdatePanel><asp:UpdatePanel ID="updSuccess" runat="server"><ContentTemplate><asp:Button ID="HdnBtnForupdSuccess" runat="server" Style="display: none;" EnableViewState="false" /><ajaxToolkit:ModalPopupExtender ID="mpeSuccess" runat="server" TargetControlID="HdnBtnForupdSuccess" BackgroundCssClass="modalBackground" PopupControlID="PanelSuccess"></ajaxToolkit:ModalPopupExtender><asp:Panel ID="PanelSuccess" runat="server"><div style="border-left: 5px solid #ff0000; border-top: 5px solid #ff0000; border-right: 5px solid #ff0000; border-bottom: 5px solid #ff0000; border-radius: 5px;"><table border="0" cellpadding="0" cellspacing="0" style="background-color: #FFFFFF;" width="500px"><tr><td height="10px"></td></tr><tr><td width="10px"></td><td></td><td align="right" valign="top" style="vertical-align: top;"><img alt="close" width="15" height="15" src="../App_Themes/Default/images/exit.png" style="cursor: pointer;" onclick="javascript:closePopUpSuccess();" /></td><td width="10px"></td></tr><tr><td height="10px"></td></tr><tr><td width="10px"></td><td align="left" colspan="2" style="border: 1px solid #cecece; background: -moz-linear-gradient(top, #ff0000 0%, #ff0000 15%, #000000 130%);"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td height="10px"></td></tr><tr><td width="10"></td><td style="font-family: Arial; font-size: 16px; color: #ffffff; font-weight: bold; vertical-align: middle;">Coupon Send to the users</td><td width="10"></td><td valign="middle" style="font-family: Arial; font-size: 15px; font-weight: bold; color: #ffffff; cursor: pointer;"></td><td align="right"><img alt="" src="../App_Themes/Default/images/idealogosmall.png" height="50" /></td><td width="10"></td></tr><tr><td height="10px"></td></tr></table></td><td width="10px"></td></tr><tr><td height="10px"></td></tr><tr><td width="10px"></td><td align="center" valign="middle" style="vertical-align: middle;" height="50px"><asp:Label ID="Label2" Font-Names="Arial" Font-Bold="true" runat="server" Text="Coupon Send Successfully to your friend."></asp:Label></td><td width="10px"></td></tr><tr><td height="30px"></td></tr></table></div></asp:Panel></ContentTemplate></asp:UpdatePanel><asp:HiddenField ID="hdnPrintLaterValues" runat="server" Value="" /><asp:Button ID="btnSetSession" runat="server" OnClick="SetSession" Style="display: none;" /><asp:Button ID="btnSetSession2" runat="server" OnClick="SetSession2" Style="display: none;" /><asp:HiddenField ID="hdnCouponId" runat="server" Value="0" /><script type="text/javascript">

                function CallPrint() {
                    var pid = document.getElementById('<%=HdnPID.ClientID%>');  //("ctl00_ContentMiddle_HdnPID");
                    var cbid = document.getElementById('<%=HdnCBID.ClientID%>'); //("ctl00_ContentMiddle_HdnCBID");
                    window.open("<%=FullRootPath%>/User/PrintCoupon.aspx?pid=" + pid.value + "&cbid=" + cbid.value, "resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width=300px,height=200px");
                }

                function PrintAllOpen() {
                    //var pid = document.getElementById("ctl00_ContentMiddle_HdnPID");
                    //var cbid = document.getElementById("ctl00_ContentMiddle_HdnCBID");
                    //CallPrintLater(pid.value, cbid.value);
                    window.open("<%=FullRootPath%>/User/PrintAll.aspx", "resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width=300px,height=200px");
                }

                function PrintAll() {
                    var btn = document.getElementById('<%=btnSetSession2.ClientID%>');

                    btn.click();
                }

                function CallPrintLater(pid, cbid) {
                    var hdn = document.getElementById('<%=hdnPrintLaterValues.ClientID%>');  // ("ctl00_ContentMiddle_hdnPrintLaterValues");
                    hdn.value = hdn.value + pid + "-" + cbid + "#";
                    var btn = document.getElementById('<%=btnSetSession.ClientID%>');

                    btn.click();
                }

                function show(obj) {
                    var div = obj.id.split('_');
                    var ctyId = div[0] + "_" + div[1] + "_" + div[2] + "_" + div[3] + "_costToYou";
                    var id = document.getElementById(ctyId);
                    id.style.display = "";
                    obj.style.display = "none";
                }

                function closePopUp() {
                    //$find("ctl00_ContentMiddle_mpe").hide();
                    $find('<%=mpe.ClientID %>').hide();
                }

                function share(obj) {
                    var hdncid = document.getElementById('<%= hdnCouponId.ClientID%>'); // ("ctl00_ContentMiddle_hdnCouponId");
                    hdncid.value = obj;

                    //$find("ctl00_ContentMiddle_mpeShare").show();
                    $find('<%=mpeShare.ClientID%>').show();
                }

                function closePopUpShare() {
                    $find('<%=mpeShare.ClientID%>').hide();
                }

                setInterval('runTimeLeft(24)', 1000);

                var totalsec = 0;

                function runTimeLeft(timeleft) {
                    if (totalsec == 0)
                        totalsec = timeleft * 60 * 60;
                    totalsec -= 1;

                    var hours = Math.floor(totalsec / (60 * 60));

                    var divisor_for_minutes = totalsec % (60 * 60);

                    var minutes = Math.floor(divisor_for_minutes / 60);

                    var divisor_for_seconds = divisor_for_minutes % 60;
                    var seconds = Math.ceil(divisor_for_seconds);
                    var timef = hours + ":" + minutes + ":" + seconds;
                    $('.timeleft').html(timef);
                }

                function closePopUpSuccess() {
                    //$find("ctl00_ContentMiddle_mpeSuccess").hide();
                    $find('<%=mpeSuccess.ClientID%>').hide();
                }</script></ContentTemplate></asp:UpdatePanel></asp:Content>

alishz123@yahoo.com


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>