xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 3KB
    文件類型: .cs
    金幣: 1
    下載: 4 次
    發布日期: 2021-06-02
  • 語言: C#
  • 標簽: post??json??http??webservice??

資源簡介

C#開發webservice接口,對客戶端post服務的Json數據進行接收反饋 接收到的數據流轉換成string類型,有其他需求對json解析,自己寫個解析去查詢下. 然后反饋json發送給請求端。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections;
using?System.Web;
using?System.Web.Services;
using?System.Web.Services.Protocols;
using?System.IO;
using?System.Configuration;
using?System.Data;
using?System.Text;
using?System.Data.Common;
using?System.Web.Security;
using?System.Web.script.Services;
using?System.Web.script.Serialization;
using?System.Runtime.InteropServices;
using?System.Threading;


///?
///WebService?的摘要說明


///?

[WebService(Namespace?=?“http://tempuri.org/“)]
[WebServiceBinding(ConformsTo?=?WsiProfiles.BasicProfile1_1)]
[System.Web.script.Services.scriptService]//不加這句的話當.ajax()請求服務時會有異常:
public?class?WebService?:?System.Web.Services.WebService
{

????public?WebService()
????{
????????//如果使用設計的組件,請取消注釋以下行?
????????//InitializeComponent();?
????}
???
????#region?接口說明:“WebService接口“
????[WebMethod(Description?=?“WebService接口“)]
????public?void?WSInterface()
????{
????????string?jsontext?=?string.Empty;
????????string?jsonReturn?=?string.Empty;
????????try
????????{
???????????Stream?s?=?HttpContext.Current.Request.InputStream;//獲得json?字符流,????
???????????string?usr?=?HttpContext.Current.Request.Headers[“key“];//獲得header?下key的值
????????

評論

共有 條評論