473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

User Login. How to manage

Hi,
i want to create a web-application and want to use a login for users.
this login shall be controlled by a database.
how can i assure that only logged in user can access-pages?

I guess that every form has to call a function fnUserLoggedIn() in its
Load-Event!?

How can i handle to logged-on-procedure by a database?
Nov 19 '05 #1
5 1100
Hi Greg:

The good news is that ASP.NET has an infrastructure to support forms
based authentication, which means you don't have to write a lot of
code.

This following article has a good description - including how to check
against the database:
http://www.4guysfromrolla.com/webtech/110701-1.shtml

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sun, 5 Jun 2005 23:10:39 +0200, "Greg Cyrus" <no****@muelltonne.de>
wrote:
Hi,
i want to create a web-application and want to use a login for users.
this login shall be controlled by a database.
how can i assure that only logged in user can access-pages?

I guess that every form has to call a function fnUserLoggedIn() in its
Load-Event!?

How can i handle to logged-on-procedure by a database?


Nov 19 '05 #2
ok.. tnx . this article with its formauthentication really did help me
alot..
but now . I wonder how I can create a sub-dir with an own web.config -file.
I created a new subdir in the project.. but how cam I deternime another
web.config.-file for that subdir.
I want to create n subdir to manage public and peronal web-areas..
Nov 19 '05 #3
You can drop a web.config file into each subfolder that contains just
an <authorization> section to allow / deny different roles. Is that
what you are asking?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 6 Jun 2005 03:39:51 +0200, "Greg Cyrus" <no****@muelltonne.de>
wrote:
ok.. tnx . this article with its formauthentication really did help me
alot..
but now . I wonder how I can create a sub-dir with an own web.config -file.
I created a new subdir in the project.. but how cam I deternime another
web.config.-file for that subdir.
I want to create n subdir to manage public and peronal web-areas..


Nov 19 '05 #4
i have put anoter web.config-file into a subdir - but authorization in
subdirs doesn't seem to work. I also tried to use the <location path =
"<subdir>">-tag in web.config-file of the root-dir - but IIS always stops
with Configuration Error:
"It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS."
Nov 19 '05 #5
Can you post the web.config settings you put in the subdir? If you are
getting the MachinetoApplication error then there is a setting in the
config that you can't use in a subfolder, but <authorization> itself
will work there...

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 7 Jun 2005 21:10:41 +0200, "Greg Cyrus" <no****@muelltonne.de>
wrote:
i have put anoter web.config-file into a subdir - but authorization in
subdirs doesn't seem to work. I also tried to use the <location path =
"<subdir>">-tag in web.config-file of the root-dir - but IIS always stops
with Configuration Error:
"It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This error
can be caused by a virtual directory not being configured as an application
in IIS."


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: marslee | last post by:
I want to prevent non-registered users to view a page in my website, For example, when a non-registered user clicks the history page, the website site refuses to go there since he is not...
5
by: Dave Kolb | last post by:
Is there any other solution for an ASPNET application to access network resources other than running as SYSTEM, using delegation (a nightmare to get to work) or the COM+ solution? I cannot seem to...
0
by: John | last post by:
Hi I need some to manage user login/roles and personalisation of app based on use role. Is there a simple sample available for this? Thanks Regards
6
by: Amber | last post by:
do the following steps: 1:Use Manage Studio login the server with Integrated security. 2:Create a dabase named testdb; 3:Create a SQL Server login named amber ,and set it to be dbowner of...
6
by: Not Me | last post by:
Hey, We have an sql server 2000 machine and IIS 6 machine running seperately but on the same domain. I can connect fine to the database without using impersonation, but when it's enabled I get...
1
uranuskid
by: uranuskid | last post by:
Hey folks, I was hoping someone could help me out with following problem: I want to use vSigup (available free at www.beanbug.net/vScripts.php) to manage protected pages. Well, that all works...
2
by: SpaceMarine | last post by:
ok im new to SQL Server 2005, from 2000. my webapps use integrated security, and run under: \\MYMACHINE\ASPNET ....in 2000 it was a pretty simple thing to create a new db user for this...
4
by: Nick | last post by:
Hi there, I have a website setup which uses the ASP.net login controls to manage user sessions. I would like to be able to login a user through a webservice situated on the same server. ...
0
by: chet | last post by:
We have a number of existing asp.net applications where our clients now want to content manage the login page. The applications have not been developed with content management in mind and its...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.