Thanks for pointing this out. The example in the page you referenced is an standalone sitelet, so to run it in the Sitelet Website Visual Studio template, which contains extra code for templating and others, you need to strip the project down a bit:

  • Replace the contents of Main.fs with the code from the documentation page (keeping the namespace your created project had)
  • Remove global.asax from the project
  • Remove Client.fs from the project
  • Remove Main.html from the project

Now, what's left is a singleton sitelet that responds at /index, instead of /, as you pointed out. So when you start the project, you will get a HTTP Error 403.14 - Forbidden error on trying to browse the root of the web application (this is normal, unless you explicitly enable directory browsing in web.config separately). So just simply navigate to /index, or make the change you described.

Note, however, that there is no need to rename main.html, as the project by this point uses no templating, in fact you can remove that file entirely.

By on 9/5/2014 5:11 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper