Everything redirects to login page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
I have just installed nopCommerce 3.20 on Godaddy and initialy could only get errorpage.htm. Thanks to Andrei instructing me to set Change customErrors defaultRedirect="errorpage.htm" mode="RemoteOnly"> to  customErrors defaultRedirect="errorpage.htm" mode="Off", in order to see the error details, I was able to determine this was due to Code Access Security defaulting to Medium on GoDaddy and changing this to Full solved this problem and I have been able to connect to my site and the site connects to the database uploaded from my local machine.

However nearly everything takes me to the login page. I noticed that at the top I only got the options "Register" and "Login" whereas I usually also see "Wishlist" and "Shopping cart". I tried to login using the admin user and the top changed to the admin user name and "Log out", which would suggest I have managed to login, but I am redirected back to the login page. If I click on anything, Home, search, Account, just about everything I am redirected to the login page. The only thing that seems to work is if before logging in I click register I get the register new user page and can successfully create a user, I get an email with the link to activate the new user which on following informs me the user is activated, but I cannot login to it I just get redirected to the login page. I cannot see anything in the GoDaddy logs that seems relevant. I am guessing it is permissions but I have checked the usual things, directories App_Data, Content, Plugins, Themes and file Global.asax and the permissions seem ok (full permissions to Administrators, System, Plesk Domain user, and Application pool group, although  Plesk IIS Worker Process Identity Account seems to have disappeared?). I have seen this on nopCommerce Forums https://www.nopcommerce.com/boards/t/13927/homepage-redirect-me-to-loginreturnurl2f-error.aspx but I cannot figure out how to check/do this on GoDaddy. I have also seen mention to Access Control Lists again I cannot figure out how to check/do that on GoDaddy. I feel I am so close, yet so far. Any help/pointers will once again be greatly appreciated.
9 years ago
You probably need a Machine Key
9 years ago
Did you have this message "A custom machine key is not specified (web.config file)" when go to Admin > System > Warnings
9 years ago
Thanks for your response. I am however aware of the problem of being logged out when in administration mode and have generated and inserted the following in the system.web section of web.config:

<machineKey validationKey="36400F9AF77DFB6EE97D12B86E788F94E62753C298EBC1F0A911C145B99E72BACA63B58546FCB06CCB599448DA92A274B6E2D3B58E8D5C275459E1E9A2991DBD" decryptionKey="E3B0BCC5DD46536D8630E4294BEA0BEABBC9E0218B4D7E659CCE72BCF79D62D2" validation="SHA1" decryption="AES" />

Mine is a different problem. I seem to be able to login, as mentioned in my original post on this, but get constantly redirected to the login page as opposed to being logged out.
9 years ago
Tuan, Thanks for your response, unfortunately the Administration link never appears so I can not go to Admin>System> warnings. Immediately on logging in or anything else, I can not get away from the login page, although on supplying admin user and password the "login" link changes to "Log out" suggesting I am logged in but am being redirected back to the login page which is what happens if I click on "Home" or anything else. If I just type the home page address of my site into the browser I also get taken straight to the login page.
9 years ago
Tuan, further to this, in my dev site on my local machine, which is where my GoDaddy site and database are loaded from Administration>System>Warnings shows a green tick and states "A custom machine key is specified (web.config file)" and as in my previous post it is there in my GoDaddy web.config.
9 years ago
I have made progress with this. I removed the two files "InstalledPlugins.txt" and "Settings.txt" and did a fresh install against a new virgin database. I initially got an error which turned out to be one should not select precompile when deploying from Visual Studio which is the default with VS 2013, on redeploying without precompile the install went OK and I no longer get constantly redirected to the login page. Things look OK (a few problems with my custom theme, which works fine on my development site). So it would seem my problem is with the database I loaded from my development environment to GoDaddy. So can anybody tell me what the correct way to transfer the database from development environment to GoDaddy host? I originally did this as per posts I found on nopCommerce Forums but seems something is wrong and I really do not want to have to set up my store from scratch, so any help/pointers would be greatly appreciated.
9 years ago
cooldrl wrote:
I have made progress with this. I removed the two files "InstalledPlugins.txt" and "Settings.txt" and did a fresh install against a new virgin database. I initially got an error which turned out to be one should not select precompile when deploying from Visual Studio which is the default with VS 2013, on redeploying without precompile the install went OK and I no longer get constantly redirected to the login page. Things look OK (a few problems with my custom theme, which works fine on my development site). So it would seem my problem is with the database I loaded from my development environment to GoDaddy. So can anybody tell me what the correct way to transfer the database from development environment to GoDaddy host? I originally did this as per posts I found on nopCommerce Forums but seems something is wrong and I really do not want to have to set up my store from scratch, so any help/pointers would be greatly appreciated.


Hi,

You can try following options:

1) Create a backup file (.bak) from your computer and then send it to GoDaddy, ask them to restore database from this backup file to existing database for you.

2) Export script with data in MS SQL Server Management Studio tool.
   Then, use GoDaddy MS SQL Admin Tool to run this script in order to update data to your database.
9 years ago
With the option 1 (create backup file), you can take a look at following guide:
http://www.eukhost.com/kb/backup-and-restore-ms-sql-server-2008-database/
9 years ago
With the option 2 (generate script with data), please do as following steps:

1) Generate script with data in MS SQL Server Management Studio tool.
    Take a look at link:
    http://blog.sqlauthority.com/2011/05/07/sql-server-2008-2008-r2-create-script-to-copy-database-schema-and-all-the-objects-data-schema-stored-procedure-functions-triggers-tables-views-constraints-and-all-other-database-objects/

2) After that, copy/paste the generated script with data to GoDaddy MS SQL Admin Tool.
    Run this script to update your database.
    Link to refer how to do it:
    https://support.godaddy.com/help/article/1484/importing-sql-server-database-objects

Hope this help :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.