我正在尝试将数据发布到Restful服务并收到此错误.任何帮助非常感谢.
Length ='dataStream.Length'引发了类型'System.NotSupportedException'的异常
Position ='dataStream.Position'引发了类型'System.NotSupportedException'的异常
这是代码
[WebMethod]
//public static void Main(string output)
public string webPost()
{
//HttpWebResponse response = null;
string output = null;
// Create a request using a URL that can receive a post.
WebRequest request = WebRequest.Create("https://subscribers");
request.PreAuthenticate = true;
// Set the Method property of the request to POST.
request.Credentials = new NetworkCredential("userid", "password");
request.Method = WebRequestMethods.Http.Post;
string EmailAddress = "test@test1.com";
string FirstName = "first";
string LastName = "Last";
StringBuilder Efulfill = new StringBuilder();
Efulfill.Append("EmailAddress" + …Run Code Online (Sandbox Code Playgroud)