Deploying Web service

B

Bryan Dickerson

NEWBIE WARNING:

I have a VB.Net web service that is working fine on my PC, but I need to
deploy it on a server in our network. What's the easiest way to do this?
 
P

Peter Kelcey

Add a web deployment project to your solution and use it to deploy the
web service to your server.

Peter Kelcey
 
B

Bryan Dickerson

Thanx for your help--that gets me started, but, if you'd indulge me, I have
some more questions...

How do I know where to tell it to install? How many levels of dependencies
will the setup package create (one of the References to the WS has a
Reference to another Assembly that I created)?

Once I get the WS installed, how do I know how to reference it from another
program (this WS will be called from a third party product--all internal to
the server box)?
 
P

Peter Kelcey

Bryan,

My comments below all assume you are using Visual Studio 2002 or 2003.

By default, the installation package will install you web service to
the default website in IIS. The installation routine will give your
user the option of specifying a virtual directory within this web site.
Here are the steps for setting the default value of this virtual
directory.
1) Right click the web setup project and select "VIEW->FILE SYSTEM"
2) From the new screen that opens click on the folder labeled "Web
Application Folder"
3) In the visual studio properties window, you will see all the
properties for your installation (i.e. virtual) directory.
What I like to do for my installations, is setup the physical directory
and virtual directory prior to installation. I.e. I create my physical
folder first. D:\web projects\mywebserviceproject\ Then, in IIS, I
create my new virtual directory and point it to this physical folder.
Then when someone runs my installation routine they install to my new
virtual directory and everything goes where I want it to.

When you create your web setup project, you will need to tell it what
you want it to install. To do this, right click on the project and
select the "ADD->PROJECT OUTPUT" option from the pop-up menu. Using the
project drop down box, select your web services project. The setup
project. Next, select the content that you need installed from the
listbox just underneath the drop down list. If you select "primary
output" and "content files" then you assemblies, asmx files and all
other primary content files will automatically be included. Any other
assemblies that your project references will be considered primary
output for the project and will be included. Any dependencies that your
project have (such as the .NET runtime will also be included). Within
the setup project, you will be able to see what assemblies have been
included by looking in the "detected dependencies" folder
Selecting "Source Files" will include your actual code files (I don't
recommend this.) "Debug" will include your .PDB debug files (I don't
recommend this either). "Localized Resources" will include your resx
resource files.

As for accessing your web service, you just need the URL of the virtual
directory. Example, if you installed it to a machine called
"Server1" and into a virtual directory called "Service1" you
can access you service at
http://Server1/Service1/webservicepagename.asmx This is the URL you
would need to give to your third party. To access the WSDL description
of you web service you use the same URL, but add the ?WSDL to the end.
http://Server1/Service1/webservicepagename.asmx?wsdl

I'd recommend checking out the MSDN documents on deployment projects
at
http://msdn.microsoft.com/library/d.../vsintro7/html/vbconDeploymentOverNetwork.asp
The pages don't have a ton of information on them, but they are an
okay starting place for information. You can do a lot more stuff with
setup packages than I've mentioned here (and there are other
deployment options), so I'd and reading as much documentation as you
can and experimenting to find out what works for you.

Hope that helps

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top