MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Gravatar cache out of sync (Closed) (Mono Support )

Viewed 23257 time(s), 10 post(s) 6/4/2014 11:44:05 AMby Zoomicon

Related topics

Zoomicon

Zoomicon

6/4/2014 11:44:05 AM

at http://social.clipflair.net/MonoX/Pages/SocialNetworking/Groups/GroupView/330KxZvxDU6ChqEtATGDJg/Learn-Japanese-from-English/ at the Group Members on the side by image (George Birbilis) is pointing to http://social.clipflair.net/MonoX/ApplicationData/Cache/Gravatars/3105d7c221ad6c73ef4ae3568c65f556.jpg

which is broken

How can I reset the Gravatar cache? Is there a button in the admin UI to do it? If I just delete those files from the cache will it reset itself? (it could have a job set at app startup to compare the cache in the filesystem and in the db for inconsistencies and remove stale data [pointing to missing files] from the db. Could even do that periodically and have admin button for that too [apart from cache flushing button maybe, since some time you may want to get newest gravatars in case user has changed them])

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/4/2014 12:12:13 PM
strange, seems that after upgrade, although I copied the designer's build over the live one, some gravatar cache files went missing. Placed them again from backup, and even deleted the WAO cache subfolders and restarted the site, but still it keeps showing a broken url and not being able to get the image url (although using the same path I can open the image in the remote desktop using windows explorer)

UPDATE: seems some Windows Explorer but with sorting by name the files in the cache (was sorting 3a....jpg at totally different place than 310...jpg) made me think the files weren't there after the update. They are there, but IIS can't serve them and I don't understand why (I don't see any issue with the folder and file rights)
This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/4/2014 12:12:49 PM
Is there any rewrite rule for http://social.clipflair.net/MonoX/ApplicationData/Cache/Gravatars/... paths that may be causing this issue?
This content has not been rated yet. 
2793 Reputation 345 Total posts
mzilic

mzilic

6/5/2014 9:47:09 AM
Hello,

Gravatar has an automatic cache duration expiration settings (if turned on), after that a new gravatar will be "created" for a user in the cache folder.

Can you check if the IIS Application Pool has write permissions for the MonoX/ApplicationData directory?

Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts
Zoomicon

Zoomicon

6/5/2014 10:17:07 AM

since I see files at those folders with recent dates it does have write permission, the thing is that although the image files seem to be in the gravatar cache IIS can't serve them (!)

that's why I was wondering if some rewrite rule is causing the issue

or is there a possibility the WAO cache is a 2nd level of caching in that case and that causes the issue?

This content has not been rated yet. 
2793 Reputation 345 Total posts
Zoomicon

Zoomicon

6/5/2014 2:37:27 PM

only settings with word "avatart" in web.config are below. Don't see any option to clear gravatar cache there by defining some value "0" say to make it expire next time app starts up. Can I somehow clear the cache manually? Is it enough to clear the cache\gravatars folder or do I need to also clear some DB table?

   <!-- indicates if gravatars are shown -->
</br>    <add key="ShowBlogGravatars" value="True" />
</br>    <!-- Available values: identicon, monsterid, wavatar, full URL-encoded http address or virtual path of an image that should be served as a default image if there is no image for a particular address: http%3A%2F%2Fexample.com%2Fimages%2Fexample.jpg -->
</br>    <!--
</br> <add key="GravatarType" value="/App_Themes/Common/img/avatar_blank.jpg" />
</br>    -->
</br>    <add key="GravatarType" value="identicon" />
</br>    <!-- indicates if avatars are shown -->
</br>    <add key="ShowBlogAvatars" value="true" />

This content has not been rated yet. 
2793 Reputation 345 Total posts
mzilic

mzilic

6/5/2014 4:01:43 PM
Hello,

Our development team is investigating the issue. We'll let you know as soon as possible. The issue is related to request filtering section in the web.config which is denying access to the ApplicationData directory.

Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts
mzilic

mzilic

6/6/2014 9:42:21 AM
Hello,

Our development team has fixed the issue on the latest dev build. Please try making the following adjustments on your end and let us know if they work for you. Open web.config and find the MonoSoftware.Web.WAO section. Change the DiskProvider working folder from /MonoX/ApplicationData/Cache to /MonoX/ApplicationData/ViewState, ex:
<add workingFolder="/MonoX/ApplicationData/ViewState" sqlConnectionString="" name="DiskProvider" type="MonoSoftware.Web.WAO.ViewState.Providers.DiskProvider, MonoSoftware.Web.WAO" customProperties="RecycleTime=60;ViewStateTimeout=480;" />
Next find the requestFiltering section in web.config and remove the ApplicationData hidden segment and replace it with the following:
<add segment="ViewState" />
<add segment="Logs" />
<add segment="FullTextIndexes" />
<add segment="RssStorage" />
Finally create a new directory called ViewState inside your ApplicationData direcory and ensure that MonoX has write permissions to the following folder. Best way to ensure is that the new folder has the same permissions as the Cache folder.

Regards,
Mario
Rated 5.00, 1 vote(s). 
2218 Reputation 300 Total posts
Zoomicon

Zoomicon

6/14/2014 2:06:48 PM

1) think you need to have WorkingFolder="/..." and not "/..." as you have it above (OUPS, your text editor is hiding the TILDE character!)

2) why isn't there an <add segment="Cache" /> too? (since you list there the rest of the ApplicationData subfolders)

3) I have the app pool for the site set to be able to modify the whole ApplicationData folder so the subfolders inherit permissions

This content has not been rated yet. 
2793 Reputation 345 Total posts
mzilic

mzilic

6/16/2014 9:55:58 AM
1. Yes, you should have the TILDE character and yes our text editor is hiding the character (thanks for reporting).
2. Cache folder is not listed because this is where the gravatars are stored. If you add this folder then you will have the same issue as you described earlier.
3. OK.

Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts