Web Service
Web Service optimization
Call Web Methods Asynchronously
Use ExecuteXmlReader instead of DataSet
String sqlString = "SELECT CustomerID, CompanyName FROM Customers For XML AUTO";
rdr = command.ExecuteXmlReader();
rdr.Read();
while (rdr.ReadState != System.Xml.ReadState.EndOfFile)
{
ret += rdr.ReadOuterXml();
Use Compression
Using SOAP Extensions
Use OneWay Method
[SoapDocumentMethod (OneWay=true)]
[WebMethod]
public string TestMethod()
Using Transactions in Web Services
using System.EnterpriseServices;
public class Bank : WebService
[WebMethod(TransactionOption = TransactionOption.RequiresNew)]
public int DeleteAuthor(string lastName)
//ContextUtil.SetAbort();
}
SOAP, HTTP GET, HTTP Post
Create instances in advance to preload all the referenced assemblies at the beginningEverybody notices that a first call to a Web Service takes more time to execute than the subsequent calls. Why is that? Try to run your application in Debug mode and look at the "Output" window of Visual Studio.
Using pre-authentication
Edit IIS custom error messages