Where are configuration settings stored in ASP .NET

  • Thread starter Thread starter Maellic
  • Start date Start date
M

Maellic

Hi,

I'm having real trouble locating configuration settings on an existing
website. Details follow:

I've recently taken over a website developed with ASP.NET.
Unfortunately the original developer has left the company and has left
no documentation whatsoever. I've successfully managed to make a few
updates to the website but I've recently hit a snag.

I'm trying to understand where the code to validate a user's login and
password is. On the login page, this is the login form code:

<form method="post" action="login.asp" name="loginFrm" id="loginFrm">
<table border="0" cellPadding="8" cellSpacing="1" width="100%">
<tr>
<td valign="top" width="50%">
<b>Reporting Year Starting:</b> 01 July
<select size="1" name="sYear" id="sYear"
onChange="sYear_onchange(this);">
<option selected value=2001>2000</option>
<option value=2002>2001</option>
<option value=2003>2002</option>
<option value=2004>2003</option>
<option value=2005>2004</option>
<option value=2006>2005</option>
<option value=2007>2006</option>
<option value=2008>2007</option>
<option value=2009>2008</option>
<option value=2010>2009</option>
<option value=2011>2010</option>
</select>
</td>

<td valign="top" width="50%">
<b>Reporting Year Ending:</b> 30 June
<input type="text" name="eYear" size="4" id="eYear"
value=2001 onFocus="this.blur()">

</td>
</tr>
</table>
<table border="0" cellPadding="8" cellSpacing="1" width="100%"
class="tblProductRecord">
<tr>
<td width="20%" align="right" valign="top">
<b> Alias:</b>
</td>
<td valign="top" width="80%">
<img border="0" src="images/sml_login.gif">
<input name="Alias" type="text" id="Alias" size="20">
<input type="submit" name="btnSubmit" value=" GO " id="btnSubmit"
type="submit" class="btnAdd">
<input type="submit" value="Start New Reporting Year"
name="btnNewRptYear" class="btnAdd"><br>
<font size="1" color="#FF0000">
<%= session("LoginErrorLine1") %>
<%= session("LoginErrorLine2") %>
</font>
</td>
</tr>
</table>
</form>

Where should I look to find the code behind the submit button ?
There is no "Includes" or "codebehind" information at the beginning of
the page so I'm guessing the code for the page is in a default
location. I looked in the web.config file but could not find anything
relevant.

While I'm asking about configuration settings, something else really
confuses me. A lot of the website files start with the following:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="somefile.vb" Inherits="EmissionsWeb.FirstLogin"%>

The structure in the inetpub folder is as follows:
/inetpub
|
|-Website folder
|-Website folder _old

The files for our live website are in the "Website folder". However
there are no .vb files in that folder. But there are some .vb files in
the "Website folder _old". So I'm guessing that the asp files in
"Website folder" use the .vb files in "Website folder _old". I'd like
to stop guessing and see for sure so that I can tidy things up. Any
ideas where that kind of information could be stored ?


Thanks heaps,

Maellic
 
The form is being posted to login.asp

so you logic for login should be found in login.asp

Regards,

HD
 
Maellic said:
While I'm asking about configuration settings, something else really
confuses me. A lot of the website files start with the following:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="somefile.vb" Inherits="EmissionsWeb.FirstLogin"%>
The structure in the inetpub folder is as follows:
/inetpub
The files for our live website are in the "Website folder". However
there are no .vb files in that folder. But there are some .vb files in
the "Website folder _old". So I'm guessing that the asp files in
"Website folder" use the .vb files in "Website folder _old". I'd like
to stop guessing and see for sure so that I can tidy things up. Any
ideas where that kind of information could be stored ?

Maellic,
The code-behind files (e.g. somefile.vb) get compiled into a project DLL,
which you will find in the BIN directory. Hence when you publish
your web site, you just need to copy the aspx files and the BIN DLL
file. That is the reason you don't see any code-behind vb files.
For more information, see Visual Studio .NET's copy project feature
http://msdn.microsoft.com/library/en-us/vsintro7/html/vxurfcopyprojectdialog.asp


What is a bit scary is that the prior developer copied the VB files to the old
web site. Are you sure that is where the source files are located? Are you
guys using Visual SourceSafe (so some version control tool)?

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
Maellic,
The code-behind files (e.g. somefile.vb) get compiled into a project DLL,
which you will find in the BIN directory. Hence when you publish
your web site, you just need to copy the aspx files and the BIN DLL
file. That is the reason you don't see any code-behind vb files.
For more information, see Visual Studio .NET's copy project feature
http://msdn.microsoft.com/library/en-us/vsintro7/html/vxurfcopyprojectdialog.asp

OK, everything makes more sense now. And I have found the dll files in
the bin directory. So now I guess I just have to find some safer place
to store all the projects files than an _OLD folder.
What is a bit scary is that the prior developer copied the VB files to the old
web site. Are you sure that is where the source files are located? Are you
guys using Visual SourceSafe (so some version control tool)?

Scary yes, but not surprising. There is a lot of grief between that
particular developer and the company. And as to version control,
nothing has been implemented yet. The company I work for is not a
software company at all, they just happen to sometimes (and more and
more often) sell software solutions to clients. Before I arrived on
the scene, the company hired developers just for individual jobs that
came in. These developers weren't particularly experienced and as they
had no supervision whatsoever, things got very messy. Version control
is on my list of things to implement among proper documentation etc...
It's a slow process but I'll get there eventually.


Thanks heaps

Maellic
 
Back
Top