I’ve decided to implement BlogEngine.Net on the Harris County Master Gardener website. This is a website I developed as a way for the Master Gardeners to update their profiles and keep track of their volunteer hours.
I use subversion to track changes to the website. It’s free and it works great! You can read all about it here: http://subversion.tigris.org/ There are basically 3 things you need to install to get it going for your development environment:
- Download and install Visual SVNon your server or workstation where you’ll want to store your repositories. Install only the free server portion. That’s all you should need to get you started.
- Download and install TortoiseSVNeverywhere you will be using SVN. This is the client software, and works great with file explorer.
- If you use Visual Studio, download and install AnkhSVNon your development workstation. This will integrate all the SVN features right into VS.
- For documentation, here’s a great reference guide: http://svnbook.red-bean.com/
On to the installation. Here’s my installation steps:
- Do an SVN update of …Website solution to get current version of solution. Use SVN clean. Keep it clean!
- Download latest source version of the blog software from BlogEngine.Netto my desktop. Right click zip file, select properties, and click ‘Unblock’. Otherwise VS might not trust my new project location.
- Right click the zip file, and choose ‘Extract files…’. Extract to my project folder ‘C:\…\Visual Studio 2008\Projects\…Blog’
- In Visual Studio 2008 Solution Explorer, click on the ‘BlogEngine.Net’ project, then click ‘Build’ / ‘Add Web Deployment Project…’. Rename the deployment project, ‘…Blog_deploy’. This will add a new project to the solution. It will make deploying a simpler process later.
- Open SSMS (Sql Server Mgmt Studio). Connect to Development instance. Add new ‘…Blog’ database.
- Create new user login for ‘…Blog’ database. See Installed BlogEngine.Net post.
- Run ‘MSSQLSetup188.8.131.52.sql’ setup script inside BlogEngine.Net/setup/SQLServer directory. Altered script at beginning as ‘use …Blog’.
- Renamed ‘Web.Config’ in BlogEngine.Net folder to ‘Web.Config.Orig’. Copied ‘SQLServerWeb.Config’ from setup folder as new ‘Web.Config’.
- Copied ‘web.config.dev…’, ‘web.config.prod…’ from ‘…Website’ project folder to ‘BlogEngine.Net’ project folder. Alter to change connection strings to work with dev, prod db’s. Also add the files to project with VS file add existing items.
- Changed ‘Web.config’ to use a file for specific connectionStrings. This allows me to point to different environments. I’ve learned a lot since I used this method, next time, I’ll try something different.
- In Visual Studio, open up the ‘default.aspx’ file and attempt to view in browser. It works! Yea!
- Now complete the initial configurations, i.e. set up users, etc. Remember, only working with dev database for now.
- Remote log into the Web Server, open Visual SVN. Add a new repository. I need to do this because when I originally created the SVN repository for the website, I didn’t fully understand a proper directory structure. Will be better next time. Also, if I change now, then I have to change it everywhere it is currently cached. So create a new repository called ‘…Blog’. Select Action / Copy URL location.
- Using File Explorer go to ‘C:\…\Visual Studio 2008\Projects\…Blog’ directory. Then right click on ‘…Blog’ folder and select TortioseSVN / import. This adds all the project files into SVN.
- Paste the URL into the import statement for SVN to import the newly created ‘…Blog’ project. Click Ok. Accept the poor certificate warning message. Enter user credentials, check Save authentication, and click Ok. The files are copied to the repository. Long wait!
- Rename the project folder ‘…Blog’ to ‘…Blog.Orig. Then right click on the Projects folder and select ‘SVN Checkout’. Paste in the URL location. Click Ok. Again, wait until all files are added.
- Open the ‘…Blog’ in Visual Studio. Choose ‘Release’ ‘Any CPU’. Then right click ‘…Blog_deploy’ project and select Build.
- Open File Explorer and navigate to the ‘…Blog_deploy’ folder. Right click and choose ‘SVN Commit…’. Click ‘Select / deselect all’ at the bottom. Press Ok. Now we have a ‘Release’ deployment folder available to us with SVN on the Web Server.
- Remote log into the Web Server. Open File Explorer. Navigate to the ‘C:\…\dev\’ folder. The folder where the development Web Application is located.
- Open VisualSVN Server. Navigate to the ‘…Blog_deploy\Release’ project folder. Select Action, ‘Copy URL to Clipboard’.
- Using file explorer, right click on the ‘dev’ folder, and select ‘SVN Checkout’. Paste the URL into the URL of repository field. Rename the output folder to ‘…Blog’. Click Ok. The new project folder is created for dev.
- Open IIS7 Manager. Navigate to the ‘…Dev’ site. Right click and choose ‘Add Application’. Alias name it ‘Blog’. Browse to the physical path. Choose ‘MSSharePointAppPool’. Click Ok. Restart the ‘…Dev’ Site.
At this point, I ran into some trouble. When attempting to bring up the blog sub-application, I kept getting a yellow screen error: Configuration Error. Upon some time consuming googling, I ran across this post by Colin Cochraneand it quickly solved my problems.
To resolve this issue, in the web.config file of the parent application, I surrounded the system.web section with:
and it fixed it nicely!
What’s next? Need to customize the css to make it fit in with the Master Gardener’s website. Then move it all to prod.