TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashwin Chauhan
1.2k
548
84.2k
how to send multipart/form-data in web services?
Nov 9 2018 11:29 PM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Script.Services;
using System.Web.Services;
using Newtonsoft.Json;
using System.Net;
namespace WebServiceDemo.Api
{
/// <summary>
/// Summary description for Api
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class Api : System.Web.Services.WebService
{
[System.Web.Services.WebMethod(EnableSession=true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string Login(string glcode,string password)
{
var objList = new CommanListView<String>();
var lsi = new List<string>();
lsi.Add(glcode);
lsi.Add(password);
objList.Entiry = lsi;
return CommanAttribut.GetJsonSerlizer(objList);
}
}
}
error
System.InvalidOperationException: Request format is invalid: multipart/form-data; boundary=----WebKitFormBoundary79Ky1A1Kfyyy7qUi.
at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
that error have getting by postman.
Reply
Answers (
1
)
Not able to access SOAP web service.
How to Create existing project rest api & use for androidapp