In this article you will learn
how to deploy and publish a Web service.
Before you deploy a Web service, you must
make sure that the Web service specifies a
unique XML namespace. This name-space is used
within the Web service WSDL document to
uniquely identify the callable entry points
of the service.Initially we set as
http://tempuri.org/ .Now we need to change,
with ours custom domain name.
For Updating namespace,
Step 1:Open the SampleService.asmx file in text editor.
Step 2:Add the WebService attribute along with the
Namespace property (using the appropriate
language syntax) and set it to the appropriate
value.
[WebService(Namespace="http://mydomain.com/SampleService/")]
public class SampleService: WebService{
// implementation
}
For Deploying Web service to Web server we need to
copy the following files.
Servicename.asmx–>The Web service entry point file.
The folder containing this file should be configured
as a Web application directory in IIS.
Global.asax –>The ASP.NET application startup file.
Web.Config –>The ASP.NET application configuration file.
Servicename.dll –> The Web service assembly that
contains the implementation classes for the Web
service as well as any dependent assemblies
not a part of the .NET Framework.
We can use the following methods to deploy the
Web service.
Visual Studio Web Setup Project
Visual Studio Project Copy
DOS XCOPY command
Visual Studio Web Setup Project:
Web setup involves the following steps,
Create a Web Setup Project using the Web Setup
Project template in Visual Studio.
Build the project.
Copy the installation package to the target Web server.
Run the installation package on the target Web server.
Visual Studio Project Copy:
The following are the three options available for copying files:
Only Files Needed To Run This Application: Copies all DLLs with
references in the /bin folder as well as any files marked
with a BuildAction of Content.
All Project Files: Copies all project files created
and managed by Visual Studio.
All Files In The Source Project Folder: Copies all Visual
Studio project files as well as other files that reside
in the project folders.
The default option is to copy only the files needed
to run the application.
XCOPY:
Xcopy is dos command,for utilizing Xcopy just type in
XCOPY /? in command prompt,you can find all related
details about XCOPY.
Publishing Web Services:
Publishing a Web service enables potential consumers
to locate and interrogate service descriptions that
instruct the consumer on how to interact with the Web
service. The process of locating and interrogating Web
service descriptions is referred to as the discovery process.
The following are the two methods for enabling discovery
of a Web service:
DISCO
UDDI
You may choose to use one or both of these methods based
on the consumer audience you are trying to reach.
If your consumer population is fairly small
(or well known), you could simply point them
to the target Web server and deploy the
DISCO file on this server. In this case,
the consumers will invoke the discovery process
against the URL of the target server and locate
your Web service description. In this situation,
you only need to deploy your DISCO documents
to the proper server and inform the consumers of
the URL to the server.
On the other hand, if your consumer population
is relatively large or unknown (in which case
it is impractical to provide them with a pointer
to the target Web server where the service is
located), you will need to provide a mechanism
for the consumers to find where your DISCO and/or
Web service descriptions are located, just as
Web users utilize search engines to find Web
pages. In this situation, you will need to
publish your Web service through UDDI.
DISCO:
We need disco.exe for deplying web services.
UDDI:
For using UDDI we need to register our web
service in UDDI.org.Just go to UDDI.org/register.html
for further details,

Hope this helps,
Happy Coding.
I read a article under the same title some time ago, but this articles quality is much, much better. How you do this?
I would appreciate more visual materials, to make your blog more attractive, but your writing style really compensates it. But there is always place for improvement
Hi, i must say fantastic website you have, i stumbled across it in Google. Does you get much traffic?
Superb blog post, I have book marked this internet site so ideally I’ll see much more on this subject in the foreseeable future!