473,287 Members | 1,399 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Publishing web service

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
4 3469
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: marc.derider | last post by:
I was making a change to a Web service. It was something extremely trivial, such as adding a single parameter to extend the functionality exposed through that method. It got me to thinking...
2
by: postings | last post by:
Hi I work for a small company that publishes a number of paper based newsletters for companies. It also supplies these newsletters as PDF's and sends weekly updates (e-bulletins as we call...
3
by: EqDev | last post by:
Hello I have set up a new windows server 2003 standard edition for training (on new software we have developed) and am having problems publishing webs to it from VS 2005. I have a C# Web...
9
by: Coward 9 | last post by:
HI, I created the simplest "ASP .NET Web Service" by using VS 2005 and Visual C#( File | New | Web Site). However, when I tried to access the service from IE 7.0 ...
11
by: cj | last post by:
Perhaps someone knows how to do this. When I open a new ASP.NET web service application in VS 2008, it opens with a simple Hello World web service already written. I want to see this work. ...
0
by: Jeova Almeida | last post by:
Hello, I created a simple web service for testing purpose in Visual Studio 2005: <%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="WSTest" %> using System;
2
by: Niclas | last post by:
Hi, I have developed a WCF service that I am planning to host with a service provider. After spending some time uploading the service and fiddling around with the .svc file and Web.config, I...
3
by: K Viltersten | last post by:
I published the software i've designed but it seems that since it's designed as a service, i'm not able to use the usual publishing tools in VS05. When i try to install the software, it says i...
1
by: pankajit09 | last post by:
Can you tell me whether license is required for publishing C#.Net Web Service ?
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.