Multiple web.config files

Posts   
 
    
neil
User
Posts: 1
Joined: 17-Jul-2006
# Posted on: 17-Jul-2006 22:56:47   

I am in the early stages of writing an ASP.Net 2.0 site using MS SQL 2000. The site will have 2 areas, an unsecured main area and a sub-folder with a second web.config which has Forms authentication enabled.

My question is, will LLBLGEN 2 use the local connection strings in the 2 web.config files?

(I am using the self service templates).

I intend for the unsecured main folder's web.config to use a connection string which uses a read only database user. The secured sub folder's web.config will use a connection string with a database user that has more permissions.

Any help greatly appreciated before I spend too much time implementing this.

Neil.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 18-Jul-2006 07:06:40   

I assume you mean by a sub-folder, a sub virtual folder. Each web application's DAL assembleis will use the corresponding web.config.

Also you might set it manually in code by setting the "DbUtils.ActualConnectionString".

Posts: 1
Joined: 18-Mar-2005
# Posted on: 18-Jul-2006 13:06:50   

(This is still Neil but from the forum user I have at work)

I mean a sub folder within the same virtual directory

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 18-Jul-2006 13:50:16   

You should make that a new virtual directory. That makes it a new application, so you can place a new web.config in there.

Frans Bouma | Lead developer LLBLGen Pro