|
How can I prevent the user from again logging in by clicking the back button. In my web application, after signing out, if the user clicks on browser back button, he can access the main page again.
|
|
|
|
|
Try with the Session. If the User sign out close the Session.
Regards,
Satips.
|
|
|
|
|
It's depend on your implementation.
* If u save the login credential in session or cookies. Then can set the nothing for the Session variable and clear the cookies.
*If u r varify login information only first time when user logged in then u can disable back button by bellow code.
U can use below code. This will not be cach any page on loca machine. then i think it should be work as disable back button.
If u have other problem let me inform.
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
You should not block the back button of the browser using some javascript. In every page load check that the session exist. If not redirect user to login page. When logging out clear the session. By pressing the back button you are seeing the browser cached page. If you are checking sessions on page load, user can't do any processing with the page. When the page posts back, it will check for session and will be redirected to login page.
|
|
|
|
|
Thank you very much for the quick response, I will try your suggestion.
|
|
|
|
|
u can use this script in ur last page ..
history.forward();
so back option vl not work
|
|
|
|
|
|
sorry I didnt think abt it..do u have any solution???
|
|
|
|
|
Whatever solution you suggested is not good, I given the solution on the previous message
|
|
|
|
|
I too accept Navaneeth...Ur suggestion was Gud..but 4 the time being mine vl be usefull to him I guess[ ]
|
|
|
|
|
Sure that will be. Don't take my message in other sense. Just told simply
|
|
|
|
|
Hey Naveenth comeon ..I didnt take it in other way..But I agree tat I was out of standard in asking to disable the back button..
Cheers
Bino Varghese.V
|
|
|
|
|
Yes sir you are right that "we should not block the back button of the browser using some javascript" because javascript can be disable for a browser.
As you suggested to check the session -- I am using Login control and form authentication, and after successfully logged in i have checked to count number of session available, but result found 0, because it keeps all information in a cookie. There is no any session. then how can i prevent to see the page before logged out.
If i manually set a session when user logged in and kill the session on logged out, then also someone can see pages (may contain confidential information) which was opened before logged out. Am I Right?
Then what is the proper solution to prevent see the confidential information opened during any one logged in??????
This Question was made too much earlier, So I think now u found the proper solution.
Please tell me sir.....
I am waiting for your reply...
Thank you in advance
Dipak
|
|
|
|
|
dipak.dipak wrote: If i manually set a session when user logged in and kill the session on logged out, then also someone can see pages (may contain confidential information) which was opened before logged out. Am I Right?
I am not sure I got your question. But using sessions to keep login information is a standard practice. Sessions are stored in the server memory and unique for each users.
dipak.dipak wrote: Then what is the proper solution to prevent see the confidential information opened during any one logged in??????
Do you mean when user presses back button? There are no efficient way to prevent the back button. You can do it using JS, which is not reliable. One solution I see is to open the users secured pages in a popup window, and close this window when user logs out.
|
|
|
|
|
Hi'
I am in a process of building a document scanning application, I need help from where to start , what I intend to do is to build an application that would scan the document and then store it as binary in the database .
Kindly help me out in this regard.
Thanks,
Ali
Life is too short to be counted, enjoy life.
|
|
|
|
|
There are good TWAIN SDKs available to purchase. I'm assuming you don't intend to handle scanning within Internet Explorer ? This is teh ASP.NET forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I my dataset there are 100 records, how to get the records between 5 to 10
If you have the example please Paste it.
Mkanchha
|
|
|
|
|
What do you mean by this posting ?
|
|
|
|
|
Mkanchha wrote: I my dataset there are 100 records
Do you mean 100 tables. ? A dataset can contain tables. But not rows.
I assume that you have a datatable that contains 100 records and you want to take records between 5 to 10. So the code could be something like this
for(int i=5;i<=10;i++)
{
Response.Write(YourDs.Tables[TableName].Rows[i][YourColumnName].ToString());
}
|
|
|
|
|
Navaneeth. wrote: A dataset can contain tables. But not rows.
I think he want to say that Dataset contains 100 records means indirectly Dataset Contains one table which have 100 rows
so
!!! posted code is right
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
People got confusion between datasets and tables..
|
|
|
|
|
Hi,
I have been getting timeout errors for displaying my data. I used this code:
using System;
using System.Collections.Generic;
using System.Text;
namespace MyAdapters
{
public partial class working_step_a00TableAdapter
{
public string ConnectionString
{
get
{
return this.Connection.ConnectionString;
}
set
{
Connection.ConnectionString = value;
}
}
public void SetCommandTimeout(int timeout)
{
foreach (IDbCommand command in CommandCollection)
command.CommandTimeout = timeout;
}
}
}
And in the page load section, it has:
using System;
using System.Data;
using System.Configuration;
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 MyAdapters;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.working_step_a00TableAdapter.SelectCommandTimeout = 300;
}
}
It doesn't understand 'using MyAdapters;' and it does not seem to work. What I am missing here? Thanks for your help.
ltrain2
|
|
|
|
|
ltrain2 wrote: It doesn't understand 'using MyAdapters;'
Where is the class ?
ltrain2 wrote: this.working_step_a00TableAdapter.SelectCommandTimeout = 300;
Is SelectCommandTimeout static ? I don't see it there, at all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I created the class as BLL/TechBLL.cs folder. Apparently, I am trying this out on the web and am getting session timeout. The CommandCollection seems to be only helpful for nonweb users. How can I get timeout session against the web? Thanks.
|
|
|
|
|
Hi all,
Been trying to play with Windows Sharepoint Services(2003 I think?) a bit recently and I'm having some pretty frustrating problems. My ASP.NET 2.0 knowledge isn't wonderful, but by my understanding, Web Parts can be used to wrap a user control and used in a web part page, correct? I tested a basic user control as a web part in my Vista environment using regular IIS and it seems to work fine. However, Sharepoint really doesn't play well with what I give it. I've looked at a bunch of different tutorials on how to get the things to work, but they just add to my confusion. Everytime I try to upload the Web Part I made to wrap a user control I did to Sharepoint, it tells me that I can't import the part. (Exact error message is: "Unable to add selected web part(s). Cannot import this Web Part.")
So does this mean that Sharepoint *requires* that you use the Sharepoint Web Parts framework/namespace, or can you use the regular ASP.NET ones found in the System namespace? And if I can use regular Web Parts, would the import error be from the configuration files? Thanks in advance for any assistance.
|
|
|
|