This project is read-only.

Remote Login Problems

Oct 11, 2010 at 11:31 AM

Hi I recently switched to BlogEngine.Net 1.6.1 installed via the installer and at first I was very happy, but now I discover I can only log in to the site if I remote desktop into my dedicated server.  If I access the blog from a browser running anywhere other than the hosting server I simply get the home page reloading, no error message and not logged in.

The site is installed at the root of new Web Site hosted in IIS 7.

I have triple checked the permissions on the App_Data folder and files and I am sure they are correct otherwise I would't be able to log in on the server itself.

I have tried different browsers (IE 8, FireFox and Safari) and the result is the same.

If I enter an invalid password I get an error message on the login page as expected, but with the correct credentials it is as if I did not login.

I have checked the cookies in IE Developer Tool and FireBug and they are the same on both the server and my remote browser.

I don't know what else to check, and I am on the verge of switching back to my previous blog engine.  Any suggestions please?

Oct 12, 2010 at 9:55 AM

Normally there's 2 cookies -- .BLOGENGINEROLES and .AUXBLOGENGINE.  You have both those cookies from the remote machine?  In the default.aspx file in the root of your blog, you could try adding these debugging statements in, after the <asp:Content> opening tag:

<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" Runat="Server">

	<!-- New debugging statements -->
	<h2>Logged in: <%= User.Identity.IsAuthenticated %></h2>
	<h2>Logged in Name: <%= User.Identity.Name %></h2>
	<h2>URL: <%= Request.Url.ToString() %></h2>
	<h2>.BLOGENGINEROLES cookie exists: <%= Request.Cookies[".BLOGENGINEROLES"] != null %></h2>
	<h2>.AUXBLOGENGINE cookie exists: <%= Request.Cookies[".AUXBLOGENGINE"] != null %></h2>
	<!-- Existing content below -->

 When I'm logged in, the results I get are:

Logged in: True
Logged in Name: admin
URL: http://localhost/blog/default.aspx
.BLOGENGINEROLES cookie exists: True
.AUXBLOGENGINE cookie exists: True

Although this is probably not an issue, I would make sure the URL in the debugging output is what you expect.  If you had some type of URL rewriting or firewall NAT going on, the URL could change and theoretically not match the URL (the host name) or Path tied to the cookie that the browser is sending in.

Oct 12, 2010 at 2:21 PM

Ben thanks for the reply.

I had checked for the cookies previously with the IE Developer Toolbar and FireBug and found that I got one but never the .BLOGENGINEROLES cookie.  To be certain I added the statements you suggested and got the following:

When connected to my server via Remote Desktop and logging in to my blog locally this is what I get:

Logged in: True

Logged in Name: MikeHanson


.BLOGENGINEROLES cookie exists: False

.AUXBLOGENGINE cookie exists: True

and when running on my desktop at home connecting via a browser and logging in this is what I get on return to the home page:

Logged in: False

Logged in Name:


.BLOGENGINEROLES cookie exists: False

.AUXBLOGENGINE cookie exists: False

Interestingly even on the server and successfully logged in I do not have the .BLOGENGINEROLES cookie


Oct 12, 2010 at 6:01 PM

Solved the problem by deleting all cookies for the domain in both IE and FireFox and now I am logging in fine from my home PC

Thanks for the help though