简体   繁体   English

如何在使用c#web服务时返回标准名称=值

[英]How do I return a standard name=value while using c# web service

I am creating a few basic web services using c#, and I am trying to have the web service return back just a normal name=value&name=value without any kind of xml or json format. 我正在使用c#创建一些基本的Web服务,我试图让Web服务返回一个普通的name = value&name = value,而不使用任何类型的xml或json格式。 The legacy system hitting these services is fairly old and doesn't support xml or json. 使用这些服务的遗留系统相当陈旧,不支持xml或json。 Is doing this possible? 这样做有可能吗?

If the legacy service that's targeting this web service is that old, how exactly are you calling the web service from it? 如果针对此Web服务的旧服务是旧的,您究竟是如何从中调用Web服务的? It may be easier to create an .aspx page (or even better, .ashx) that parses the request and makes the response simply using Response.Write. 创建一个解析请求并使用Response.Write简单响应的.aspx页面(甚至更好的.ashx)可能更容易。

If you update your question/add a comment with the detail about how you're calling the service, I'll update my answer accordingly =) 如果你更新你的问题/添加评论,详细说明你如何调用该服务,我会相应地更新我的答案=)

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

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