cachedependancy files not being created

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/21/2012 3:11:00 PM
Gravatar
Total Posts 130

cachedependancy files not being created

Hello,

I just became aware that my mojoPortal installation is no longer creating cache dependency files ... has anyone else encountered this before? I've deleted the cache dependency files that were existing in one site directory, then created a page, deleted it, and no new cache dependency files were created. This is problematic for sites in my installation that are in a clustered environment ... the entire Sites directory is in a file share location. If a person makes a change to the site on one server and the cachedependency isn't getting cleared, the new pages/changes are not being reflected on the other server.

I've checked the logs and am not receiving any errors after making a site change (such as the failure to create the file).  Any ideas???

Thanks,

Beth

3/21/2012 3:40:46 PM
Gravatar
Total Posts 130

Re: cachedependancy files not being created

I also wanted to add that I checked my file permissions on the systemfiles directory and they are correct and the application has write access. ~ Beth

3/21/2012 4:25:30 PM
Gravatar
Total Posts 18439

Re: cachedependancy files not being created

Hi Beth,

I'm afraid this is my fault. One of my goals when working on web farm support was to do away with the cache dependency files since they could not be used in large web farms. Currently they are not needed on a single server, and on large web farms we support using a distributed cache (AppFabricCache) which allows the cache items to be cleared by any node in the farm.

However in doing this I kind of lost sight of the small cluster with a shared drive scenario, since I don't imagine you'd like to setup an AppFabricCache given that it has been working for you all along in the past, I'll look into adding a config setting that allows re-enabling use of dependency files, I don't think it will be too difficult or take too long to solve that.

I'll follow up tomorrow and try to get a solution for this into the repository asap. Sorry for the inconvenience.

Best,

Joe

3/22/2012 8:25:39 AM
Gravatar
Total Posts 130

Re: cachedependancy files not being created

Ok, thanks.  Let me know :-) ~ B

3/22/2012 8:55:14 AM
Gravatar
Total Posts 18439

Re: cachedependancy files not being created

Hi Beth,

Ok, this is in the repository now. You'll need to do the usual pull changes, update working copy, rebuild solution, visit setup page.

Then add this in user.config:

<add key="UseCacheDependencyFiles" value="true" />

and touch web.config to make it load the new setting from user.config

After that you should see cache dependency files under /Data/systemfiles

Whereas before we stored some of them under /Data/Sites/[SiteID]/systemfiles, now they will only be in /Data/systemfiles

Best,

Joe

3/22/2012 9:39:56 AM
Gravatar
Total Posts 133
J

Re: cachedependancy files not being created

Cool Excellent

3/28/2012 12:57:02 PM
Gravatar
Total Posts 130

Re: cachedependancy files not being created

Hi Joe,

After pulling down your changes, I've tried upgrading from 2.3.7.6 to 2.3.8.1. The upgrade completes but I am unable to log in.  I see no errors in the log file and everything appears to be correct in the database (I'm not locked out).  I've tried changing my password directly in the database and still cannot log in through the web interface. I've updated my machine key prior to running the upgrade to make sure I didn't garble the passwords.  Any suggestions?

~ Beth

3/28/2012 1:15:39 PM
Gravatar
Total Posts 18439

Re: cachedependancy files not being created

Hi Beth,

What password format are you using?

Is this your dev environment using source code from the repository? The very latest code should be version 2.3.8.3, it doesn't sound like your working copy is updated to the latest code which is needed for the cache dependency files. I would first get your code up to the latest version by right clicking the top level folder and choose TortoiseHG > Update (default branch), then rebuild the solution and visit the setup page, it should have version 2.3.8.3.

Though nothing changed in terms of login since version 2.3.8.1 which is the version where we updated to stronger hashing and encryption with salt.

You can't really manually update your password in the db unless using plain text, since it would be stored as hashed or encrypted otherwise and you have no way of manually doing that.

There is a safety net setting you can put in user.config that will make it try all password formats if login fails:

<add key="CheckAllPasswordFormatsOnAuthFailure" value="true" />

and that would allow you to manually update it in the db to plain text (even when using encrypted or hashed) to get back in but you should not have to do that, so I would save that as a last resort and it won't really be a solution for lots of users if they are all failing.

With hashed or clear text the machine key does not matter but with encrypted it must never change, if the machine key is changed after passwords are encrypted then all users would be locked out and no way to recover the password. machine key on your dev environment needs to be that same as on production if using encrypted.

On your dev machine you could step through the code, setting a breakpoint in Web/Components/mojoMembershipProvider.cs in the ValidateUser method and in PasswordIsValid method and find out what is happening

Hope that helps,

Joe

3/28/2012 2:44:30 PM
Gravatar
Total Posts 130

Re: cachedependancy files not being created

Hi Joe,

I'm using the hashed password format. I've compiled the site from the full source in the repository. My last pull was on Friday after you released the updates ... When was 2.3.8.3 released?

I set break points as you suggested and the system is interpreting my password as the wrong hash.  My password is correct but the hash doesn't exist in the db at all.

Any ideas?

~ Beth

3/28/2012 2:46:11 PM
Gravatar
Total Posts 130

Re: cachedependancy files not being created

Also I did another pull from your source code before I went through the steps you suggested just now. ~ Beth

3/28/2012 3:05:05 PM
Gravatar
Total Posts 130

Re: cachedependancy files not being created

... I ran the application in debug mode again, this time pointing to a database that hasn't been upgraded (so it's 2.3.7.6) and am throwing an exception at log in: IndexOutofRangeException was unhandled by user code at line 926 in SiteUser.cs:

 rolesChanged = Convert.ToBoolean(reader["RolesChanged"]);

I don't know if that is helpful or not.

~ Beth

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