scriptservice

How do I get ASP.NET WebForms Routing to route .asmx JSON calls properly?

自古美人都是妖i 提交于 2019-12-10 22:46:40
问题 I am attempting to implement multi-tenancy in a legacy ASP.NET WebForms app. I want the URL to indicate the proper client, like so: http://example.com/client_name/Default.aspx http://example.com/client_name/MyWebService.asmx However, I cannot get it to route the .asmx's properly. This routing rule picks up all incoming urls just fine: routes.Add("ClientSelector", new System.Web.Routing.Route ( "{client}/{*path}", routeHandler: new ClientRoute() )); But I am having issues with handling .asmx

ASP.NET ScriptService deserialization problem with derived types

僤鯓⒐⒋嵵緔 提交于 2019-12-09 17:38:40
问题 I have a ScriptService web method (.NET 3.5) which takes a single parameter of an abstract base type: [WebMethod(EnableSession=true)] [ScriptMethod()] public bool Test(Item item) { ... } And: namespace Namespace { public abstract class Item { public int id; } public class Group : Item { public Item[] items; } public class Instance : Item { public string whatever; } } Usually, when the method is called, item will be a Group which contains Instance and/or Group objects. I'm calling this service

ASP.NET ScriptService deserialization problem with derived types

你。 提交于 2019-12-04 04:30:29
I have a ScriptService web method (.NET 3.5) which takes a single parameter of an abstract base type: [WebMethod(EnableSession=true)] [ScriptMethod()] public bool Test(Item item) { ... } And: namespace Namespace { public abstract class Item { public int id; } public class Group : Item { public Item[] items; } public class Instance : Item { public string whatever; } } Usually, when the method is called, item will be a Group which contains Instance and/or Group objects. I'm calling this service from jQuery; I'm not using the Microsoft client-side framework. Calls to other methods work fine. The