Fix the errors occurred on ASP.NET Sample Web Pages

  1. Follow the following instruction to fix errors when you run samples on ch01 and ch02:
        Use the following article to create new account ASPUSER for running ASP.NET Worker process, if you use a domain server:
        Microsoft Knowledge Base Article - 315158
            BUG: ASP.NET Does Not Work with the Default ASPNET Account on a Domain Controller
  2. Follow the following instructions to fix the problem of inserting data on insert.aspx and insert-da.aspx in ch07, and default.aspx in ch11, ch12, and ch13:
        Enable the impersonated user (ASPNET or ASPUSER) the sufficient permission to connect to or write to the Access database.
        Microsoft Knowledge Base Article - 316675
            PRB: Cannot Connect to Access Database from ASP.NET
  3. Follow the following instruction to fix the problem of missing of images on bannertest.aspx  and cattest.aspx in ch09, and ads.aspx in ch10:
        Copy the 4 gif files from \WEBDBPGM\images folder to \Inetpub\wwwroot\images.
  4. Refer to the textbook and follow the following instructions to fix errors when you run samples on ch11, ch12, ch13 and ch14b:
    1. Start -> Programs -> Administrator Tools -> Internet Service Manager
    2. Right click WEBDBPGM -> Properties -> Virtual Directory
    3. Click ‘Create’ to the right of Application Name -> OK
    4. Do the same thing for ch11, ch12, ch13 and 14b, respectively
  5. Change relative Url to classified.mdb from "db/classified.mdb" to "../ch12/db/classified.mdb" in global.aspx of ch11, [strDbUrl &= "../ch12/db/classified.mdb"]. So, you can register in ch12 and login in ch11.
  6. Change the input type from "text" to "password" as <input type="password" id="txtPassword" size="15" runat="server" /> in login.aspx and register.aspx of ch11, ch12 and ch13, so the password will not be displayed when a user enters password.
  7. Grant "write/modify" permission to the impersonated user (ASPNET or ASPUSER) on PIX folder under ch13, so pictures can be uploaded..
  8. Follow the following instructions to fix the compiler errors on coinflip3.aspx (Web Service version) and adclient.aspx on ch14c and ch14svc:
    1. Use IIS to mark ch14c as an application as step 2.
    2. Be sure the folder that contains the wsdl.exe program is in the path environment variable. By default, the folder is C:\Program Files\Microsoft.NET\FrameworkSDK\bin\
    3. Be sure the folder contains the vb.exe program is in the path environment variable. This will be something like: C:\WINNT\Microsoft.NET\Framework\v1/0/3705\
    4. Grant "List Folder/Read Data" permissions to the impersonated user (ASPNET or ASPUSER) on every folder in the path to the mscorlib.dll assembly (which is \WINNT\Microsoft.NET\Framework\v1.0.3705). This is generally the root of the volume where the account does not have permissions (for example, C:\).
         
      NOTE: Do not use this method if you use the /nostdlib option and if you are not using Web services.
      Microsoft Knowledge Base Article - 318274
          PRB: "Compiler Error Message: CS1595" Error Message When You Use the C# Compiler to Compile an ASP.NET Resource
  9. Default.htm is missing in ch14c. Create a default.htm page http://wireless.uhcl.edu/webdbpgm/ch14c/default.htm and save it in \webdbpgm\ch14c\ folder on the Server to fix the "Home" link problem on adclient.aspx in ch14c.
  10. Install SMTP, so e-mail confirmation can be sent to the user:
    1. Start -> Settings -> Control Panel -> Add/Remove Programs -> Add/Remove Windows Component -> Internet Information Services -> Details
    2. Check SMTP -> OK
    3. Next

    or

    If the SMTP is neither install nor running, (i.e. your computer is not a mail server), then you can modify the code around line 91 of register.aspx as follows to use the mail server of your internet provider:
    SmtpMail.SmtpServer = "mail.yourprovider.com"
    SmtpMail.Send(msgIntro)
    See page 429, item 8 for the explanation of the textbook written by Jim Buyens.