Can't Log In

Topics: Installing Orchard, Troubleshooting
Apr 2, 2013 at 5:39 PM
I'm a newbie trying to get up and running with a new install of Orchard. I had some problems which seemed to be due to permissions issues, so I shut down the site and changed its application pool identity to NetworkService so I'd know what user to add permissions to. Then I gave the NETWORK SERVICE user read/list/write/modify permissions in Orchard's App_Data, Media, Modules, and Themes directories.

When I restarted the app pool and the site and browsed to it, the Orchard Setup screen appeared again and I re-entered my same data. (I connect to SQL Server for the site's storage.) When the home page and welcome page appeared, I was very excited, but soon found I couldn't sign in. I'm not given any error message, just taken back to the home page.

Before, when I was having permission problems, the site failed with LifetimeScope errors during the cooking process. So now I thought maybe something bad was left over in App_Data to cause problems, so I shut everything down, deleted the files in App_Data, and restarted the site.

This time after the Default recipe cooked and I still couldn't sign in, I noticed that the navigation menu contained multiple entries for Home. I looked in my database and found that the Orchard_Users_UserPartRecord table had two entries for "admin". Apparently the recipe doesn't check whether things already exist before creating them.

So I shut everything down again, deleted the content of App_Data AND deleted my entire Orchard database, then recreated it, all fresh and empty, restarted everything, and went through the cooking process again.

At this point, my database looks very good, containing only one Home page entry and only one admin user, but still I can't sign in. I click the sign-in link, enter "admin" and the correct password and click the Sign In button, then I'm taken right back to the Home screen without being signed in.

What should I try next?
Coordinator
Apr 5, 2013 at 8:38 AM
Add a machine key to your web.config.
Apr 5, 2013 at 8:05 PM
Bertrand,

Thanks for the response!

I did as you suggested, following these directions: http://docs.orchardproject.net/Documentation/Setting-up-a-machine-key

I have opened the Orchard application's web.config file and verified that I do indeed now have a machineKey setting with a decryptionKey and validationKey.

I still can't sign in. Could that be because I need to delete the database and App_Data again?

It seems Orchard opens a log file each time it's run, but there's never anything in it. Is that normal?

--

Charles

On Friday, April 5, 2013 at 3:39 AM, BertrandLeRoy wrote:

From: BertrandLeRoy

Add a machine key to your web.config.

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Coordinator
Apr 6, 2013 at 1:35 AM
Well then you are probably not using the right password. You can recover it: http://weblogs.asp.net/bleroy/archive/2011/04/28/recovering-the-admin-password-in-orchard.aspx
Apr 8, 2013 at 5:02 PM
Okay, the site prefix I originally entered was TE, so I went into my database and found the TE_Orchard_Users_UserPartRecord table.

It contained one record, for the user named 'admin'. I changed the password column to 'reset-pass' and the PasswordFormat to 'Clear'.

When I try to log in with the username 'admin' and the password 'reset-pass', I am taken right back to the home screen without being signed in. As before, there is NO error message, and the site's log file remains absolutely empty.

What can I try next? Is there anything in the Orchard console that could help me diagnose whatever is silently failing?

--

Charles

On Friday, April 5, 2013 at 8:35 PM, BertrandLeRoy wrote:

From: BertrandLeRoy

Well then you are probably not using the right password. You can recover it: http://weblogs.asp.net/bleroy/archive/2011/04/28/recovering-the-admin-password-in-orchard.aspx

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Developer
Apr 10, 2013 at 10:48 AM
You could attach a debugger and set a breakpoint in the login action, and see what exactly happens and why it fails to login.
Coordinator
Apr 11, 2013 at 5:22 AM
Debugging it is certainly going to help, yes. You can also check what you have in the site setting table as the super user.
Apr 17, 2013 at 4:03 PM
I checked, and the superuser is admin.

I do have new information to add. The admin record's id is 2. I wondered if maybe the system didn't work right unless the id was 1, so I temporarily changed it. After that, I got a sign-in error due to the fact that one part of the user record was disconnected from another part due to mismatching id. An actual sign-in error message!

When I put the id back and signed in, the old behavior of not being signed in after a successful sign-in returned. Apparently sign-in succeeds, but the system forgets I'm signed in as soon as it goes back to the home page. Could there be any cookie settings I should look for?

sfmskywalker: Thanks for replying! Is it possible to debug Orchard remotely? I don't have a development environment on the server.

--

Charles

On Thursday, April 11, 2013 at 12:22 AM, BertrandLeRoy wrote:

From: BertrandLeRoy

Debugging it is certainly going to help, yes. You can also check what you have in the site setting table as the super user.
Coordinator
Apr 22, 2013 at 6:51 AM
Could be a cookie issue, yes. You can check by trying again in an incognito window.