By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,534 Members | 1,830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,534 IT Pros & Developers. It's quick & easy.

Publishing web service

P: n/a
cj
I'm finally back to trying to write a web service. In VB 2005 I created
a new web site and then ASP.NET Web Service. It opened showing
App_Code/Service.VB with the following code already in it

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://tempuri.org/")_
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicPr ofile1_1)_
<Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated()_
Public Class Service
Inherits System.Web.Services.WebService

<WebMethod()_
Public Function HelloWorld() As String
Return "Hello World"
End Function

End Class

This is a fine starting point. How do I test this? We have a web
server here but I need some steps to compile and put it on the web
server. I've only written windows apps so far. I can write a test
program to use the web service.

Also in my investigation of web services I thought this code was
supposed to be in service.asmx. The only thing in service.asmx is

<%@ WebService Language="vb" CodeBehind="~/App_Code/Service.vb"
Class="Service" %>

What's up with that?
Oct 16 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
cj,

A webservice is in fact a website, you have to set the IIS for that. Have a
look as it is now on your testing computer and use it on the production
server.

Cor

Oct 16 '07 #2

P: n/a
cj
Our production server is currently running and hosting other pages.
What I need to know is what and how do I move a project from the Visual
Studio IDE to the web server.

Cor Ligthert[MVP] wrote:
cj,

A webservice is in fact a website, you have to set the IIS for that.
Have a look as it is now on your testing computer and use it on the
production server.

Cor
Oct 16 '07 #3

P: n/a
Hi Cj,

For ASP.NET/VS 2005 webservice, if you just want to test or debug it, you
can just run it in VS 2005(through the test webserver) and use other client
project to call it. To call webservice, you should generated the webservice
client proxy first. The "Add WebReference" function in VS 2005 can help you
do it:

#How to: Add and Remove Web References
http://msdn2.microsoft.com/en-us/lib...sx(VS.80).aspx

for deploying webservice project to IIS, it is the same as deploying an
ASP.NET web application. You can use the VS 2005 built-in features such as
"Publish Web Site" or "Copy Web Site". You can find "Copy Web Site" menu in
the "WebSite" menu and find "Publish WEb Site" in the "Build" menu(in case
you're currently in a web project). Here are some MSDN reference mentioend
the web application deployment:

#Web Site Deployment in Visual Web Developer
http://msdn2.microsoft.com/en-us/lib...ae(VS.80).aspx

#Walkthrough: Creating an XML Web Service Using Visual Basic or Visual C#
http://msdn2.microsoft.com/en-us/lib...7x(VS.80).aspx

Or you can also do all the stuffs yourself.

** create the virutal directory(mark it as application and set it to the
proper ASP.NET version)

** copy all the webservice project content into it

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>Date: Tue, 16 Oct 2007 13:19:46 -0400
From: cj <cj@nospam.nospam>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: Publishing web service

Our production server is currently running and hosting other pages.
What I need to know is what and how do I move a project from the Visual
Studio IDE to the web server.

Cor Ligthert[MVP] wrote:
>cj,

A webservice is in fact a website, you have to set the IIS for that.
Have a look as it is now on your testing computer and use it on the
production server.

Cor
Oct 17 '07 #4

P: n/a
cj
Thanks

Steven Cheng[MSFT] wrote:
Hi Cj,

For ASP.NET/VS 2005 webservice, if you just want to test or debug it, you
can just run it in VS 2005(through the test webserver) and use other client
project to call it. To call webservice, you should generated the webservice
client proxy first. The "Add WebReference" function in VS 2005 can help you
do it:

#How to: Add and Remove Web References
http://msdn2.microsoft.com/en-us/lib...sx(VS.80).aspx

for deploying webservice project to IIS, it is the same as deploying an
ASP.NET web application. You can use the VS 2005 built-in features such as
"Publish Web Site" or "Copy Web Site". You can find "Copy Web Site" menu in
the "WebSite" menu and find "Publish WEb Site" in the "Build" menu(in case
you're currently in a web project). Here are some MSDN reference mentioend
the web application deployment:

#Web Site Deployment in Visual Web Developer
http://msdn2.microsoft.com/en-us/lib...ae(VS.80).aspx

#Walkthrough: Creating an XML Web Service Using Visual Basic or Visual C#
http://msdn2.microsoft.com/en-us/lib...7x(VS.80).aspx

Or you can also do all the stuffs yourself.

** create the virutal directory(mark it as application and set it to the
proper ASP.NET version)

** copy all the webservice project content into it

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>Date: Tue, 16 Oct 2007 13:19:46 -0400
From: cj <cj@nospam.nospam>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: Publishing web service

Our production server is currently running and hosting other pages.
What I need to know is what and how do I move a project from the Visual
Studio IDE to the web server.

Cor Ligthert[MVP] wrote:
>>cj,

A webservice is in fact a website, you have to set the IIS for that.
Have a look as it is now on your testing computer and use it on the
production server.

Cor
Oct 22 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.