Tarea simple como hacer una solicitud AJAX, pasar un parámetro y devolver el resultado, se puede hacer con el servicio web y IHttpHandler, entonces, ¿dónde está la diferencia?Difference asp.net web service and Ihttphandler
Respuesta
Los servicios web ASP.NET son de hecho un tipo de HttpHandler que proporciona una infraestructura de comunicación basada en XML basada en los estándares W3C (SOAP/WSDL). Esto significa que los clientes que no son .NET pueden interoperar con los servicios web de ASP.NET. En su caso en el que hace una simple solicitud ajax simple para devolver un resultado simple, los servicios web ASP.NET/XML pueden ser excesivos.
Puede ser más beneficioso/eficiente implementar un HttpHandler personalizado simple en lugar de invocar todas las tuberías y los gastos generales asociados con los servicios web de ASP.NET. Con un gestor HttpHandler personalizado, puede enviar el parámetro que necesita y devolver exactamente el resultado que desea ver sin el SOAP xml compatible que se crearía al usar servicios web XML.
- 1. Buffer and cache Difference?
- 2. Service Broker And Web services
- 3. AJAX sync and async difference
- 4. Distinctive difference between collect and each?
- 5. Service Layers and Repositories
- 6. WCF Service and Threading
- 7. WCF Service vs ASP.NET Web Api
- 8. android service startService() and bindService()
- 9. Service stack and Mocking, any tutorials?
- 10. SOAP Web Service/VS2010 Add Service Reference
- 11. IHttpHandler vs IHttpModule
- 12. ASP.NET Web Service Results, Proxy Classes y Type Conversion
- 13. WFS (Web Feature Service) para ASP.NET MVC/C#
- 14. wcf json web service
- 15. Web Service wrapper
- 16. .Net Web Service Logging
- 17. Android Web Service Tutorial
- 18. SOA/Web Service Pagination
- 19. Javascript month difference
- 20. KendoUI vs Telerik Architectural Difference
- 21. ASP.NET Web Application (MVC) Deployment Automation and Subversion
- 22. jQuery Validation plugin and ASP.NET validators Web Forms
- 23. Creación de System.Web.UI.Page programáticamente en IHTTPHandler
- 24. Recibir sesión en .NET ASMX web-service
- 25. Web User Controls and Validation
- 26. Mono y IHttpHandler
- 27. "Spring Security" y "Java Authentication and Authorization Service (jaas)"
- 28. PHP true & 'true' difference
- 29. access HttpContext.Current from WCF Web Service
- 30. Service ASP.NET vs capas de repositorio
gracias Kev, ahora es más claro, con servicios web puedo saltar sobre un montón de trabajo que tiene que hacerse si uso IHttpHandler –
Además, si se trata de un servicio AJAX, debe mirar usando JSON en lugar de XML si es posible, ya que es mucho más ligero que XML. –