ASP.NET automatically includes the following script tag:
<script src="/WebResource.axd?d=8H_C0aee9xE8e9a-3YoRhA2&t=633413907763620168" type="text/javascript"></script>
However the clients site is being proxied through another site. So the URL to the root of their site is:
http://domain.com/somename/
So I need to prefix the WebResource.axd with /somename so the resulting tag will look like this:
<script src="/somename/WebResource.axd?d=8H_C0aee9xE8e9a-3YoRhA2&t=633413907763620168" type="text/javascript"></script>
What I am not sure is how to actually set this? Is there a web.config setting I can set so it has this prefix?
I think that this function Response.ApplyAppPathModifier("You path"); can make the work for you.
on Global.asax
protected void Application_PreRequestHandlerExecute(object sender, EventArgs e)
{
string HereIsMyFileName = HttpContext.Current.Request.RawUrl;
if HereIsMyFileName contains the "webresource.axd"
then change it to what ever you like using
Response.ApplyAppPathModifier("You path");
Hope that this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With