I'm using jQuery to post to an ASP .NET Web Service to implement a custom auto-complete function. The code works great, except it's slow in FireFox (can't get it to go faster than 1 second). IE is blazing fast - works great. I watch the post in Firefox using Firebug.
Here's the service code:
<ScriptService(), _
WebService(Namespace:="h...
how can i create an singleton asmx webservice ? (please don't say use WCF and WWF :D )
...
I need to limit access of an .asmx web service to specific IP addresses. I figure I could add a hardcoded check into each method, but that seems like a code maintenance nightmare. Is there a web configuration entry I can make, or a IIS 6 setting I can apply to the .asmx file?
...
I have been happy serializing with javascript objects into JSON using
JSON.stringify
And sending along to my "static" webmethod in c#/asp.net and sure enought it arrives .. I need the correct number of parameters hence if my json object has "startDate","endDate","reserve" then my webmethod needs these as parameters.
"Basica...
Hi here I'm trying to call a [webmethod] on bodyunload method.
But it is getting fired on page load itself only. How do i prevent it?
Here's the code I am using:
[WebMethod]
public static void AbandonSession()
{
HttpContext.Current.Session.Abandon();
}
<script language="javascript" type="text/javascript">
//<![CDATA[
function H...
Hi all,
I have a webservice with a bunch of methods that i'd like to somewhat secure.
The data is not really all that confidential, but i'd still like to restrict access to only those who use a certain user id and password that's stored in the webservices web.config file. A c# windows service client will be calling this webservice once ...
Say I have a web service that works with a database. Each method opens the database, and then of course closes it on exit.
Is there any method to move the open/close code outside the web method itself? Something like OnBeforeWebMethodCalled / OnAfterWebMethodCalled.
So instead of
[WebMethod]
public void Hello()
{
OpenDatabase();
...
I'm doing some pre-processing of an XML document in a .NET Webservice (Standard .NET SOAP Service) for eventual use in a Silverlight front end.
I'm processing that XML document into a POCO object for ease of use. The object is defined as follows:
public class CACDocument : ITextDocument
{
#region Properties
public string Title...
I'm very new to .NET. All I've done so far is implement some SQL Stored Procedure calls as WebServices by copying and pasting existing code (as instructed by my superior).
I am calling some commands via Database.ExecuteNonQuery(). In the SQL Stored Procedure, I am performing some security checks based on the LoginId passed in (a user ca...
Right now I am working on a stub of a project. In the course of the project I need to be able to from a web front end set a message on a server to and then from an iPhone Query the Server to read the message.
While all the individual peices are working and my request is going through fine I am having trouble using this webmethod
[Web...
I have an ASP.Net 3.5 application in which I would like to setup some web services for AJAX consumption for ONLY within the application they reside. There is no foreseeable need to expose them to anything beyond the application in which they live. That being said, is there any particular benefit to use WCF over ASMX or viceversa to exp...
I'm trying to test code around a web service that is not available yet. I'm trying to dummy up my own version. According to the specs it will be called like this.
var service = new Service();
service.SD = new ServiceData();
service.SD.ID = "ABC123";
service.SD.Auth = "00000";
string result = service.DoMyThing();
This is the closest ...
I'm setting up my site to receive info from people via text message. The way it works is they text a number, that service then sends an HTTP POST to a url I specify. I've heard that .asmx files are better than .aspx files because they don't go through the whole page lifecycle. However, I don't really understand how to get a .asmx file ru...
I saw a similar question but it did not resolve my issue. I have a JSON web service in an ASMX file;
The code for the web method
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string GetUserRoles(string JSONUserCode)
{
string retRoles = string.Empty;
List...
I have some webservices hosted in a sharepoint environment on a virtual machine. These services are accessible from within the VM, but when I try to invoke this service from my asp.net application on the host machine I get an error with status 500 and a soap fault exception (unauthorized access). The IIS setting on both host and VM all...
I'm trying to have overloaded methods in a web service but I am getting a System.InvalidOperationException when attempting "Add Web Reference" in Visual Studio 2005 (here's the relevant snippets of code):
public class FileService : System.Web.Services.WebService
{
private static readonly MetaData[] EmptyMetaData = new MetaData[0];
...
This seems like a simple question, but I haven't been able to find the answer online via many Google searches. I have a C# web service and, when I visit its ASMX page in the browser, for a particular method it always has the following:
"The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced ...
Hi,
I have to call a .NET web service (http://192 .168.1.14/ CG/authentication.asmx)from the Blackberry Simulator.Already i have done it in Android with KSOAP2, but i have no idea about how to do this in Blackberry.Can i use KSOAP2 in Blackberry?If i can please give some code snippets.Also please tell if you know any other ways to do...
Basically, I have a server-side type "Foo" with members X and Y. Whenever I use Visual Studio's "Add Server Reference" then I see the WSDL and the generated proxy both append the word "Field" to all the members and change the casing of the first letter. IE, "X" and "Y" are renamed "xField" and "yField". Any idea why this is happening? I ...
Duplicate: although this is a good discussion, this is a duplicate of Web Services — WCF vs. Standard. Please consider adding any new information to the earlier question and closing this one.
Could anyone recommend me some documents to describe why WCF is better than legacy ASP.Net web services? I am especially interested in performan...