Adding Web Reference

G

Guest

Hi
I am trying to add web reference to my code to use web services . (I am using VS 2003) so I go to add references/ select web reference. After selecting the right web service from my local machine and rename it to something other than local host (aWebService) and then
Adding the cod
sing aWebService

namespace WebClien

/// <summary
/// Summary description for Form1
/// </summary

The Type or namespace 'aWebService' could not be found (are you missing a using directive or an assembly reference?

I can't figure it out what i am doing wrong... any hlep is greatly appreciate
Thank
Lis
 
R

Rahul Anand

-----Original Message-----
Hi,
I am trying to add web reference to my code to use web
services . (I am using VS 2003) so I go to add
references/ select web reference. After selecting the
right web service from my local machine and rename it to
something other than local host (aWebService) and then
Adding the code
sing aWebService;


namespace WebClient
{
/// <summary>
/// Summary description for Form1.
/// </summary>

The Type or namespace 'aWebService' could not be found
(are you missing a using directive or an assembly
reference?)
I can't figure it out what i am doing wrong... any hlep is greatly appreciated
Thanks
Lisa

Hi Lisa,

The web reference you added through VS.NET will be
available under your application namespace.

As your code is under WebClient namespace so you need to
add this statement:

using System.Web.Services;
using WebClient.aWebService;

Or you can directly use the fully qualified names of your
classes under aWebService.

Hope it will help.

Another thing to note if you are coding some ASP.NET
application and your network access is through a firewall:

You may get unexpected runtime errors due to some bug in
VS.NET 2003 when you try to access a WebService. Just
thought it might save hours of debugging if it is the case.
 

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

Top