Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Change path to Webresource.axd View modes: 
User avatar
Member
Member
frederic-cbd - 6/12/2012 4:08:02 PM
   
Change path to Webresource.axd
Hi
we are running a single domain website like www.domain.com

We will have two .NET CMS installed on 2 different web servers. One of those CMS in Kentico 6. Let's simply call the second CMS OtherCMS.

A load balancer allows querying the correct servers depending on the URL:
- www.domain.com/site-kentico gets response from server1
- www.domain.com/site-other-cms gets response from server2

The issue we face now is with /WebResource.axd and /ScriptResource.axd. Those resources are available at the root of each of both applications, but the load balancer can route the request to just one server, in our case the default server which is for the time being server2.

Would any one have a neat solution to resolve this issue so that each application sends its correct /WebResource.axd back?

Thank you very much in advance.

Best regards
Frederic

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/13/2012 3:46:06 AM
   
RE:Change path to Webresource.axd
Hi Frederic,


the behavior, how it handles the requests, depends on the server settings. The standard approach is that you set up Virtual folders (Web Applications) for each site on your IIS and point them to different file locations. Then it will use WebResource.axd and /ScriptResource.axd from the appropriate (target) folders.

Please note that this question does not relate to Kentico CMS (it cannot handle this), but to server settings.


Best regards,
Helena Grulichova

User avatar
Member
Member
scott_hancock-urmc.rochester - 7/26/2012 12:13:23 PM
   
RE:Change path to Webresource.axd
Hi,

We've come across this issue and we fixed it using our load balancer. We have an F5 create routing rules called iRules. To fix this issue we wrote a rule that looks for requests for WebResource or ScriptResource. It then looks at the referrer property in the header and redirects the request based on that.

Even if you don't have an F5, many load balancers have a similar mechanism.

Scott

User avatar
Member
Member
alexandre.rafalovitch-cbd - 7/26/2012 12:41:32 PM
   
RE:Change path to Webresource.axd
Thanks Scott,

What we ended up doing is using IIS Rewrite Filters both on the way in and out. On the way out, /Webresource.axd in script links get rewritten to /KProd/Webresource.axd and on the way in, /KProd/ gets stripped. Load balancer then just uses that prefix.

This worked for everything except for some admin URLs generated from JavaScript. Not a perfect solution, but very close.