QUE MCAD 70-315 Training Guide: localhost used in code?

C

clintonG

This statement [1] will not compile...

localhost.Customer cust = new localhost.Customer();

The build error description is "The type or namespace name 'localhost'
cannot be found."

I understand the use of the term localhost when not used within
code but when being used within this code to create a web service
that performs a database lookup I have no idea what is going on.
I've tried substituting the machine name to no avail.

The QUE author, Amit Kalani, did not respond to my RFI regarding
this issue.

I'll be studying the MSDN Library regarding "Network Access
Programming Considerations" but meanwhile can somebody help
explain this and perhaps suggest how to resolve?

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/

[1] QUE "Developing and Implementing Web Applications with
Visual C# .NET and Visual Studio.NET", Guided Practice Exercise,
Page 638, Step 12.
 
N

Nicholas Paldino [.NET/C# MVP]

Clinton,

It looks like you do not have a reference set to the assembly that
contains the localhost.Customer type. Could that be the case?

Hope this helps.
 
C

clintonG

Hi Nicholas,

Yes, I do have a Web Reference created. Checking its properties
shows the following properties...

URL http://localhost/70315QUE/Northwind/Web
References/GetNorthwindCustomers/


Web Reference URL: http://localhost/70315QUE/Northwind/Customer.asmx


This is going to be sticky to discuss if not familiar with the context of
the
exercise. I'll do the entire exercise all over again to make sure it is not
due
to other user errors. As if ;-)

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/





Nicholas Paldino said:
Clinton,

It looks like you do not have a reference set to the assembly that
contains the localhost.Customer type. Could that be the case?

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

This statement [1] will not compile...

localhost.Customer cust = new localhost.Customer();

The build error description is "The type or namespace name 'localhost'
cannot be found."

I understand the use of the term localhost when not used within
code but when being used within this code to create a web service
that performs a database lookup I have no idea what is going on.
I've tried substituting the machine name to no avail.

The QUE author, Amit Kalani, did not respond to my RFI regarding
this issue.

I'll be studying the MSDN Library regarding "Network Access
Programming Considerations" but meanwhile can somebody help
explain this and perhaps suggest how to resolve?

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/

[1] QUE "Developing and Implementing Web Applications with
Visual C# .NET and Visual Studio.NET", Guided Practice Exercise,
Page 638, Step 12.
 
C

clintonG

Doing the exercise over produced the same build errors.

<%= Clinton Gallagher

clintonG said:
Hi Nicholas,

Yes, I do have a Web Reference created. Checking its properties
shows the following properties...

URL http://localhost/70315QUE/Northwind/Web
References/GetNorthwindCustomers/


Web Reference URL: http://localhost/70315QUE/Northwind/Customer.asmx


This is going to be sticky to discuss if not familiar with the context of
the
exercise. I'll do the entire exercise all over again to make sure it is not
due
to other user errors. As if ;-)

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/





message news:#[email protected]...
Clinton,

It looks like you do not have a reference set to the assembly that
contains the localhost.Customer type. Could that be the case?

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

This statement [1] will not compile...

localhost.Customer cust = new localhost.Customer();

The build error description is "The type or namespace name 'localhost'
cannot be found."

I understand the use of the term localhost when not used within
code but when being used within this code to create a web service
that performs a database lookup I have no idea what is going on.
I've tried substituting the machine name to no avail.

The QUE author, Amit Kalani, did not respond to my RFI regarding
this issue.

I'll be studying the MSDN Library regarding "Network Access
Programming Considerations" but meanwhile can somebody help
explain this and perhaps suggest how to resolve?

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/

[1] QUE "Developing and Implementing Web Applications with
Visual C# .NET and Visual Studio.NET", Guided Practice Exercise,
Page 638, Step 12.
 
A

Amit Kalani

Hi Clinton:

In the Add Web Reference dialog box, one of the field is
"Web reference name:". This defaults to the name of the Web server
in the "URL" field of the same dialog box.

In your message, you mentioned that the URL property of the Web Reference is
set to the following:

http://localhost/70315QUE/Northwind/WebReferences/GetNorthwindCustomers/

This indicates that in the "Web reference name:" field above, you entered
GetNorthwindCustomers instead of the
default choice localhost presented by Visual Studio .NET.

This is fine too. However, you need to modify your code. That is, use:

GetNorthwindCustomers.Customer cust = new GetNorthwindCustomers.Customer();

rather than:

localhost.Customer cust = new localhost.Customer();

I hope this helps,

Amit Kalani
http://www.techcontent.com



clintonG said:
Hi Nicholas,

Yes, I do have a Web Reference created. Checking its properties
shows the following properties...

URL http://localhost/70315QUE/Northwind/Web
References/GetNorthwindCustomers/


Web Reference URL: http://localhost/70315QUE/Northwind/Customer.asmx


This is going to be sticky to discuss if not familiar with the context of
the
exercise. I'll do the entire exercise all over again to make sure it is not
due
to other user errors. As if ;-)

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/





message news:#[email protected]...
Clinton,

It looks like you do not have a reference set to the assembly that
contains the localhost.Customer type. Could that be the case?

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

This statement [1] will not compile...

localhost.Customer cust = new localhost.Customer();

The build error description is "The type or namespace name 'localhost'
cannot be found."

I understand the use of the term localhost when not used within
code but when being used within this code to create a web service
that performs a database lookup I have no idea what is going on.
I've tried substituting the machine name to no avail.

The QUE author, Amit Kalani, did not respond to my RFI regarding
this issue.

I'll be studying the MSDN Library regarding "Network Access
Programming Considerations" but meanwhile can somebody help
explain this and perhaps suggest how to resolve?

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET (e-mail address removed)
URL http://www.metromilwaukee.com/clintongallagher/

[1] QUE "Developing and Implementing Web Applications with
Visual C# .NET and Visual Studio.NET", Guided Practice Exercise,
Page 638, Step 12.
 

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