- Download the kit
- Check out the InstallVST utility from Mono SVN (it's in mcs/tools/installvst) and compile it:
gmcs installvst.cs
- Unpack the PWS zip file to some directory
- Run the following command:
mono PATH_TO/installvst.exe PATH_TO_PWS_DIRECTORY/ PersonalWebSite.vstemplate PATH_TO_TARGET_DIRECTORY
- Go to the PATH_TO_TARGET_DIRECTORY/PersonalWebSite/ directory, edit the web.config file you find there find the Personal and LocalSqlServer connection strings and replace their connectionString attributes with, respectively, the following values:
Substitute the XXX.YYY.VVV.ZZZ strings with the IP number of your SQL serverData Source=XXX.YYY.VVV.ZZZ;Integrated Security=False;Database=startkit_personal;User ID=sktest;Password=sktest
Data Source=XXX.YYY.VVV.ZZZ;Integrated Security=False;Database=aspnetdb;User ID=sktest;Password=sktest
Having completed the above steps, you need to prepare your Microsoft SQL server (either the full version or SQLExpress) for use with the starter kit. Follow the instructions below:
- Make sure your SQL server uses mixed SQL + Windows authentication, allow connections over TCP/IP (server port 1433)
- Create an SQL user named 'sktest' with the password 'sktest'
- Create an empty database named aspnetdb, then fill it with required schema using the aspnet_regsql utility that comes with Microsoft .Net 2.0 SDK. This database can be shared among all the starter kits ported to Mono. Add the 'sktest' user to this database users and make it the database owner.
- Create an empty database named startkit_personal, then use personal-add.sql script found in the PWS zip archive to populate it with the necessary schema and data. Add the 'sktest' user to this database users and make it the database owner.
MONO_IOMAP=all xsp2 --root PATH_TO_TARGET_DIRECTORY/PersonalWebSite/
and then point your browser to http://localhost:8080/ (replace 8080 with the port number your xsp is configured for).If everything went well, here's what you should see in your browser:
The welcome screen
The welcome screen after logging in
One thing should be noted about the user registration with this starter kit. The application is configured so that every new user is created in the disabled state - that is, you will not be able to log in even though the user has been created successfully. To remedy that, you have two options:
- Edit the Register.aspx file and remove (or set to false) the DisableCreatedUser attribute to the <asp:CreateUserWizard> tag in that file
- On your Windows machine launch the SQL Server Management application, connect to the aspnetdb database and issue the following query:
UPDATE dbo.aspnet_Membership SET IsApproved=1
This query will approve all the users you have registered (if you want to do it for individual users, you need to consult the dbo.aspnet_Users table, look up your user, note its ID and append WHERE UserId=YOUR_USER_ID clause to the above query)
No comments:
Post a Comment