Themes don't work when the request has a PathInfo - by Paulo Morgado

Status : 


Sign in
to vote
ID 357532 Comments
Status Active Workarounds
Type Bug Repros 3
Opened 7/23/2008 3:06:50 PM
Access Restriction Public


When a request is in the form:


The links rendered for the themes are relatevie to location of Default.aspx but the browser thinks they are relative to the location of PathInfo.
Sign in to post a comment.
Posted by Microsoft on 5/4/2009 at 8:47 AM
We spoke about this. The original issue, for which this connect bug was opened, has been fixed in v4.

The other issue, about cookieless sessions and proxy caches, the ASP.NET team will try to address in a future release. I will open a bug for this in our database, and if you like, you can also open a new connect bug for this issue. Thanks again for providing feedback, it's very helpful!
Posted by Microsoft on 4/14/2009 at 10:54 AM
Hi Paulo,

Yes, ASP.NET Themes still uses relative URLs. The fix I mentioned earlier does not change this. Could we start another connect bug to discuss the issue with Themes, cookieless sessions, and proxy caching?

I'd like to resolve this connect bug, which is about PathInfo not working correctly with Themes, since that is now fixed in v4.0.

You're also welcome to contact me directly through the contact page on my blog: We can then discuss any issues involving URLs.

Posted by Paulo Morgado on 4/12/2009 at 12:17 PM
Thanks for the info.

Does this fix the issue of the themes infrastructure generating relative URLs (instead f absolute like for webresource.axd) which makes cliente/proxy caching useless when using cookieless cookies (for session and forms auth)?
Posted by Microsoft on 4/9/2009 at 2:29 PM
Yes, this has been a source of frustration for a long time. Fortunately it has been addressed in ASP.NET v4.0. That doesn't help you now, since you're using v2.0/3.5, but there is something you can do. The IIS URL Rewrite Module (see link below) includes a hotfix/QFE for ASP.NET that fixes a number of issues related to PathInfo and ResolveClientUrl. The KB for the hotfix/QFE is 957660 (see link below). The current description for KB 957660 is not that good, but this is primarily due to the complexity of the change. In a nutshell, it fixes all the issues related to client URL resolution. To reduce the impact of the hotfix/QFE, the changes it makes are only applied if the server variable "IIS_WasUrlRewritten" = 1, which is something the IIS URL Rewrite Module does if the URL is rewritten. This server variable must be set very early on, before managed code is entered. The easiest way for you to set it would be to actually use the IIS URL Rewrite Module. Alternatively, you could set it from an IIS native module before managed code is entered. Anyhow, this hotfix/QFE fixes most of the issues when "IIS_WasUrlRewritten" = 1, and in ASP.NET v4.0 they are all fixed without a need to set the server variable.


Posted by Stevioso on 4/9/2009 at 2:03 PM
Note that this problem is related to how IUrlResolutionService doesn't take into consideration that from the clients side, the PathInfo part of the url is still part of the domain path.. this effects ANY controls that internally do resolution with ResolveClientUrl, such as the Link tag and Image.. I discovered this over a year ago and tried to get some feedback on the msdn forums but had zero luck.
Posted by Microsoft on 7/25/2008 at 12:40 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 7/24/2008 at 3:58 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(

If at any time your issue is closed unsatisfactorily, you may edit your issue via Connect and change the status to “Active.”

Thank you,
Visual Studio Product Team
Posted by Paulo Morgado on 7/23/2008 at 3:51 PM
The URLs for themes should always be rooted.