Consumption

T

Thom Little

I wrote a webservice that will be called from websites hosted on seven
different servers.

The test consumer for this application (Consume.aspx) accesses the
information from the web service (CountService.,asmx) correctly.
Consume.aspx was compiled in the same project as CountService.asmx.

What do I have to do to make CountService.asmx available to other
application not compiled with it and perhaps running on servers remote from
it?
 
M

[MSFT]

Hello Thom,

You can open other ASP.NET project in VS .NET IDE, Click Project/Add Web
Reference, and enter the url for your web service. VS. NET will add a web
reference to the project and genrate a proxy class. Also the url can be
dynamic and you can specify other url in code like:

service.Url="http://myserver/myapp/CountService.,asmx"

Hope this help,

Luke
 
M

Manohar Kamath

First of all, I would separate them into two different projects -- since
they are logically separate. This will also help you deploy the web service
by itself. To deploy, you could compile the web service project, and do an
xcopy (minus the .cs files).
 
T

Thom Little

Thank you both. I am, once again, thrashing.

I created separate projects for the service and the consumer.

In the consumer I added a web reference for the service.

The consumer simply has ...

string strRequest = "http://www.tlatla.net/index.asp" ;
CountServices csWork = new localhost.CountServices( );
lblResult.Text = strRequest + " <> " + csWork.Count( strRequest ) ;

Passing a string and returning a string.

I get a not found error on the Count.Services statement and am too ill
educated to correct it. Can you point me (again) in the right direction.
Perhaps you can recommend an article that documents simple sting consumption
in C#?
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top