View Full Version : what is the correct request format?

26 Nov 2007, 1:37 AM
my orm framework is genome ,and my asp.net ajax webserviece code is below:

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class RoleService : System.Web.Services.WebService

[ScriptMethod( ResponseFormat = ResponseFormat.Xml, UseHttpGet =true )]
public RoleDtoCollection GetRoles()
using (ctx.Push(ReadOnlyContext.Create()))
Set Roles = Helper.DB.Extent(typeof(Role));
return RoleSerializer.SerializeRoleFull(Roles);

and my extjs store code is below:

this.store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: '/Services/Login/RoleService.asmx/GetRoles'

reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'RoleDto'
}, [


and my webservice request xml result is below:

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfRoleDto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

but I got the erro:

Request format is unrecognized for URL unexpectedly ending in '/GetRoles'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/GetRoles'.

so I debug the extjs,and found the erro here:


so I want to know that what is correct request format of ExtJs?

26 Nov 2007, 2:50 AM
hi flyzb
i dont why you want this. because it is very simple to call the asp.net web service method from Extjs code.

26 Nov 2007, 8:51 AM
Use the ext-all-debug.js file so you can read what that code is doing.

26 Nov 2007, 9:57 AM
Welcome to the EXTJS community :)

please post in [code] or [php] tags in the future.

27 Nov 2007, 2:56 AM
I have found the answer:
In web.config, add 'HttpGet=true' and 'HttpPost=true', so you can get correct result of asp.net ajax webservice by the way httpproxy.