views:

375

answers:

6

I have a blogengine.net install that requires privatization.

I'm doing research work at the moment, but I have to keep my blog/journal private until certain conditions are met.

How can I privatize my blogEngine.net install so that readers must log in to read my posts?

A: 

I would think it's possible to do this in the web config file by doing something like the following:

<system.web>
    <authorization>
      <allow roles="Admin" />
      <deny users="*" />
    </authorization>
</system.web>
lomaxx
thanks for the answer, but this didn't work :(see http://www.codeplex.com/blogengine/Thread/View.aspx?ThreadId=33705
CVertex
+1  A: 

lomaxx's answer didn't work, so I decided to avoid making blogengine.net perform auth for readers.

on iis, i disabled anonymous access and added a guest users to the win2k3 user list.

CVertex
+1  A: 

We created a simple tool that gives certain users access to certain posts according to their ASP.NET Membership Roles to acheive a somewhat similar result.

http://blog.lavablast.com/post/2008/08/BlogEnginenet-Post-Security.aspx

Jason Kealey
+1  A: 

I use this extension. Just save the file as RequireLogin.cs in your App_Code\Extensions folder and make sure the extension is activated.

using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.HtmlControls;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using BlogEngine.Core;

using BlogEngine.Core.Web.Controls;

using System.Collections.Generic;



/// <summary>

/// Summary description for PostSecurity

/// </summary>

[Extension("Checks to see if a user can see this blog post.",

            "1.0", "<a href=\"http://www.lavablast.com\"&gt;LavaBlast.com&lt;/a&gt;")]

public class RequireLogin
{

    static protected ExtensionSettings settings = null;



    public RequireLogin()
    {

        Post.Serving += new EventHandler<ServingEventArgs>(Post_Serving);



        ExtensionSettings s = new ExtensionSettings("RequireLogin");

        // describe specific rules for entering parameters

        s.Help = "Checks to see if the user has any of those roles before displaying the post. ";

        s.Help += "You can associate a role with a specific category. ";

        s.Help += "All posts having this category will require that the user have the role. ";

        s.Help += "A parameter with only a role without a category will enable to filter all posts to this role. ";

        ExtensionManager.ImportSettings(s);

        settings = ExtensionManager.GetSettings("PostSecurity");

    }



    protected void Post_Serving(object sender, ServingEventArgs e)
    {
        MembershipUser user = Membership.GetUser();
        if(HttpContext.Current.Request.RawUrl.Contains("syndication.axd"))
        {
            return;
        }

        if (user == null)
        {
            HttpContext.Current.Response.Redirect("~/Login.aspx");
        }
    }
}
Rafe
A: 

Can I just say what a relief to find someone who actually knows what theyre talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I cant believe youre not more popular because you definitely have the gift.

credit repair letters
A: 

The key to repairing bad credit is to write a properly formatted letter of dispute to one or all of the credit bureaus and send them out via registered mail.

http://www.ezcreditrepairsolutions.com

genniechan