Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

URL Rewrite

Posted on 2011-09-26
3
Medium Priority
?
876 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

963 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