webhost中的localhost用法 [英] localhost usage in web service

查看:66
本文介绍了webhost中的localhost用法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在执行 http: //suppor.microsoft.com/kb/308359

测试示例Web服务应用程序。但是,以下行给出了一个

编译错误:


localhost.Service1 xxx = new localhost.Service1();

编译器无法识别
localhost。

解决方案

我相信localhost是您为Web引用提供的名称当你

添加参考。它可能是任何东西


杰夫


" rkbnair" < rk ***** @ community.nospamwrote in message

news:97 ************************* ********* @ microsof t.com ...


>

我正在执行给出的步骤 http://suppor.microsoft.com/kb/308359

for

测试示例Web服务应用程序。但是,以下行

给出了一个

编译错误:


localhost.Service1 xxx = new localhost.Service1();

编译器无法识别
localhost。



您好rkbnair,


正如Jeff所提到的,在示例中localhost只是一个命名空间,当您将webservice引用添加到项目中时,确定
。它可以像其他任何价值一样定制
。对于你的情况,你有没有?b $ b为它指定一个不同的命名空间?要验证这一点,您可以:


1.在项目中打开classview以查找webservice代理类和

查看它的名称空间是什么/>

2.从WebReference中找到webservice代理类。解决方案中的节点

资源管理器并查看它。


此致,


Steven Cheng


Microsoft MSDN在线支持主管


=========================== =======================

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx


==================================== ==============

此帖子按原样提供。没有保证,也没有赋予任何权利。


--------------------


>来自:=?Utf-8?B?cmtibmFpcg ==?=< rk ***** @ community.nospam>
主题:网络服务中的localhost用法
日期:2007年12月6日星期四14:24:01 -0800


>

我正在执行 http://suppor.microsoft.com/kb/308359 中给出的步骤



for


>测试示例Web服务应用程序。但是,以下行



给出


>编译错误:

localhost.Service1 xxx = new localhost.Service1();

编译器无法识别localhost。




我检查了下面给出的名称。


ConsoleApplication1.ServiceReference1 myMathService = new

ConsoleApplication1.ServiceReference1 ();


现在错误如下:


ConsoleApplication1.ServiceReference1''是一个''命名空间'',但是用得像a

''类型''

测试

" Steven Cheng [MSFT]"写道:


嗨rkbnair,


正如Jeff所提到的,在示例中localhost只是一个命名空间,当您将webservice引用添加到项目中时,确定
。它可以像其他任何价值一样定制
。对于你的情况,你有没有?b $ b为它指定一个不同的命名空间?要验证这一点,您可以:


1.在项目中打开classview以查找webservice代理类和

查看它的名称空间是什么/>

2.从WebReference中找到webservice代理类。解决方案中的节点

资源管理器并查看它。


此致,


Steven Cheng


Microsoft MSDN在线支持主管


=========================== =======================

通过电子邮件收到我的帖子通知?请参阅
http://msdn.microsoft .com / subscripti ... ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务是针对非紧急问题

如果社区或微软支持人员在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

Microsoft客户支持服务(CSS)处理
href =http://msdn.microsoft.com/subscriptions/support/default.aspx\"target =_ blank> http://msdn.microsoft.com/subscripti...t/default.aspx


==================================== ==============


此帖子按原样提供。没有保证,也没有赋予任何权利。


--------------------


来自:=?Utf-8?B?cmtibmFpcg ==?=< rk ***** @ community.nospam>

主题:web服务中的localhost用法

日期:2007年12月6日星期四14:24:01 -0800




我正在执行 http://suppor.microsoft.com/kb/308359中给出的步骤



for


测试示例Web服务应用程序。但是,以下行



给出


编译错误:


localhost.Service1 xxx = new localhost.Service1();


编译器无法识别localhost。




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.

解决方案

I believe localhost is the name that you give to the web reference when you
Add Reference. It could be anything

Jeff

"rkbnair" <rk*****@community.nospamwrote in message
news:97**********************************@microsof t.com...

>
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.



Hi rkbnair,

As Jeff has mentioned, in the example "localhost" is just a namespace which
is determined when you add the webservice reference into your project. It
could be customized as any other value. For your case, have you ever
specify a different namespace for it? To verify this you can either:

1. open classview in your project to find the webservice proxy class and
see what''s its namespace

2. find the webservice proxy class from the "WebReference" node in solution
explorer and check it.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>From: =?Utf-8?B?cmtibmFpcg==?= <rk*****@community.nospam>
Subject: localhost usage in web service
Date: Thu, 6 Dec 2007 14:24:01 -0800

>

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.



I checked the name which is as given below.

ConsoleApplication1.ServiceReference1 myMathService = new
ConsoleApplication1.ServiceReference1();

Now the error is as follows:

ConsoleApplication1.ServiceReference1'' is a ''namespace'' but is used like a
''type''
test
"Steven Cheng[MSFT]" wrote:

Hi rkbnair,

As Jeff has mentioned, in the example "localhost" is just a namespace which
is determined when you add the webservice reference into your project. It
could be customized as any other value. For your case, have you ever
specify a different namespace for it? To verify this you can either:

1. open classview in your project to find the webservice proxy class and
see what''s its namespace

2. find the webservice proxy class from the "WebReference" node in solution
explorer and check it.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

From: =?Utf-8?B?cmtibmFpcg==?= <rk*****@community.nospam>
Subject: localhost usage in web service
Date: Thu, 6 Dec 2007 14:24:01 -0800



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.



这篇关于webhost中的localhost用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆