Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2003, 01:22 PM
Registered User
 
Join Date: Nov 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web.Config confusion

Hi all I'm new in ASP/VB .Net and would appriciate all your guide and walkthrough / tutorial.

I have previously work out one some basic ASP assignment and had never program with .Net, so this is the first time I doing it and hope you can bare with me.....

In ASP we can set a database connection string and import it whenever neccessary like following

MySqlOdbc.inc
-------------
Dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open DSN=someOdbc

Then on let say login page I need to connect to db and validate as below

Login.asp
---------
<%@ Page Language="VB" %>

<%
Dim Rs, Query
Query = "Select * From Login Where UserId = " & _
Request.Form("username") & "Pwd= " &_
Request.Form("password") & ";"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open Sql, oConn
...
...
...
%>

Since now I'm using .Net, I was told that there are various way in doing something similar to what I mentioned above by using
1.) Traditional <! \-- import file --> method
2.) CodeBehind
3.) Web.Config
I'm however interested in web.config as I wanted to grab this chance to learn also the security issue.

Unfortunately for me, even after I have gone through many article and tutorials I'm still not capable to understand much and that is why I turn to this forum. Ya go ahead, you can treat me as a small kid or someone who knows html only. Try to explain in your own word and in simple english terms as I'm kinda poor in english...

The matter I had is as below:
1.) How do I code the connection string in web.config (*Note: for odbc / mysql connection)
2.) Web.config is also capable of handling security issues too like authorization and etc. Under the authorization tag we have the allow and deny tag. For example
<authorization>
<allow>
<deny>
</authorization>
Is it a must that developer have to hard-code those allow user in the allow tag? What if a user have uncountable authorized user and the number of authorized user may increase day by day? I don't think it will be possible for the develop to sit and hard-code those info. So how do I code in both .aspx and .config that it will check through the db and determine whether this user is allow of deny?
3.) <Location> is to determine the location / path a user will be redirected to, am I correct? How do I specify a user to be directed? What is the usage of location?

That's all for now, and I hope you guys can really help me out. Thanks again. Have a nice day!

*Oh ya if there is any .aspx code as sample, do code it in ASP/Vb.Net thanks!!!






Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config dpkbahuguna ASP.NET 3.5 Basics 2 August 26th, 2008 09:41 AM
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
web.config rrkano .NET Framework 2.0 1 June 23rd, 2008 02:50 PM
Web.Config tranzformerz ASP.NET 1.0 and 1.1 Basics 1 August 29th, 2005 05:59 PM
config.php file (define "DSN" ) confusion paddy PHP Databases 3 July 8th, 2003 07:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.