ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
If I'm developing an application that must accommodate
multiple security levels though secure login and my ASP.NET
web application is spanned across three web-servers (using
round-robin load balancing) what would be the best approach
to maintain login-in state for the users?
 Question Submitted By :: Rajeswari
I also faced this Question!!     Rank Answer Posted By  
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 1
http://www.codeproject.com/KB/webforms/NingLiangSimpleContro
l.aspx
 
Is This Answer Correct ?    0 Yes 0 No
A
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 2
http://forums.asp.net/t/1316768.aspx
 
Is This Answer Correct ?    0 Yes 0 No
B
 
 
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 3
http://forums.asp.net/t/1159696.aspx
 
Is This Answer Correct ?    0 Yes 0 No
B
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 4
/* Deafult.aspx.cs */

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 System.Data.SqlClient;
using System.Text;

public partial class UI_Default3 : System.Web.UI.Page
{
    public string projTable = string.Empty;
    public string projCode = string.Empty;
    public DataSet dst = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        dst = new DataSet();
        dst = PopulateData.LoadProject();
        StringBuilder sb = new StringBuilder();

        if (Request.QueryString["projCode"] != null) {
            projCode = Request.QueryString
["projCode"].ToString();
        }

        if(dst.Tables[0].Rows.Count > 0){            
            for (int i = 0; i < dst.Tables[0].Rows.Count; 
i++) {
                sb.Append("<tr>");
                sb.Append("<td>");
                sb.Append("<a href=\"../UI/Default3.aspx?
projCode=" + dst.Tables[0].Rows[i]["ProjCode"] + "\"><img 
src=\"../Images/Tree.GIF\" /></a>");
                sb.Append("</td>");
                sb.Append("<td>");
                sb.Append("<a href=\"../UI/Default3.aspx?
projCode=" + dst.Tables[0].Rows[i]["ProjCode"] + "\">" + 
dst.Tables[0].Rows[i]["ProjDesc"] + "</a>");
                sb.Append("</td>");
                sb.Append("</tr>");

                sb.Append("<tr>");
                sb.Append("<td colspan=\"2\">");

                if (!projCode.Equals(string.Empty) && 
projCode.Equals(dst.Tables[0].Rows[i]["ProjCode"].ToString
())) {                
                    DataSet dstNew = new DataSet();
                    dstNew = PopulateData.LoadDivision
(projCode);

                    sb.Append("<table border=\"1\" >");
                    sb.Append("<tr>");
                    sb.Append("<td>Division ID</td>");
                    sb.Append("<td>Division Name</td>");
                    sb.Append("</tr>");

                    for (int j = 0; j < dstNew.Tables
[0].Rows.Count; j++) {
                        sb.Append("<tr>");
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionID"] + "</td>");
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionName"] + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                    projCode = string.Empty;
                }

                sb.Append("<tr>");
                sb.Append("<td>");
            }
            projTable = sb.ToString();
        }

        

        
    }
}

-----------------------------------------------------------

/* Default.aspx */

<%@ Page Language="C#" AutoEventWireup="true" 
CodeFile="Default3.aspx.cs" Inherits="UI_Default3" %>

<!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 runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
    <% =projTable %>
    </table>
    </div>
    </form>
</body>
</html>
 
Is This Answer Correct ?    0 Yes 0 No
A
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 5
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 System.Data.SqlClient;
using System.Text;

public partial class UI_Default3 : System.Web.UI.Page
{
    public string projTable = string.Empty;
    public string projCode = string.Empty;
    public string expand = string.Empty;
    public DataSet dst = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        dst = new DataSet();
        dst = PopulateData.LoadProject();
        StringBuilder sb = new StringBuilder();

        if (Request.QueryString["projCode"] != null) {
            projCode = Request.QueryString
["projCode"].ToString();            
        }

        if (Request.QueryString["expand"] != null) {
            expand = Request.QueryString["expand"].ToString
();
        }

        if (Session["projCode"] != null && Session
["projCode"].ToString() != string.Empty) {
            if (expand.Equals("1")) {
                Session["projCode"] = Session
["projCode"].ToString() + projCode + ",";
            } else {
                Session["projCode"] = Session
["projCode"].ToString().Replace((projCode + ","), "");
            }
        } else {
            Session["projCode"] = projCode + ",";
        }

        string sProjCode = string.Empty;
        sProjCode = Session["projCode"].ToString();

        if(dst.Tables[0].Rows.Count > 0){            
            for (int i = 0; i < dst.Tables[0].Rows.Count; 
i++) {
                sb.Append("<tr>");
                sb.Append("<td>");
                if (sProjCode.IndexOf(dst.Tables[0].Rows[i]
["ProjCode"].ToString()) >= 0) {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=0\"><img 
src=\"../Images/close.GIF\" /></a>");
                } else {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=1\"><img 
src=\"../Images/open.GIF\" /></a>");
                }
                sb.Append("</td>");
                sb.Append("<td>");
                if (sProjCode.IndexOf(dst.Tables[0].Rows[i]
["ProjCode"].ToString()) >= 0) {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=0\">" + dst.Tables[0].Rows[i]
["ProjDesc"] + "</a>");
                } else {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=1\">" + dst.Tables[0].Rows[i]
["ProjDesc"] + "</a>");
                }
                sb.Append("</td>");
                sb.Append("</tr>");

                sb.Append("<tr>");
                sb.Append("<td colspan=\"2\">");

                if (!sProjCode.Equals(string.Empty) && 
(sProjCode.IndexOf(dst.Tables[0].Rows[i]
["ProjCode"].ToString()) >= 0) ) {                
                    DataSet dstNew = new DataSet();
                    dstNew = PopulateData.LoadDivision
(dst.Tables[0].Rows[i]["ProjCode"].ToString());

                    sb.Append("<table border=\"1\" >");
                    sb.Append("<tr>");
                    sb.Append("<td>Division ID</td>");
                    sb.Append("<td>Division Name</td>");
                    sb.Append("</tr>");

                    for (int j = 0; j < dstNew.Tables
[0].Rows.Count; j++) {
                        sb.Append("<tr>");
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionID"] + "</td>");
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionName"] + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                }

                sb.Append("<tr>");
                sb.Append("<td>");
            }
            projTable = sb.ToString();
        }

        

        
    }
}
 
Is This Answer Correct ?    0 Yes 0 No
B
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 6
/* Alternate row color */

for (int j = 0; j < dstNew.Tables[0].Rows.Count; j++) {
                        if (j % 2 == 0) {
                            sb.Append("<tr class=\"row\">");
                        }else{
                            sb.Append("<tr 
class=\"altRow\">");
                        }
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionID"] + "</td>");
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionName"] + "</td>");
                        sb.Append("</tr>");
                    }


/* Style */

.row{
            background-color:Gray;
        }
        .alrRow{
            background-color:Olive;
        }
 
Is This Answer Correct ?    0 Yes 0 No
A
 
  Re: If I'm developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Answer
# 7
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 System.Data.SqlClient;
using System.Text;

public partial class UI_Default3 : System.Web.UI.Page
{
    public string projTable = string.Empty;
    public string projCode = string.Empty;
    public string expand = string.Empty;
    public string expandAll = string.Empty;
    public DataSet dst = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        dst = new DataSet();
        dst = PopulateData.LoadProject();
        StringBuilder sb = new StringBuilder();

        if (Request.QueryString["projCode"] != null) {
            projCode = Request.QueryString
["projCode"].ToString();            
        }

        if (Request.QueryString["expand"] != null) {
            expand = Request.QueryString["expand"].ToString
();
        }

        if (Request.QueryString["expandAll"] != null) {
            expandAll = Request.QueryString
["expandAll"].ToString();
        }

        if (expandAll.Equals("1")) {
            Session.Remove("projCode");
            for (int i = 0; i < dst.Tables[0].Rows.Count; 
i++) {
                if (Session["projCode"] != null && Session
["projCode"].ToString() != string.Empty) {
                    Session["projCode"] = Session
["projCode"].ToString() + dst.Tables[0].Rows[i]
["ProjCode"].ToString() + ",";
                } else {
                    Session["projCode"] = dst.Tables[0].Rows
[i]["ProjCode"].ToString() + ",";
                }
            }
        } else if (expandAll.Equals("0")) {
            Session.Remove("projCode");
        }

        if (Session["projCode"] != null && Session
["projCode"].ToString() != string.Empty) {
            if (expand.Equals("1")) {
                Session["projCode"] = Session
["projCode"].ToString() + projCode + ",";
            } else if(expand.Equals("0")) {
                Session["projCode"] = Session
["projCode"].ToString().Replace((projCode + ","), "");
            }
        } else {
            if (!projCode.Equals(string.Empty)) {
                Session["projCode"] = projCode + ",";
            } else {
                Session["projCode"] = string.Empty;
            }
        }

        string sProjCode = string.Empty;
        sProjCode = Session["projCode"].ToString();

        sb.Append("<tr>");
        sb.Append("<td>");

        if (expandAll.Equals("1")) {
            sb.Append("<a href=\"../UI/Default3.aspx?
expandAll=0\">Collapse all</a>");
        } else {
            sb.Append("<a href=\"../UI/Default3.aspx?
expandAll=1\">Expand all</a>");
        }

        sb.Append("</td>");
        sb.Append("</tr>");

        if(dst.Tables[0].Rows.Count > 0){            
            for (int i = 0; i < dst.Tables[0].Rows.Count; 
i++) {
                sb.Append("<tr>");
                sb.Append("<td>");
                if (sProjCode.IndexOf(dst.Tables[0].Rows[i]
["ProjCode"].ToString()) >= 0) {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=0\"><img 
src=\"../Images/close.GIF\" /></a>");
                } else {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=1\"><img 
src=\"../Images/open.GIF\" /></a>");
                }
                sb.Append("</td>");
                sb.Append("<td>");
                if (sProjCode.IndexOf(dst.Tables[0].Rows[i]
["ProjCode"].ToString()) >= 0) {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=0\">" + dst.Tables[0].Rows[i]
["ProjDesc"] + "</a>");
                } else {
                    sb.Append("<a 
href=\"../UI/Default3.aspx?projCode=" + dst.Tables[0].Rows
[i]["ProjCode"] + "&expand=1\">" + dst.Tables[0].Rows[i]
["ProjDesc"] + "</a>");
                }
                sb.Append("</td>");
                sb.Append("</tr>");

                sb.Append("<tr>");
                sb.Append("<td colspan=\"2\">");

                if ((!sProjCode.Equals(string.Empty) && 
(sProjCode.IndexOf(dst.Tables[0].Rows[i]
["ProjCode"].ToString()) >= 0))) {                
                    DataSet dstNew = new DataSet();
                    dstNew = PopulateData.LoadDivision
(dst.Tables[0].Rows[i]["ProjCode"].ToString());

                    sb.Append("<table border=\"1\" >");
                    sb.Append("<tr>");
                    sb.Append("<td>Division ID</td>");
                    sb.Append("<td>Division Name</td>");
                    sb.Append("</tr>");

                    for (int j = 0; j < dstNew.Tables
[0].Rows.Count; j++) {
                        if (j % 2 == 0) {
                            sb.Append("<tr class=\"row\">");
                        }else{
                            sb.Append("<tr 
class=\"altRow\">");
                        }
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionID"] + "</td>");
                        sb.Append("<td>" + dstNew.Tables
[0].Rows[j]["DivisionName"] + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                }
                sb.Append("</td>");
                sb.Append("</tr>");
                
            }
            projTable = sb.ToString();
        }

        

        
    }
}
 
Is This Answer Correct ?    0 Yes 0 No
A
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What is the purpose of the validation summary control? What do you need to do to prevent an error message from being displayed in a validator when a validation summary control is used? How can you display a message in both the validator and the validation summary control?  1
What method must be overridden in a custom control? a) The Paint() method b) The Control_Build() method c) The Render() method d) The default constructor Syntax-Softtech1
please can any describe 'Master Page' in ASP.Net 2.0  3
When during the page processing cycle is ViewState available?  1
Explain what a diffgram is and a good use for one? Syntax-Softtech1
can we transfer data from one page to another page using viewstate if so how?if not y? Wipro25
what is pagination in asp.net ? Netsweeper1
what is asp dotnet  1
Can a master page inherit another master page? Emphasis8
What is web.config and machine.config ? TCS2
What are the differences between Trace and Debug? Accenture2
Where can we set the specific variables for a application and Session objects ?  2
Difference between application and session ? Satyam5
best .net institute in hyderabad  3
What is the Difference B/W Finalize() and Dispose() in .Net? HCL7
What is custom control. What is the difference between custom control and user control ? Microsoft1
How to use one project files into another project? HP3
When a dropdownlist has been added by some records and it has been binded why it is not executing i'm facing this error pls help me ? if (is!pageposback) { arraylist books = new arraylist; books.add ("gone with the wind"); books.add ("rahulsriramprakash"); books.add ("vishal"); dropdowndisplay.datasource=books; dropdowndisplay.databind(); } The error is : 1) The dropdowndisplay does not exist. Netsweeper4
can i use store procedure in disconnected mode? give me answer  2
how can you handle "control is not part of this page " error? FactorH3
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com