Archives

Archives / 2011 / May
  • ScrewTurn Wiki and Load User Profile

    Recently ran into an issue setting up a ScrewTurn Wiki site in a production environment.  The production environment uses a local account as the identity for the application pool.  After deploying the site I then went to visit it for the first time and the ScrewTurn wiki site gave me this exception:

    [SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]

    After some checks to make sure the local account had the proper permissions to all of the necessary files, I finally tracked it down to a configuration setting on the Application Pool.  By default all of the application pools on this server were configured with the App Pool not to load the user profile.  Changing this to true resolved the issue.

    image

    Thanks to this blog post from Dave Burke and this ScrewTurn Wiki forum post for getting me to the solution.

  • How to create a page in Orchard that allows comments

    I am setting up a new Orchard site.  I want to use it for a simple list of articles and allow users to post comments on the articles. Out of the box this seems like it is enabled since the Orchard documentation for Adding Pages to Your Site indicates that you can enable user comments by just clicking the “Allow new comments” check box:

    User Comments

    To enable users to post comments on the page, select the Allow new comments check box. A form will be added to the bottom of the page for user comments. The following image shows the form that is added to the published page.

    But an out of the box installation of Orchard (1.1) does not have this checkbox when you create a new page.  So where is it and how do I enable comments on a Page in Orchard?

    To fix this problem you need to modify the Page content type to include the Comments content part.  Here are the instructions on how to do this:

    How to modify the page content type in Orchard to allow comments.

    Log in as an administrator and then head over to the Admin Dashboard.  On the left hand navigation, select the Content item.

    image

    Then click on the Content Types tab at the top.

    image

    Find the Page Content Type and click the edit link.

    image

    Click the Add Parts button.

    image

    And then check the Comments part check box.

    image

    Click Save on this page and then Save again on the Page content type.

    Now when you create a new Page in your Orchard site you will see the Allow new comments check box so that your users can leave comments on the page/article that you create.

    image

  • Unable to close Visual Studio 2008

    I ran into an issue with not being able to close Visual Studio 2008 today.  My Visual Studio 2008 solution opened and work fine but then when I tried to close it, Visual Studio would just freeze up.  Something was going on since the processor was saying about 25% usage or so and the mouse was blinking back and forth between the wait cursor and the default arrow but no matter how long I waited, Visual Studio 2008 would not close (it definitely looked like it was stuck in a loop doing something while trying to close down). 

    I was able to open and close another Visual Studio 2008 solution without any problems so this confirmed it was something specific to the this solution. 

    After trying a couple random things (such as closing all files, removing a reference, etc.) I tried deleting the Visual Studio Solution User Options .suo file.

    image

    Deleting the file solved the problem!

    So if you are ever in the same situation consider a corrupt .suo file to be the problem.