I have a bunch of .NET Webservices running in one IIS Application. These webservices are consumed by another IIS Application (frontend). The first call is pretty slow, about
I recently discovered that in our ASMX-files we only referred to the class name. We got the service implementation in a different assembly for each ASMX-file. This causes .NET framework to scan through the entire bin-folder looking for the assembly containing the implementation. As your webservice application grows this will consume more time. This can be solved by not only including the class name in your ASMX definition but also the assembly name.
Our ASMX looked like this:
<%@ WebService Language=”C#” CodeBehind=”MyService.cs” Class=”MyWebservice” %>
If you change it to include the assembly that contains the implementation it would look like this. This saved us around 10% of our initial load of the webservice application.
<%@ WebService Language=”C#” CodeBehind=”MyService.cs” Class=”MyWebservice, MyWebservice.Implementation.Assembly” %>