These aren’t necessarily appharbor specific, but i figured them out while trying to get my blog up and running on appharbor:
1. The default BlogEngine.Net source isn’t set up as a web application project, you’ll need to download the web application version of the project to get it to build in appharbor
2. Because the default BlogEngine project is not a web app, most themes aren’t set up for the web application solution, so you’ll need to change the “codefile” reference in the site.master file to “codebehind” for site.master.cs or else you get an error like “site.master.cs does not exist”
3. I also had to move the content files from outside of the content folder to the top level folder of the theme. It looks like that’s the expected location for BlogEngine.Net, but most themes I downloaded have the needed files in a content folder.
And if you’re just getting started, this blog post was helpful: http://ypblog.apphb.com/post/Hosting-BlogEngine-blog-on-AppHarbor.aspx
you can just substitute bitbucket for git and it should work just as well, if like me you prefer bitbucket for your source.
If you’re using some of the Url Helpers in asp.net mvc, like Url.Action in one of your controllers, you may run into an issue where the generated url will contain a non public port number. In that case, you can just add a setting to your config value as noted here:
to true should remedy the issue.
It should look something like this:
<add key=”aspnet:UseHostHeaderForRequestUrl” value=”true”/>
The default mvc web app project in visual studio 2012 uses a default connection string named “DefaultConnection”. If like me, you follow the automatic migrations tutorial from appharbor and change the connection string name in the web.config AND you plan on using forms authentication, make sure to also update it in the InitializeSimpleMembershipAttribute class:
WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
and AccountModels.cs in the models folder: