Hi. I am creating an Electrical Maintenance System for my project using ASP.NET C# with SQL as backend. Till date i have created the basic pages, most of them without database connectivity or authentication. Now i have started the DB connectivity and am gradually moving with it.
I would like to start with the LOGIN session and the authentication of the Users who login. I am not able to understand where to start it from. I have three types of users and depending on the user type which logs in, their respective Homepage opens up. For eg. For administrator, we have a different Homepage. For the Electrical Maintenance Manager, we have a different Homepage and for the Default user who only registers Complaints we have a different page.
How do i Use session authentication?
Also, There is another page which i am facing problems with.
I am trying to perform Crosspage Postback and Transfer the Data in the Controls on the 1st page to the 2nd page(in labels). However, it fails to display a single value from the previous page! Please help me!
Asp.NET C# applicationElectrical Maintenance System
Page 1 of 1
3 Replies - 1408 Views - Last Post: 13 May 2009 - 12:34 PM
Replies To: Asp.NET C# application
#2
Re: Asp.NET C# application
Posted 11 May 2009 - 06:59 PM
ananmail, on 10 May, 2009 - 09:51 PM, said:
Hi. I am creating an Electrical Maintenance System for my project using ASP.NET C# with SQL as backend. Till date i have created the basic pages, most of them without database connectivity or authentication. Now i have started the DB connectivity and am gradually moving with it.
I would like to start with the LOGIN session and the authentication of the Users who login. I am not able to understand where to start it from. I have three types of users and depending on the user type which logs in, their respective Homepage opens up. For eg. For administrator, we have a different Homepage. For the Electrical Maintenance Manager, we have a different Homepage and for the Default user who only registers Complaints we have a different page.
How do i Use session authentication?
Also, There is another page which i am facing problems with.
I am trying to perform Crosspage Postback and Transfer the Data in the Controls on the 1st page to the 2nd page(in labels). However, it fails to display a single value from the previous page! Please help me!
I would like to start with the LOGIN session and the authentication of the Users who login. I am not able to understand where to start it from. I have three types of users and depending on the user type which logs in, their respective Homepage opens up. For eg. For administrator, we have a different Homepage. For the Electrical Maintenance Manager, we have a different Homepage and for the Default user who only registers Complaints we have a different page.
How do i Use session authentication?
Also, There is another page which i am facing problems with.
I am trying to perform Crosspage Postback and Transfer the Data in the Controls on the 1st page to the 2nd page(in labels). However, it fails to display a single value from the previous page! Please help me!
Quote
Is your DB connection ok? To determine what type of user log in, you may add a field on the DB to check if the account is for administrator or user only and so on. For example on your DB put a field name "account_type" and value range 1 - 3, 1 for administrator; 2 for different type of user and same as for 3. Now on the log in page when the user type the username and password, on your query you may now check the account type on what page the user will be redirected.
On your question on how to transfer data from one page to another, use the Session Variable. You will declare it on the Global.asax. To add Global.asax right click on the project name place on the solution explorer, then add >> new item.
On your question on how to transfer data from one page to another, use the Session Variable. You will declare it on the Global.asax. To add Global.asax right click on the project name place on the solution explorer, then add >> new item.
#4
Re: Asp.NET C# application
Posted 13 May 2009 - 12:34 PM
Just an FYI access authentication is something that I typically add last. It is actually quite simple to implement. What I did was simply take the persons userID and place it into a session variable. On my Master Page Form.Load I checked the contents of my session variable. If it is null then I knew that either the user tried to jump to a page w/o logging in or the session timed out. All I did was reroute the user back to the log in page otherwise I proceeded into the page. This logic is about as basic as you can get. Now if you wanted to add levels of security then the process does get more involved.
When ever I develop any ASP.NET/MS Sql app I build the functionality first which is going to take the longest.
Good luck and hope this helps.
Kurt
When ever I develop any ASP.NET/MS Sql app I build the functionality first which is going to take the longest.
Good luck and hope this helps.
Kurt
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|