all groups > vj# > march 2004 >
You're in the

vj#

group:

Why insert <%@ webservice language="J#" classname= 'something'


Why insert <%@ webservice language="J#" classname= 'something' Manisha Agarwal
3/18/2004 3:26:06 AM
vj#:
Hi
Why do we insert <%@ webservice language="J#" classname= 'something' in .NET web service page

Thanks
Re: Why insert <%@ webservice language="J#" classname= 'something' Lars-Inge Tønnessen
3/18/2004 2:10:27 PM
This is meta-data for the web server. It tells IIS what language the service
is written in so IIS knows what compiler to run. It also tells IIS the class
name that will respond to client requests.

The syntax is:
<%@ WebService Language="VJ#" Class="yourclass" %>

When you place this line in an asmx file, you don't have to compile the
service up in front. IIS will compile it in runtime when you place it in an
IIS application folder.

The "aspnet_isapi.dll" in the .net framework folder will compile the page
for you in runtime.

If you want to compile the page before you copy it into the IIS (bin
folder), you declare it codebehind in the asax file: (This will make it
harder for your customers to "steal" your code without you knowing it. Eg
Licensing.)

<%@ Application Codebehind="Global.asax.jsl" Inherits="WebServJSharp.Global"
%>

(It's much like an aspx file, if you know ASP.NET.)



Lars-Inge Tønnessen
www.larsinge.com

AddThis Social Bookmark Button