Showing posts with label username. Show all posts
Showing posts with label username. Show all posts

Saturday, March 24, 2012

passing variables

hi,

When my user logs on they suppy a username thats checked off a db to allow access. This username is the unique identifier for all queries that are run throughout the access. What is the best way to pass this between pages. I will have a number of clients accessing at the same time. The variable is a six character alphanumeric.

any ideas will be accepted gratefully....oh security is a key issue as i dont want users getting access to eachothers identifier.

tia

pecSee if below two links could helps for your question

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskpassingvaluesbetweenwebformspages.asp

and

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconpassingservercontrolvaluesbetweenpages.asp

If not you could capture the value in sessions and you can use it in all the pages!

Hope it helps!
hi

i followed the first links eg...but when i use sourcepage.property1 it isnt within the object

any ideas

pec
In this given example in first page he given a property1 as property, so if you have that then only you will able to access it!

Hope it helps!
hi,

I had set the property code with in my <script> in html. When i moved it to the vb it worked but when i ran it the called page gave this error...even though i have placed the Public sourcepage As WebForm1 in the right place?

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30451: Name 'sourcepage' is not declared.

Source Error:

Line 15:
Line 16: If Not IsPostBack Then
Line 17: sourcepage = CType(Context.Handler, logon)
Line 18: dim strUserName as string = sourcepage.Username
Line 19: mydatagrid.Visible = False

tia pec
Declare sourcepage, then use it!

Ex: Dim sourcepage As PreviousPage

In this case PreviousPage is the first page reference name!

That could solve your problem!

Friday, March 16, 2012

Password and confirm password fields

Hi all.
I need to develop simple web page with username and password definition. When page is reloaded while onserwer integrity check, password and confirm password fields are erased. How can I prevent it?that is what normally happens, its a security issue, that the password field is to be emptied when page is reloaded.

regards.
But how can I over fit it? I saw pages when you chose region, for example, and turn to data base to get cities (reloading) but password field stay the same it was before.
Hello, try to enable ViewState for the current server control.

regards.
Opps posted wrong code sorry!!

password attempts

have a username and opassword text boxes and one login button. When I
type password it checks three times weather my username and password
is correct or not. After 3 failed attempts it gives me message that
Notify your administrator.
I used form Authnication. How can I count weather user attempts 3
times. My username and password is stored in databaseThe easiest way is to set up a session variable and increment:
if(failedLogin)
Session("failedAttempts") = int.Parse(Session("FailedAttempts")) + 1;
You can then disable the account in the database when this hits three and
any time they try to log in after that kicks them.
A more full method is to have failed attempts in the database and increment
each time they fail, reset to 0 if succesful. If you like this model, the
easiest way to get it is to use the ASP.NET built in membership model. It
automatically does this for you.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
****************************************
*****
Think outside the box!
****************************************
*****
<bbawa1@.yahoo.com> wrote in message
news:1177104579.742843.13100@.q75g2000hsh.googlegroups.com...
> have a username and opassword text boxes and one login button. When I
> type password it checks three times weather my username and password
> is correct or not. After 3 failed attempts it gives me message that
> Notify your administrator.
> I used form Authnication. How can I count weather user attempts 3
> times. My username and password is stored in database
>

password attempts

have a username and opassword text boxes and one login button. When I
type password it checks three times weather my username and password
is correct or not. After 3 failed attempts it gives me message that
Notify your administrator.

I used form Authnication. How can I count weather user attempts 3
times. My username and password is stored in databaseThe easiest way is to set up a session variable and increment:

if(failedLogin)
Session("failedAttempts") = int.Parse(Session("FailedAttempts")) + 1;

You can then disable the account in the database when this hits three and
any time they try to log in after that kicks them.

A more full method is to have failed attempts in the database and increment
each time they fail, reset to 0 if succesful. If you like this model, the
easiest way to get it is to use the ASP.NET built in membership model. It
automatically does this for you.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*********************************************
Think outside the box!
*********************************************
<bbawa1@.yahoo.comwrote in message
news:1177104579.742843.13100@.q75g2000hsh.googlegro ups.com...

Quote:

Originally Posted by

have a username and opassword text boxes and one login button. When I
type password it checks three times weather my username and password
is correct or not. After 3 failed attempts it gives me message that
Notify your administrator.
>
I used form Authnication. How can I count weather user attempts 3
times. My username and password is stored in database
>