简体   繁体   English

.NET Web服务与Web服务应用程序之间的区别(不是Web应用程序或WCF服务应用程序)

[英]Difference between .NET Web Service & Web Service Application (NOT Web-Application OR WCF Service App)

Can anyone point me in the direction of resources that explain the difference between the two? 谁能指出我的资源方向来解释两者之间的区别?

They appear to do the same thing but are implemented in a different way.. eg web service application compiles to dll and global.asax.vb compiles into the app, rather than being treated in the same way as a normal web service. 它们似乎做相同的事情,但是以不同的方式实现。例如,Web服务应用程序编译为dll,global.asax.vb编译为应用程序,而不是以与普通Web服务相同的方式处理。

Edit: web-service-application is accessed by adding a project, then selecting web when adding to a solution the other is accessed by adding a "new website" then selecting asp.net web-service 编辑:通过添加项目来访问Web服务应用程序,然后在添加到解决方案中时选择Web,通过添加“新网站”来访问另一个Web服务,然后选择asp.net Web服务

The real difference is like the difference between an ASP.NET Web Application and an ASP.NET Web Site. 真正的区别就像ASP.NET Web应用程序和ASP.NET网站之间的区别。

The Web Application is designed to be a coherent application, and should reside in it's own IIS Application (hence the reason it compiles to a DLL). 该Web应用程序被设计为一个连贯的应用程序,并且应驻留在其自己的IIS应用程序中(因此将其编译为DLL的原因)。 The Web Site is designed to be a standalone web site, and so it is automatically compiled during the first request. 该网站被设计为独立网站,因此在第一个请求期间会自动对其进行编译。 Multiple Web Sites can be deployed to the same directory in IIS without issue. 可以将多个网站毫无问题地部署到IIS中的同一目录。 The other difference is a Web Application has a project file, a Web Site does not use a project file, so everything in the project (references, other code etc.) must be in a known location. 另一个区别是Web应用程序具有项目文件,网站不使用项目文件,因此项目中的所有内容(引用,其他代码等)都必须位于已知位置。

This question is similar to this one - that has a really great answer to this question. 这个问题与类似-对这个问题有非常好的答案。

Not very detailed, but found this , (last post): 不太详细,但是找到 ,(最后发布):

WebService And Web Service Application , both are working in same concept. WebService和Web Service Application都在同一概念中工作。 If you create separate webservice application , you need to reference it ,and it create a proxy object, you can work with webservice through that proxy object. 如果创建单独的Web服务应用程序,则需要对其进行引用,并创建一个代理对象,则可以通过该代理对象使用Web服务。 if you create a webservice within website, you need not to reference it 如果您在网站内创建Web服务,则无需引用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM