I need to POST vars to a .NET Web Service but it don´t work. On the server side (.NET) I will receive the posted vars. So how do I send the POST-vars from Flash and do I receive it in .NET?
The web service below is just a test:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.IO;
namespace FileUploader
{
/// <summary>
/// Summary description for UploadService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[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 UploadService : System.Web.Services.WebService
{
[WebMethod]
public string SaveFile()
{
String responseStr;
if (System.Web.HttpContext.Current.Request.Form["test1"] != null)
{
responseStr = "test1 was Not null";
}
else
{
responseStr = "test1 was null";
}
return responseStr;
}
}
}