PDA

View Full Version : HTTPProxy doesn't work in remote



arunprabu
29 Jan 2010, 2:22 PM
Hi I have a webpage with a grid filled with data using HTTPProxy to get data from a .ASMX WS in the same server.

When I access the page in the same machine with localhost url, the data comes and the grid is rendered. But when I access the page from an external machine through ip address - http://ipaddress/site/page.aspx http proxy does not work.

any pointers would be appreciated.

Thanks in advance

darren
29 Jan 2010, 2:45 PM
Are you calling the remote url with the absolute path? That might be the problem.

Animal
30 Jan 2010, 12:49 AM
It's the Same Origin Policy.

arunprabu
4 Feb 2010, 12:23 AM
I have not properly quoted certain things here:

1. I have tried both fully qualified url and relative url.
2. When I am testing the page in a browser in the same machine where I have the webservice running, it works fine with both relative and full url. But When I access the page from a browser from a different machine, nothing. it is blank.
3. I am trying to access a webservice from asmx (I have originally quoted it as aspx).

Here is my code:

dataStore = new Ext.data.Store({

proxy: new Ext.data.HttpProxy({url: 'ItemsService.asmx/itemsList', method: 'POST'}),

reader: new Ext.data.XmlReader({
record: 'Table',
totalProperty: 'total',
idProperty: 'id'
}, item),
sortInfo:{field: 'name', direction: "ASC"}
});

Both the page and the asmx are in the same folder in the website.

Animal
4 Feb 2010, 12:29 AM
How have you debugged?