Hi,
We have used GZIP compression technique for our web application but, we Could not compress the pages which has used infragistics controls as it throws “Object expected” error while GZIP accessing the java script file in ig_common folder.
When debugging the page in local machine the problem occurs but it is working fine in the virtual. I have attached the screenshot for your reference. Could you please suggest me how to overcome this issue?
Application type: Web
Coding: VB.Net
Framework Version: 4.0
Infragistics version: 11.1.20111.2064
Hello Sphinx,
Can you share the code you are using to compress the pages?
Hi Prabha,
The infragistics controls in our application refers the scripts from the application folder(~/ig_common/scripts) configured in the web.config file.
<infragistics.web styleSetPath="Default" javaScriptDirectory="~/ig_common/scripts" imageDirectory="~/ig_common/images"/>
We have used the below code in Global.asax.vb page in Application_Beginrequest event.
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
'Fires at the beginning of each request
Dim app As HttpApplication = DirectCast(sender, HttpApplication)
Dim acceptEncoding As String = app.Request.Headers("Accept-Encoding")
Dim prevUncompressedStream As Stream = app.Response.Filter
If (acceptEncoding.Length = 0) Then
Return
End If
acceptEncoding = acceptEncoding.ToLower()
If (acceptEncoding.Contains("gzip")) Then
app.Response.Filter =New GZipStream(prevUncompressedStream, CompressionMode.Compress)
app.Response.AppendHeader("Content-Encoding", "gzip")
ElseIf (acceptEncoding.Contains("deflate")) Then
app.Response.Filter New DeflateStream(prevUncompressedStream, CompressionMode.Compress)
app.Response.AppendHeader("Content-Encoding", "deflate")
End Sub
We do not need to specify javaScriptDirectory and imageDirectory properties unless we change something as these included in the DLL. I suggest you remove these properties and see if it resolves this issue.
Please let me know if you have any further questions regarding this matter.
We tried in the way you have suggested.But still we get the same script error.
We have developed one small sample application and attached for your reference. Could you please have look on that and suggest me?
I have opened a support request(CAS-111705-N5Q9W6) for this forum post so we may research this behavior further. Please use the following link to log onto your account at Infragistics.Com:
<https://es.infragistics.com/Membership/MySupport.aspx>
Once you are logged onto your account, go to My Support Activity to view the progress of this support request. An update will be sent to you in the support request with any new information we find.
Please let me know if you have any questions.
As per your suggestion we have upgrade the release version from (11.1.20111.2064) to (11.1.20111.2238) . But still we get the same script error.For your reference we have attached the sample application.
When debugging the page in local machine the problem occurs but it is working fine in the virtual.Kindly look on that and suggest me.
When I tested with lastest service release(11.1.20111.2238) I have not get any error you have specified. I suggest you to upgrade to latest service release to see if that resolves the issue.
To download the current service release for NetAdvantage for .NET from our website, please follow these instructions:
1) Navigate to the "My Keys and Downloads" page on our website. You may be asked to log in using your Infragistics member profile's user name and password. You can reach the My Keys and Downloads page via the following link: <https://es.infragistics.com/my-account/keys-and-downloads/>
2) Click on the "NetAdvantage" tab. This will show all of your registered license keys for NetAdvantage.
3) Click on the license key for the product and version for which you would like to download a service release. This will bring up all available public downloads for this product and version.
4) In the "Service Releases" section, click on the link for the appropriate version of NetAdvantage. Note that there is a service release for each CLR version and in some cases a separate hot fix for an ASP.NET-only, Windows-Forms-only, WPF-only, or full installation.
If your license key is not listed on the My Keys and Downloads page in step 2, then your key has not been registered to your member profile. To register your license key, please go to the Product Registration page, via the following link: <http://devcenter.infragistics.com/Protected/ProductRegistration.Aspx>
Once your license key is registered, it should appear in the My Keys and Downloads page, thus allowing you to download service releases for that version of NetAdvantage.
If you are unable to register your license key for some reason, such as that it is already registered to another user, please contact our Registrations department at the following email address: registrations@infragistics.com