小编Sre*_*nth的帖子

状态500:调用WCF时System.ServiceModel.ServiceActivationException

我试图从Android客户端发送一个字符串到.NET服务器.以下是服务器端代码: - IService1.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WcfImageUpload
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        [WebInvoke(UriTemplate = "/JsonData",
                RequestFormat  = WebMessageFormat.Json,
                ResponseFormat = WebMessageFormat.Json, Method = "POST",
                BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        JsonString SendData(JsonString JsonImage);

        // TODO: Add your service operations here
    }

    // Use a …
Run Code Online (Sandbox Code Playgroud)

.net wcf

6
推荐指数
1
解决办法
3万
查看次数

webHttp Vs enableWebScript,应该用于WCF REST POST请求吗?

WCF中的webHttp和enableWebScript有什么区别?我应该将哪个用于WCF REST POST请求?

.net wcf

5
推荐指数
1
解决办法
3936
查看次数

标签 统计

.net ×2

wcf ×2