PDA

View Full Version : [CLOSED] BAD RESPONSE: Expected ')' only in production enviroment



marco.morreale
Apr 27, 2015, 11:24 PM
Hi guys,
I have a link button defined as below:

Html.X().Button()
.Text("Esporta Pasti Ore Ip")
.ID("EsportaPastiOreIp")
.Handler("exportExcelPastiOreIp()")
.Icon(Icon.PageExcel)
.StandOut(false)
The following javascript method is called :

var exportExcelPastiOreIp = function() {
Ext.net.Mask.show();
Ext.net.DirectMethod.request({
url: "/PianoFerie/exportExcelPastiOreIp",
cleanRequest: true,
isUpload: true
});
Ext.net.Mask.hide();
}
The controller method call exportExcelPastiOreIp returns a Excel File without using response.
In the developmnet enviroment all works fine but in production enviroment the error in the subject comes out.
How can I solve it?
Marco

Daniil
Apr 28, 2015, 9:14 AM
Hi marco,

Is it being tested in the same browser? Is it IE? If so, when you test in production environment, please ensure that IE's compatibility mode is turned off.

Also is it reproduced in all the browsers - IE, Chrome, Firefox?

ingbabic
Apr 29, 2015, 8:21 AM
Hi
If I may interfere, from my own experience problem might be in path to xsl stylesheet refered to in application (you want to export grid to excel I suppose). If in development time you put something like this:


xtExcel.Load(Server.MapPath("Excel.xsl"));

it might not work in all environments. It will work in IIS Express, but will not work on real application server. The reason for that is application path is different in different environments. So you can try with something like this:


Server.MapPath(Request.ApplicationPath+"Excel.xsl");


The same is true for referring any other file (resource files, pictures, etc.)
Hope this helps.