Questions tagged [scriptservice]

13 questions
7
votes
2 answers

ASP.NET ScriptService deserialization problem with derived types

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 { …
josh3736
  • 139,160
  • 33
  • 216
  • 263
3
votes
2 answers

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

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…
Scott Stafford
  • 43,764
  • 28
  • 129
  • 177
2
votes
1 answer

Webservice complex types and class inheritance

Using the following Webservice definition using aClientArgs as a complex type: [System.Web.Script.Services.ScriptService] public class Controller : System.Web.Services.WebService { [WebMethod] public void save_client(aClientArgs client) …
leepowers
  • 37,828
  • 23
  • 98
  • 129
2
votes
0 answers

Script service returns 405 on VS dev server when using HttpContext.RewritePath()?

I seem to encounter a very specific problem, apologies for length of question. I have a script service physically residing at /somepath/service.asmx. I am using a url rewriting module (UrlRewritingNet v2.0) to rewrite calls from /service.asmx to my…
tsemer
  • 2,959
  • 3
  • 29
  • 26
1
vote
0 answers

Uncaught ReferenceError: AutoFill is not defined

I have created web service and trying to call it from java script by enabling its "ScriptService" attribute. But i am getting console error "Uncaught ReferenceError: AutoFill is not defined" I have registered its reference in script manager but no…
1
vote
0 answers

ASP.NET ScriptService JavaScript alias

This is more a cosmetic issue, rather than an actual "problem". I've got a solution in which I am converting a lot of PageMethods into WebService calls instead. Some of the PageMethods created a page overhead of several hundred kilobytes, so I…
Siewers
  • 22,626
  • 3
  • 20
  • 31
1
vote
1 answer

How can I stream a ScriptMethod JSON response without the 'd' object?

I have a pretty basic ScriptMethod: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public void GetData(string token) { Context.Response.ContentType = "text/json"; Context.Response.Clear(); Context.Response.BufferOutput…
Collin Dauphinee
  • 13,664
  • 1
  • 40
  • 71
1
vote
0 answers

Unexpected GET method calls to ASP.NET ScriptService

Our error logger is picking up the following error periodically: System.InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/TheMethodName' The reason this error is being thrown is because the request to the…
patmortech
  • 10,139
  • 5
  • 38
  • 50
1
vote
0 answers

Difference in serialization of .NET ScriptService when using POST vs GET?

I am calling a method in a [ScripService] from the client side (JS). When I use POST to make the call, everything works fine. But when I use GET this error is thrown: There was an error reflecting type ... Cannot serialize member xxx of type…
cvenam
  • 11
  • 2
0
votes
1 answer

WebService/ScriptService not found; System.Web.Extensions not recognized

I've created a scriptservice in my vb.net 4.0 web app (or web site... not sure which it is - does it matter?) because I want to call it from the client side. I get client errors saying my namespace is not recognized (HomepageService in the code…
pabrams
  • 1,157
  • 10
  • 34
0
votes
2 answers

allow cross-domain requests to ASP.NET ScriptService

I've got a ASP.NET Webservice up and running using the [ScriptService] Attribute. From what I've read from this article: http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx ASP.NET…
Dynalon
  • 6,577
  • 10
  • 54
  • 84
0
votes
0 answers

dblclick SelectionInput card script services

Double clicking a selection input checkbox only triggers the "setOnChangeAction('functionName')" once but it will update the card UI checkbox appropriately; If the box is checked and then it is double clicked the box will visually appear checked but…
kunuva
  • 1
  • 1
  • 1
0
votes
2 answers

JSON response doesn't contain "d" Anymore!!! asp.net 4.5

I have a question, we are converting asp.net 3.5 to asp.net 4.5 during this - we had many problems but now... we finally got it too load up now i am having strange behaviour in JSON responses from services they don't contain "d" anymore! {d:…
Rizwan Ahmed
  • 470
  • 1
  • 5
  • 10