asp

Document Sample
asp Powered By Docstoc
					Copy the demo site files to X:\inetpub\wwwroot\IllustratedASPNET20


Set permissions for users
        By default, Windows seems to turn off the full permissions dialog (but it is turned on in the lab)
                  In Windows Explorer, go to Folder Options, then the View tab
                  Deselect the "Use simple file sharing" option

                  Now you will be able to set folder permissions on a per user basis

         Enable folder permissions inheritance
                  Right click on inetpub\wwwroot\IllustratedASPNET20, select Properties
                  Go to Security tab, press Advanced
                  Select the option "Inherit from parents...."

                  Now all subfolders of IllustratedASPNET20 will have the permissions that you assign to
                  it.

         In folder permissions, check to see if there is a ASP.net user for the folder IllustratedASPNET20
                   If not, click "Add"
                   Enter the name ASPNET
                   Click "Check Names"
                   Click Ok

         Give ASP.net user read and write permissions
                I think you only need read/write for the ASP.net user, but I gave all users "full control"
                permissions, which probably isn't smart from a security standpoint...



Create a IllustratedASPNET20 virtual directory
         Go to Control Panel, Admin Tools, Internet Information Services
                   Click Web Sites, right click on Default Web Site
                           Select New, then Virtual Directory, and follow the instructions



Make certain folders a "Application" in IIS
        The webpage readme says that four of the directories need to be configured as Applications in IIS

         To do this, go to IIS control panel, find the ASP webpage, and right click on
         IllustratedASPNET20\ch02\AdventureWorks, select Properties

         Press the Create button (in the Directory tab)
         Change execute permissions to "Scripts Only"

         Press "Configuration", go to Options tab, make sure that "Enable session state" is checked.

         Repeat for the other three directories listed in the readme
Turn on SQL Browser service
        (this service may be turned off by default)

         Go to Control Panel, Admin Tools, Services
         Find the "SQL Service Browser" service.
         Right click, select properties.
         Change startup type to Automatic
         Press the start button



Enable TCP/IP and Named Pipes in SQL Server and set port to 1433
        Open SQL Server Config Manager. (in the Start menu)
                Click "SQL Server 2005 Network Config", then "Protocols for SQLEXPRESS"

                   Right click Named Pipes, select Properties
                            Change Enabled to Yes

                   Right click TCP/IP, select Properties
                            Change Enabled to Yes
                            Go to IP Addresses tab, add 1433 to every TCP Port field that you see


         Open SQL Server 2005 Surface Area Configuration (in the Start menu)
                Click "Surface Area Config for Services and Connections"
                        Click "Remote Connections"
                        Make sure that "Using both TCP/IP and Named Pipes" is selected



Enable CLR Integration
        Open SQL Server 2005 Surface Area Configuration (in the Start menu)
                Click "Surface Area Config for Features"
                        Click "CLR Integration"
                        Click "Enable CLR Integration"



Install "SQL Server Management Studio Express"
          Download from: http://msdn.microsoft.com/vstudio/express/sql/download/
          This might be on Whitson's drive, he said in class that it is, but I didn't check

         This is a .msi file, so once downloaded, right click and select "Install" to install it.



Attach webpage's databases to SQL Server
        Open SQL Server Management Studio
        Click Databases
        Right click in the Databases list field and select "Attach"
        Click "Add", then select a database from the App_Data folder
        Repeat for the other two databases

         (note, I couldn't do this with ASPNET.mdf, but that didn't keep my page from working)
Notes:

I'm not sure how much of the above instructions are necesary. I did do all of the above, and my webpage
runs. (Yay!) A SQL Server admin would probably look at these instructions and scream, as i'm sure they
open up all kinds of security holes. Which is why i'm not a server admin...

There may also be a few things that I forgot. Sorry. If you have any problems, ask me, and maybe i'll
remember what the solution was, assuming that it was a problem that I encountered



I would redownload the webpage files from the daveandal.com webpage. I used the files from Whitson's
drive, but I noticed that the daveandal website is slightly different in Chapter 5, and the part that is different
doesn't work on my computer because the necessary files aren't included in the files posted on Whitson's
drive.



One possible issue is that SQL Server Express installs by default with "Windows Integrated Security",
instead of "Mixed Mode". Don't ask what they are. As far as I can tell, with SQL Express, this can only be
changed on install. :-(

Anyway, at one point I became convinced that this was the cause of some of my troubles, so I reinstalled
SQL Server, this time using the "Mixed Mode" setting. There is a check box early on in the setup process
that says something like "Hide advanced settings", and is selected by default. Deselect that box, and you'll
be able to select "Mixed Mode" later on.

Having said that, reinstalling with Mixed Mode didn't seem to change anything at that time, so i'd consider
a reinstall a last resort...



I think the webpage is hardcoded to use IllustratedASPNET20 as its virtual directory. So I would use that
as both the name of the directory in Inetpub/wwwroot AND the name of the virtual directory in IIS.



The only things that I remember changing with the webpage files themselves is there are a few places in the
web.config that are hardcoded for SQL Server 2005. Basically, anyplace you see something that refers to a
data source of that name, replace it with SQLEXPRESS.

Visual Studio found a few errors when I tried to run it from there. I may have changed a few things to fix
the bugs that VS found, but I don't remember what they were.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:16
posted:12/5/2011
language:English
pages:3