# AS3 and .NET Web Services

**URL:** https://forum.kirupa.com/t/as3-and-net-web-services/255338
**Category:** flash
**Created:** [March 21, 2008, 11:28am UTC](https://forum.kirupa.com/t/as3-and-net-web-services/255338 "2008-03-21T11:28:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lunetics](https://avatars.discourse-cdn.com/v4/letter/l/c2a13f/32.png) [@lunetics](https://forum.kirupa.com/u/lunetics)
#### Post date: [March 21, 2008, 11:28am UTC](https://forum.kirupa.com/t/as3-and-net-web-services/255338/1 "2008-03-21T11:28:45Z")

</div>

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:

```auto

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;
        }
    }
}

```
