Solved

URL Rewrite

Posted on 2011-09-26
3
834 Views
Last Modified: 2012-05-12
I have an asp.net appication hosted on windows server 2008 in IIS7 that has ajax a. nd third party controls. When I hit the site directly it works perfectly. When I hit the site via a reverse proxy I get Sys undefined javascript error. It appears that it is looking for an axd file that is not at the location specified. The url to the server is: https://server.net/sub.dir/default.aspx. The site url via the reverse proxy is https://company.com/sub.dir/default.aspx. I am currently looking into IIS7 URL Rewrite feature to handle accessing the *.axd files. Is there a generic rule that can be written to redirect or rewrite the correct location of the *.axd files, which i believe is the context root directory?
0
Comment
Question by:Khopkins32
  • 2
3 Comments
 
LVL 10

Assisted Solution

by:gaurav05
gaurav05 earned 500 total points
Comment Utility
0
 

Accepted Solution

by:
Khopkins32 earned 0 total points
Comment Utility
I looked at the links and I have a better understanding of how to create rules in IIS7 URL Rewrite. The problem is that I am not able to reference the WebResource.axd file. I have tried using the following rule which may or may not be correct: See Below:

<rewrite>
            <rules>
                <rule name="Redirect" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions trackAllCaptures="true">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        <add input="{URL}" pattern="\.axd$" />
                    </conditions>
                    <action type="Rewrite" url="{R:0}/" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>

My question is how can the embedded resource files get referenced from the reverse proxy?

0
 

Author Closing Comment

by:Khopkins32
Comment Utility
It turns out that the reverse proxy was figured with compression of javascript and was double compressing the resource files. Once compression was remove the site worked as expected
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now