Solved

URL Rewrite

Posted on 2011-09-26
3
846 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
ID: 36708027
0
 

Accepted Solution

by:
Khopkins32 earned 0 total points
ID: 36717074
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
ID: 36908411
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 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