Hello,
I have a website (build in VS 2010) that uses the .net framework 4.0 (asp.net) and also uses some infragistics controls (webdialogwindow). It uses the default scriptmanager. When I test the website locally everything is working as expected (with IIS 7.5 and windows server 2008 R2). But when I install the website on the server (reverse proxy with IIS 7.5 and windows server 2008 R2) of our customer I get a 404 error message that it can't find the ScriptResource.axd and/or the WebResource.axd. Please note that the website works locally on the server of our customer. This problem only occurs when we try to open the website from outside the LAN.
When I set the enablecdn="true" in the scriptmanager I see that the focus of the textfield is working (without the cdn enabled the focus doesn't work). But the infragistics controls still don't work. In debug mode in Chrome I see the following 404 error messages (Not found):
GET http://200.X.XXX.XXX/TEST/ScriptResource.axd?d=vnH4...ukm_3e641&t=410 404 (Not Found)
GET http://200.X.XXX.XXX/TEST/WebResource.axd?d=3y6a_vM...Yi9d_99Dw2&t=6345 404 (Not Found)
Is there someone who might know what is causing this issue and might have a solution?
Hello mknape ,
Are only the embedded resources for the IG controls not being found?
Generally the script manager also should load its scripts from an embedded resource from the System.Web.Extensions assembly.
Could you check if its resources are properly loaded?
There should be 3 resources loaded for the script manager:
MicrosoftAjaxWebForms.js ( you can find the names in the comments in the beginning of those files)
MicrosoftAjax.js
And the third one contains some postback options ( contains some methods like WebForm_PostBackOptions)
Also are the assemblies in the bin folder of the application or in the GAC?
I’m looking forward to your reply.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support
Thankx for the answer.
We have investigated the problem and we see that the problem is caused by the reverse proxy server that is used by our customer.
The problem is that the scriptresource and webresource can't be found. So what we did is rewrite the url's in the page render. This seems to work.
We are only wondering if there isn't a better solution. But for now it works and if anyone might have a better suggestion/solution please let me know.
Thanks again.
For those who might have the same problem (with a reverse proxy server). I put the following code in the base page:
Protected Overrides Sub Render(writer As System.Web.UI.HtmlTextWriter)
Dim sw As System.IO.StringWriter = New System.IO.StringWriter()
Dim htw As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(sw)
MyBase.Render(htw)
Dim s As String = sw.ToString()
s = s.Replace(HttpContext.Current.Request.ApplicationPath + "/WebResource.axd", VirtualPathUtility.MakeRelative(HttpContext.Current.Request.Url.AbsolutePath, "~/WebResource.axd"))
s = s.Replace(HttpContext.Current.Request.ApplicationPath + "/ScriptResource.axd", VirtualPathUtility.MakeRelative(HttpContext.Current.Request.Url.AbsolutePath, "~/ScriptResource.axd"))
writer.Write(s)
End Sub