Hello,
I found a problem in our solution. We map the Website Logo with Glass.Mapper and the Image field. For the image url we use the Image.Src property.
If i do the following, the url gets created within the shell context and is not accessible as an normal visitor:
1. Restart IIS
2. Log in to Sitecore with /sitecore/login -> This must be the first action after restarting
3. Open the Website which contains the image
When you open another browser or start a private session, the URL will still have /sitecore/shell in it. This does not work for a visitor.
When i open the website after an IIS reset as a normal user without login, the URL gets generated correct and works in any case. I created the following log statement:
Log.Info(string.Format("Src from Image.Src: {0}, Generated by GetMediaUrl: {1}", this.Image.Src , MediaManager.GetMediaUrl(new MediaItem(Sitecore.Context.Database.GetItem(new ID(this.Image.MediaId))))), this);
This shows me that the on the fly generation of the url is correct, the Src property not. Seems that Glass caches the Image after it's first call.
Can you help me with this?