Solved

URL Rewrite

Posted on 2011-09-26
3
857 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 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