WebMethod()就是这个鼻子 [英] WebMethod() is this nasasary

查看:151
本文介绍了WebMethod()就是这个鼻子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名ASP开发人员,只是习惯了asp.net。我必须说作为前任

评论家我真的开始喜欢asp.net

我刚刚做了一些网络服务,


当您创建新的Web服务时,它已经将此标记设置为默认值

函数

< WebMethod()> _


这是什么,是否有必要,如果它高于所有功能,所有公共

功能只是第一个还是我可以删除它? />

解决方案

Hello Slim,


此属性标记您通过WSDL和导出方法可见的方法

给客户打电话


S>我是一名ASP开发人员,只是习惯了asp.net。我必须说是

S>前

S>评论家我真的开始喜欢asp.net

S>我刚刚制作了一些网络服务,

S>当您创建新的Web服务时,它已经在

S>之上。默认

S>功能

S> <的WebMethod()> _

S>这是什么,是否有必要,如果它超越所有功能,那么所有

S>公共功能只是第一个还是可以删除它?

S>

---

WBR,

Michael Nemtsev ::博客: http://spaces.msn.com/laflour


有时一个人仍然忠于某一事业,只因为它的对手不支持b $ b不再是平淡无奇的。 (c)Friedrich Nietzsche


您必须拥有您希望能够访问的Web服务方法

通过标记的Web服务方法调用有这个属性。没有它,

方法只能通过Web服务中的代码调用,而不能通过Web服务的

调用者调用。

"超薄" < me@here.com>在消息中写道

news:uo ************** @ TK2MSFTNGP02.phx.gbl ...

我是一名ASP开发人员,只是习惯了asp.net。我必须说作为前评论家我真的开始喜欢asp.net
我刚刚创建了一些web服务,

当你创建一个新的Web服务时它已经在
默认函数
< WebMethod()>上面有此标记_

这是什么,是否有必要,如果它首先是所有功能,所有公共功能只是第一个还是我可以删除它?



另外......你为什么以前是ASP.NET的评论家?多年来我一直是经典的ASP

开发人员,并且不能等待ASP.NET出来(2002年2月)。

之间没有比较二。没有任何东西

经典ASP提供的ASP.NET不能更好,更快或更容易。

" Slim" < me@here.com>在消息中写道

news:uo ************** @ TK2MSFTNGP02.phx.gbl ...

我是一名ASP开发人员,只是习惯了asp.net。我必须说作为前评论家我真的开始喜欢asp.net
我刚刚创建了一些web服务,

当你创建一个新的Web服务时它已经在
默认函数
< WebMethod()>上面有此标记_

这是什么,是否有必要,如果它首先是所有功能,所有公共功能只是第一个还是我可以删除它?



I am a ASP developer, just getting used to asp.net. I must say as a former
critic I''m really starting to like asp.net
I have just made some webservices,

when you create a new web service it already has this tag above the default
function
<WebMethod()> _

what is this, is it necessary, should it be above all functions, all public
function just the first or can I delete it?

解决方案

Hello Slim,

This attribute mark you method being visible via WSDL and exported method
to the client to be called

S> I am a ASP developer, just getting used to asp.net. I must say as a
S> former
S> critic I''m really starting to like asp.net
S> I have just made some webservices,
S> when you create a new web service it already has this tag above the
S> default
S> function
S> <WebMethod()> _
S> what is this, is it necessary, should it be above all functions, all
S> public function just the first or can I delete it?
S>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


You must have methods of your web service that you wish to be able to access
via web service method calls marked with this attribute. Without it, the
method can only be called by code within the web service, but not by the
caller of the web service.
"Slim" <me@here.com> wrote in message
news:uo**************@TK2MSFTNGP02.phx.gbl...

I am a ASP developer, just getting used to asp.net. I must say as a former
critic I''m really starting to like asp.net
I have just made some webservices,

when you create a new web service it already has this tag above the
default function
<WebMethod()> _

what is this, is it necessary, should it be above all functions, all
public function just the first or can I delete it?



Also...Why were you a former critic of ASP.NET? I was a Classic ASP
developer for years and couldn''t wait for ASP.NET to come out (2/2002).
There is just no comparison between the two. There isn''t anything that
Classic ASP offers that ASP.NET can''t do beter, faster or easier.
"Slim" <me@here.com> wrote in message
news:uo**************@TK2MSFTNGP02.phx.gbl...

I am a ASP developer, just getting used to asp.net. I must say as a former
critic I''m really starting to like asp.net
I have just made some webservices,

when you create a new web service it already has this tag above the
default function
<WebMethod()> _

what is this, is it necessary, should it be above all functions, all
public function just the first or can I delete it?



这篇关于WebMethod()就是这个鼻子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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