Deploy web services

Nikko

Member
Joined
Aug 11, 2003
Messages
11
Hello,

Im new to web services and I just want to know what I need to deploy web services.

My web services will be write in VB.NET, C# or Java.

Thx
 
What exactly are you trying to do?

In VS.Net, you just need to create a Web Service Project in whatever language you are working in. From there, youll probably want to change the .asmx file to something meaningful as well as change the Namespace from tempuri.org to your server or domain name.

From there, just add some Web-Methods to the class (by default, theres a hello world function you can play around with). Try to uncomment that, and compile the project. You should be able to set a web-reference to that project from another project (asp.net or win-forms, etc) and call the HelloWorld method and return a string to the caller.

Let me know if you want more detail or a specific scenario youre working on.
 
In that case, once you have tested everything locally, you can use the "Copy Project" button in the Solution Explorer to deploy to another server, use XCopy, or create a setup project for your installation (depending on your permissions on the server).
 
Ok thanks a lot.

But to run the web service (not on localhost), I must set it on a server web?
On this server, I must install the framework .net ?
 
Sorry to skip that, but yes, youd have to have the .Net framework installed on the server. I just made the (incorrect) assumption that this was already the case.
And secondly, yes, your web service must reside on some sort of web server (IIS, etc).
 
Hi mocella,

You were saying the namespace needs to be changed from tempuri.org to servers name or domain name. I presumed the servers name means machine name. Am I right?

Im currently trying out web services and I encountered a problem while trying to consume a web service on a remote machine. I keep getting the error "The proxy settings on this computer are not configured correctly for web discovery" on my VS IDE when trying to add web reference.

My test setup is quite simple. Ive 2 machines connected up using crossed LAN cable. No domain, just workgroup. Ive built a simple web service that return a string on one machine. The web service got deployed to the IIS by itself when I compiled the project. On the other machine, I tried building an application by adding a web reference.

Is there something else Ive overlooked?

Thanks,
chew

Originally posted by mocella
What exactly are you trying to do?

In VS.Net, you just need to create a Web Service Project in whatever language you are working in. From there, youll probably want to change the .asmx file to something meaningful as well as change the Namespace from tempuri.org to your server or domain name.

From there, just add some Web-Methods to the class (by default, theres a hello world function you can play around with). Try to uncomment that, and compile the project. You should be able to set a web-reference to that project from another project (asp.net or win-forms, etc) and call the HelloWorld method and return a string to the caller.

Let me know if you want more detail or a specific scenario youre working on.
 
To answer your first question, yes, you can just change tempuri.org to your server name where you host your web-service. In all actuality though, you can leave it as tempuri.org, but thats not a good practice if youre planning to deploy this to a production application at some point.

As for your second item, Im not really sure why youre getting this. Perhaps because of the way youre setting up the network with just a piece of CAT5 between the two boxes. Does everything else work from a network perspective: drive-shares, etc?

A quick search of MDSN for your error message gave this article, but Im not sure that this relates to your situation, but check it out:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vs_e_mustspecifyproxyserver.asp
 
Thanks mocella. Ive got it fixed by adding the following lines to the web.config file.

<webServices>
<protocols>
<add name="HttpPost"/>
<add name="HttpGet"/>
</protocols>
</webServices>

Im not sure what Im doing. Got this solution from another forum. Maybe you can enlighten me. Im wondering why cant visual studio add those lines for me. Do you have article that I can understanding the web.config file better?

Thanks,
chew
 
I cant say Ive ever had to use that particular solution, so Im not sure what thats about. Everything Ive done has been within our corporate Domain, so maybe thats why I have yet to see this.

As for the web.config file, theres tons of stuff out there that you can read and do with this file that go beyond the base set of 5 or 6 that are added by default - stuff like storing sql-connection strings, etc. Try a google search for something like "web.config settings" or "web.config keys" or stuff like that and youll probably be overwhelmed with all the info.
 
Back
Top