Welcome to Jtech!


You are not logged in.
Login

Menu

The 'web.config' file

The website's 'web.config' file is where items are placed that govern the operation of all ASP.Net's source files ending in the extension '.aspx'.

This file can contain literally hundreds of items. - But for our excercise, we'll only put in the few things (plus one or two optional ones) that the Login Control requires and to help us in de-bugging.

Here's what the 'web.config' file looks like for our sample application:

Don't let this scare you. - You'll get used to it. - Promise!

I've outlined the various sections and we'll discuss them (very) briefly for now. - Later we'll talk about the settings in more detail.

SECTION A - 'connetionStrings - This is required as it tells ASP.Net how to connect and log into the SQl server. - It also says which database (catalog) to use.

SECTION B - 'authenticate mode' - This is required and the mode must be set to 'forms' eelse ASP.Net cannot connect to SQL.

SECTION C - 'membership' - This is required so the Login Control will work. - Some of the settings you see here are optional and some are not. - Again, we'll take this section apart in greater detail later.

SECTION D - 'role provider' - This is optional and will be used if you want to use 'roles'. - We'll discuss roles in the next pagge.

SECTION E - 'compilation deug' & 'customErrors mode' - These are both optional and are not part of the ASP.Net for membership/Login Control. - I set these so I can see any errors during development on a remote browser. - These settings should be turned off on a 'production site'.

If you want a copy of this file, we'll offer you a complete set of ALL the files we use in a .zip package at the end of the next page.

Previous - ASP.Net SQL Setup Next - Roles in the Login Control