problem with login

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/29/2013 10:37:46 PM
Gravatar
Total Posts 20

problem with login

i update mojoportal to current version

i use , sql sever

i upload all file

but i have problem :   downloadpaper.ir

 

when i want to login : http://www.downloadpaper.ir/Secure/Login.aspx?returnurl=%2fDefault.aspx

it redirect to http://www.downloadpaper.ir/ but without login - and i can't register new user

i change validationKey in web.config to previous value

 

3/30/2013 9:45:03 AM
Gravatar
Total Posts 18439

Re: problem with login

I remember someone else had this problem and they solved it by changing the application pool to Classic instead of Integrated. I don't know why that solved it but its worth a try.

Hope that helps,

Joe

3/30/2013 12:11:13 PM
Gravatar
Total Posts 20

Re: problem with login

how can i change application pool ?

i have these option in my control panel - please say me, best option to change

Add Dedicated Application Pool :

Dedicated Application Pool extension
Maximum number of worker processes by pool
Runtime Version
Enable 32 bit
Classic Mode

 

 

3/30/2013 1:27:53 PM
Gravatar
Total Posts 18439

Re: problem with login

classic mode is what you should enable. If it is already enabled then see if you can change it to Integrated mode.

3/31/2013 4:33:18 AM
Gravatar
Total Posts 20

Re: problem with login

i can't change to classic mode ( hosting doesn't support)

Are there any Solution?

i haven't any problem with .net 3.5

do i need to  change <machineKey validationKey , decryptionKey in web.config?

 

 

3/31/2013 6:14:01 AM
Gravatar
Total Posts 18439

Re: problem with login

really it should work fine with either Integrated or Classic app pool and Integrated is preferred. 

Nothing has changed in the login code in a very long time so I really have no idea what is causing the problem, I only know that someone else told me they had this problem and were able to fix it by changing to Classic mode.

What it really seems like to me is that somehow cookies are blocked in your browser. Authentication sets a cookie but then it seems like it has not been set. I would try clearing your browser cookies and I would also try login from a different machine and different web browsers.

I would also check to make sure in your web.config that the <forms element does not have requireSSL="true" as this would prevent the browser from passing the cookies unless using a secure https connection.

Make sure anonymous authentication is enabled in your web panel.

also make sure there are no extra web.config or user.config files lying around in sub folders beneath your site, the only one should be in the root.

3/31/2013 8:24:41 AM
Gravatar
Total Posts 20

Re: problem with login

i check all of them but i have poblem

can you explain about :is it true? i change machineKey to previous value

<machineKey validationKey , decryptionKey?

 <add key="UseLegacyCryptoHelper" value="false" />?

<add key="CheckMD5PasswordHashAsFallback" value="false" />

3/31/2013 11:04:57 AM
Gravatar
Total Posts 18439

Re: problem with login

machine key is only mainly important if using encrypted passwords it is not used with plain text or hashed though it still can be a factor because the authentication cookie will use the machine key. when using encrypted passwords the machine key is used as part of the encryption of the password stored in the database, therefore if the machine key changes when using encrypted passwords it will not be able to decrypt it so login will fail. When using hashed password the machine key is not a factor in hashing the password so it can change and login will still work.

The main thing I want you to realize is that if login fails by not matching the user or password it will not redirect it will show an error on the login page saying that login failed. The fact that it does redirect means authentication success, it sets the authentication cookie and then does the redirect. But apparently after the redirect you do not appear logged in to the site so it seems that either something prevented setting the cookie or the cookie does not appear as valid. That is why I said make sure no other web.config files are lying around. If ther eis another web.config file somewhere in a sub folder with a different machine key then it will not match. Make sure there is no web.config file in the /Secure folder or in the skin folders or anywhere other than root.

LegacyCryptoHelper was never used for authentication so it is not a factor.

CheckMD5PasswordHashAsFallback only applies with hashed passwords since we changed to stronger hashing if the user had the old weaker hash it could retry if authentication fails using the older weaker hash, if that authentication succeeds then the user data is updated to the new stronger hash.

But again authentication failure does not result in a redirect so the problem is not authentication it is somehow a problem with the authentication cookie. ie if you type in a wrong password on purpose it will not redirect it will show an error. The fact that it redirects means it is authenticating but then on the next request it somehow doesn't accept the authentication cookie.

You should also look in the mojoPortal log to see if it is logging anything that may give a clue to the problem.

You could also use a tool like fiddler to watch the web requests and inspect the cookies. Then you would at least know if the browser is sending the cookie in the request headers or not after authentication.

4/1/2013 1:26:31 AM
Gravatar
Total Posts 20

Re: problem with login

2013-04-01 01:11:03,195 INFO (null) - (null) - (null) - mojoPortal.Web.Global - برنامه شروع شد.
2013-04-01 01:11:05,676 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task
2013-04-01 01:11:05,941 INFO (null) - (null) - (null) - mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread
2013-04-01 01:11:10,637 INFO 95.82.38.49 - fa-IR - /Secure/Login.aspx?returnurl=%2fservice-download-paper.aspx - DotNetOpenAuth - DotNetOpenAuth, Version=3.1.0.9122, Culture=neutral, PublicKeyToken=2780ccd10d57b246 (official)
2013-04-01 01:11:10,637 INFO 95.82.38.49 - fa-IR - /Secure/Login.aspx?returnurl=%2fservice-download-paper.aspx - DotNetOpenAuth.Messaging.Channel - Scanning incoming request for messages: http://www.downloadpaper.ir/Secure/Login.aspx?returnurl=%2fservice-download-paper.aspx
2013-04-01 01:11:49,219 ERROR 79.127.123.9 - fa-IR - /100-ابزار-مناسب-براي-پژوهش-با-کمک-وب-.aspx?skin=printerfriendly - mojoPortal.Web.mojoBasePage - Error setting master page. Will try setting to default skin.fa-IR - 79.127.123.9
System.Web.HttpException (0x80004005): The file '/Data/Sites/1/skins/printerfriendly/layout.Master' does not exist.
   at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
   at System.Web.UI.Page.get_Master()
   at mojoPortal.Web.mojoBasePage.SetupMasterPage()
   at mojoPortal.Web.mojoBasePage.OnPreInit(EventArgs e)
2013-04-01 01:12:28,503 INFO 95.82.38.49 - fa-IR - /Secure/Login.aspx?returnurl=%2f - DotNetOpenAuth.Messaging.Channel - Scanning incoming request for messages: http://www.downloadpaper.ir/Secure/Login.aspx?returnurl=%2f
2013-04-01 01:13:19,816 INFO 95.82.38.49 - fa-IR - /Secure/Login.aspx?returnurl=%2f - DotNetOpenAuth.Messaging.Channel - Scanning incoming request for messages: http://www.downloadpaper.ir/Secure/Login.aspx?returnurl=%2f
2013-04-01 01:13:32,749 INFO 95.82.38.49 - fa-IR - /Secure/Login.aspx?returnurl=%2f - DotNetOpenAuth.Messaging.Channel - Scanning incoming request for messages: http://www.downloadpaper.ir/Secure/Login.aspx?returnurl=%2f

 

if you send me your email , i send user & password control panel to you

4/1/2013 1:38:57 AM
Gravatar
Total Posts 20

Re: problem with login

if i type mistake user & password , i redirect to default page without any error

and

when i send message in contact page (http://downloadpaper.ir/%D8%AA%D9%85%D8%A7%D8%B3-%D8%A8%D8%A7-%D9%85%D8%A7-%D9%BE%D8%B1%D8%AA%D8%A7%D9%84-%D8%AF%D8%A7%D9%86%D9%84%D9%88%D8%AF-%D9%85%D9%82%D8%A7%D9%84%D8%A7%D8%AA-%D8%B9%D9%84%D9%85%DB%8C.aspx)

 

it redirect to Default.aspx without send email or any message

4/1/2013 3:46:57 AM
Gravatar
Total Posts 51
Share our knowledge,Take world in our hands.

Re: problem with login

hi friends,

I have similar problem only in IE browser.(http://behsazi-kh.ir)
This work with Firefox and chrome well.
I checked it in classic and integrate mode but problem didn't solve.
But I don't check it in other machine. If you want check it, you can test it with test@test.com and 1234567 in other machine.

windows 2008 sp2
mojo 2395 MSSQL full trust
MSSQL 2008 R2
.net 4.0

skin is HTML5(mocha) based.

thanks

4/1/2013 4:45:13 AM
Gravatar
Total Posts 20

Re: problem with login

i have problem in IE , Firefox ,chrome ,...

what's your email Sadegh Samarian?

4/1/2013 6:54:06 AM
Gravatar
Total Posts 18439

Re: problem with login

Sadegh,

I was able to login to your site in IE 9 on win7

hamiddebel63,

your site has javascript errors happening if you use browser dev tools you will see errors in the console. I suspect that is causing the problem. I would solve those problems first and see if it solves the login problem.

4/1/2013 7:56:30 AM
Gravatar
Total Posts 51
Share our knowledge,Take world in our hands.

Re: problem with login

Thanks Joe, I changed my skin to an Artisteer skin and checked that with IE that was ok.

I think you saw my site with Artisteer skin :). Please check it again. 

I try to found Script Errors in IE.
 

Thanks a lot Joe.

hamiddebel63,
S.Samarian[at]gmail.com
 

4/9/2013 11:27:04 AM
Gravatar
Total Posts 20

Re: problem with login

i create new Database , and i  change template to art41-blue

but i can't login yet

the user and password is default

user : admin@admin.com

password : admin

 

 

 

4/9/2013 11:50:37 AM
Gravatar
Total Posts 20

Re: problem with login

i test it with google chrome and firefox

4/9/2013 12:21:03 PM
Gravatar
Total Posts 18439

Re: problem with login

you still have javascript errors happening on the page, you need to solve those because they causing the problem.

If you use Chrome, right click the page and choose Inspect Element, then click on the console tab to see the script errors.

I think you may need to get help from your host because the problems look like something is bad about IIS configuration or the installation of the .NET framework.

Scripts using .axd extension are resulting in a 404 which seems like the extension is not registered correctly in IIS.

sys is undefined means the asp.net ajax framework is not working or not loading, do some googling to find solutions for those problems, they are not caused by mojoPortal but are preventing mojoPortal from working correctly.

You may need to ask your host to re-install the .NET framework or ideally install the newer .NET 4.5 framework

9/30/2013 8:42:09 AM
Gravatar
Total Posts 39
Hello from France!

Re: problem with login

Hello,
I had the same problem today installing a new site with MP v2.3.9.9
I have a dedicated server with Windows Server 2008 R2 Web Edition and SQL Server 2008 R2 and IIS 7.5
It hosts about 15 sites with different versions of MP (all with .net 4.0)

After installing MP v2.3.9.9, I could not sign in with admin@admin.com.
I could not register a new user.
In Firebug, I had 3 messages:
- ReferenceError: Sys is not defined    ...PageRequestManager._initialize(...
- ReferenceError: Sys is not defined    ...on() { var form = Sys.WebForms.PageRequestManager
- ReferenceError: get_cookie is not defined   var openState = Get_Cookie('openstate');

In web.config in <system.webServer>, <handlers>, I added the following line:
   <add name = "ScriptResourceIntegrated-4.0" path = "ScriptResource.axd" verb = "*" type = "System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "resourceType =" Unspecified "preCondition =" integratedMode "/>
Now the problem is solved!
This line was still in the web.config of 2.3.9.4

I hope this can help you (it's already 6 months! ...)

Christian

9/30/2013 12:52:28 PM
Gravatar
Total Posts 18439

Re: problem with login

Hi Christian,

The problem with a javascript error "Sys is not defined" has come up a few times recently and when it happens it does cause login failure and the solution you posted is correct and solves the problem.

But to clarify,this should in general not be needed in Web.config under .NET 4 and it never was in the Web.config file that we ship in the .NET 4 packages of mojoPortal as far as I know. I have checked our source code repository where I can see the complete file history and it has never been removed from the file and has never been in the file. I also looked in our old packages for mojoPortal 2.3.9.4 and it does not exist in the web.config file for the .NET 4 packages of that version. I do not have that in any of my site installations including this site.

Something similar was required for .NET 3.5 and has been our web.config for .NET 3.5 packages and still is there in our current package for 3.5, maybe that is where you saw it in versions 2.3.9.4.

In .NET 4 they moved this kind of thing to machine.config so it is not needed in Web.config, and in fact it cannot be in both places or it causes an error. For example if I add it in Web.config on my installation it causes this error:

"Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ScriptResourceIntegrated-4.0'"

So whenever this problem of sys is undefined comes up for .NET 4 it seems to me like something is not configured correctly in the installation of .NET 4 on the server. When it does come up the site can be fixed by adding this to Web.config but it should not be needed on a correctly installed and configured .NET 4 installation. In fact if you put this in Web.config and later the server configuration gets corrected it will crash the site with the above error. Myself I would try re-installing .NET 4.5 framework instead of putting that in Web.config.

If you create a new .NET 4 web application project in Visual Studio the web.config file it generates also does not have this. So it is not something missing in our Web.config file and not something we should add there by default.

Best,

Joe

9/30/2013 1:30:59 PM
Gravatar
Total Posts 39
Hello from France!

Re: problem with login

Hi Joe,

I'm sorry. I develop specific modules on mojoPortal and I don't remember well the history of this line in (my) web.config file.
I think I added this line to run a custom module that uses Google maps (to see it: memory-deportation-ain.fr -> Rechercher un déporté, then write RAVOT (or leave blank to obtain the full list) and press 'Rechercher par nom', then click on 'RAVOT Louis Albert' (or on other person))
I got used to add this line in the web.config: this is perhaps not a good thing ...
I'll try to install .NET 4.5 on my server, but I'm a little afraid to touch the configuration of my server because it works very well!
I will inform you when I have done this installation.
To Joe and all MP users: Have a good day !

9/30/2013 1:34:48 PM
Gravatar
Total Posts 39
Hello from France!

Re: problem with login

I was wrong.

Example website Url address is: memoire-deportation-ain.fr

Christian

You must sign in to post in the forums. This thread is closed to new posts.