Hi all,
I've been doing web service development for a year, with a break for the
last few months. What I remember is how easy it is to reference a web
service using Visual Studio.
So today, I go into a project that I'm working on, let's call it Project A.
I choose to add a web reference, and in the dialog that pops up I put
"http://localhost/PingListener/Service1.asmx", and then hit the Add
Reference button. A reference gets added with the folder localhost1 in the
Solution Explorer.
So far so good. But now, when I try to compile this line in my C# program:
localhost1.Serv ice1 svc = new localhost1.Serv ice1();
I get this error:
C:\Documents and Settings\user\M y Documents\Visua l Studio
Projects\Health Mon\ReportHealt h.cs(37): The type or namespace name
'localhost1' could not be found (are you missing a using directive or an
assembly reference?)
I've gone back and checked another project which uses the same web service.
It has exactly the same reference, and it works fine. The only difference I
can detect is that the other project doesn't use source code control -- but
I do have every source file checked out in Project A. I've also noticed that
in Project A, if I type the name of the enclosing namespace followed by
period, I do *not* see localhost1 as a choice, but I *do* see it in the
other project.
Any ideas? Thanks in advance --
Steve Harclerode 2 3087
I'd start with opening up the Class view and making sure you were
importing the correct namespace. Although the reference is
automatically added to the solution, the correct using statement is
not automatically added to your class.
This is a feature that VS.Net could take out of IntelliJ's IDEA
product and really save C# developers some time.
~harris
"Steve Harclerode" <Li************ ****@hot-mail.com> wrote in message news:<OM******* *******@TK2MSFT NGP10.phx.gbl>. .. Hi all,
I've been doing web service development for a year, with a break for the last few months. What I remember is how easy it is to reference a web service using Visual Studio.
So today, I go into a project that I'm working on, let's call it Project A. I choose to add a web reference, and in the dialog that pops up I put "http://localhost/PingListener/Service1.asmx", and then hit the Add Reference button. A reference gets added with the folder localhost1 in the Solution Explorer.
So far so good. But now, when I try to compile this line in my C# program:
localhost1.Serv ice1 svc = new localhost1.Serv ice1();
I get this error:
C:\Documents and Settings\user\M y Documents\Visua l Studio Projects\Health Mon\ReportHealt h.cs(37): The type or namespace name 'localhost1' could not be found (are you missing a using directive or an assembly reference?)
I've gone back and checked another project which uses the same web service. It has exactly the same reference, and it works fine. The only difference I can detect is that the other project doesn't use source code control -- but I do have every source file checked out in Project A. I've also noticed that in Project A, if I type the name of the enclosing namespace followed by period, I do *not* see localhost1 as a choice, but I *do* see it in the other project.
Any ideas? Thanks in advance --
Steve Harclerode
Wow, you nailed the problem! Thanks.
Basically, for some reason I tried to use a namespace that was something
like "Company.Projec t", but my reference got put into a namespace that is
just "Project".
- Steve Harclerode
"Harris" <mh********@mai l.com> wrote in message
news:7d******** *************** ***@posting.goo gle.com... I'd start with opening up the Class view and making sure you were importing the correct namespace. Although the reference is automatically added to the solution, the correct using statement is not automatically added to your class.
This is a feature that VS.Net could take out of IntelliJ's IDEA product and really save C# developers some time.
~harris
"Steve Harclerode" <Li************ ****@hot-mail.com> wrote in message
news:<OM******* *******@TK2MSFT NGP10.phx.gbl>. .. Hi all,
I've been doing web service development for a year, with a break for the last few months. What I remember is how easy it is to reference a web service using Visual Studio.
So today, I go into a project that I'm working on, let's call it Project
A. I choose to add a web reference, and in the dialog that pops up I put "http://localhost/PingListener/Service1.asmx", and then hit the Add Reference button. A reference gets added with the folder localhost1 in
the Solution Explorer.
So far so good. But now, when I try to compile this line in my C#
program: localhost1.Serv ice1 svc = new localhost1.Serv ice1();
I get this error:
C:\Documents and Settings\user\M y Documents\Visua l Studio Projects\Health Mon\ReportHealt h.cs(37): The type or namespace name 'localhost1' could not be found (are you missing a using directive or an assembly reference?)
I've gone back and checked another project which uses the same web
service. It has exactly the same reference, and it works fine. The only
difference I can detect is that the other project doesn't use source code control --
but I do have every source file checked out in Project A. I've also noticed
that in Project A, if I type the name of the enclosing namespace followed by period, I do *not* see localhost1 as a choice, but I *do* see it in the other project.
Any ideas? Thanks in advance --
Steve Harclerode This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Joe |
last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located.
When trying to add a web reference to a C# project I get an error message
'There was an error downloading 'http://mydomain.com:port/webservice.asmx'
The operation has timed-out
(I've tried with and without using a separate port for the service)
The weird thing is the page does show up on the left side of the screen
listing the available methods but the Add...
|
by: Derek Martin |
last post by:
I am creating a windows service and have added a reference to a DLL project
that I have created. That DLL file is correctly referenced in both a
windows app and a web app, all in the same solution, so I thought I could do
the same for a service project. However, after successfully adding the
reference and making sure the namespaces were correct, I cannot see any of
my public methods and functions from the DLL file.
Is there anything...
|
by: Jerome Cohen |
last post by:
AI am trying to call a third-party web service. this service expects an XML
fragment that contains the request plus other parameter. adding the web
reference created the syntax below(reference.vb).
I changed the data type for the structure that contains the XML data from
the default "String" to "xml.xmldocument" to enable easy filling of the
data.
my client code creates an XML document class, fills the data using standard
xml dom...
|
by: Noam |
last post by:
I had originally written a program as a c# console application. The program
used a reference that I wrote in c++. Later I was told to re-write the
application as a windows service. When the service would start up, as soon as
it accessed the reference (by instantiating a class within the reference),
the service would crash. In the event viewer I saw that it throw a
System.IO.FileNotFoundException saying that the c++ reference was missing...
|
by: Grant Schenck |
last post by:
Hello,
I have a Windows Service developed in C# .NET. I'm making it a remote
server and I can, via an IPC Channel, expose methods and call them from a
client. However, I now want my remoted object to be able to invoke a method
on my server object and given that the object is built in a C# Class DLL
shared between the client and server I'm not sure how to get access to the
server object from the remoted object.
So, what techniques...
| |
by: ssg31415926 |
last post by:
Using VS2005 on my workstation, I've created a web service on an
external 2003 SP1 dev IIS box. From my workstation, I can get a web
reference by pointing it to service.asmx.
I've published it to my production server, by right-clicking on the
project and doing Publish WebSite and, it appears to succeed,
reporting:
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped
==========
========== Publish: 1 succeeded, 0 failed, 0...
|
by: =?Utf-8?B?Q3JhaWc=?= |
last post by:
Background:
I am building a Windows enterprise application that has separate assemblies
for UI, business logic/rules, and data access (i.e. typical N-tier
architecture). Many of the assemblies reference a "name and address web
service," which gives me validation lists for name honorifics (e.g. Dr, Mr,
Miss, Mrs), name suffixes (e.g. Sr, Jr, III), and City/State/ZIP combos. The
same name and address web service also can save and retrieve...
|
by: Mike |
last post by:
I have a web app that is referencing several web services. When I make a change to a web service (add, modify a method), I have to 'Add Web Reference' for the changes to take affect. If I do 'Update web reference' the web app does not see the web service changes.
The web services are on the same box as I'm developing on, the .wsdl files are pointing to the correct location, but the changes aren't happening unless I do 'Add Web Reference'.
...
|
by: =?Utf-8?B?cmtibmFpcg==?= |
last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for
testing a sample web service application. However, the following line gives a
compilation error:
localhost.Service1 xxx = new localhost.Service1();
localhost is not recognized by the compiler.
|
by: cj |
last post by:
Back some time ago I was playing with a little app in VB 2005 that used
a google web service to get search results. I was rebuilding this app
in 2008 today. I added the web service
http://api.google.com/googlesearch.wsdl and then down in the code I was
typing Dim myGoogle As New Google.GoogleSearchService only to find
GoogleSearchService was no longer a method. I looked on google for
documentation and it appears they no longer offer...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |