I have a aspx web forms project, and am using a Silverlight component to acquire images through a scanner on the client side, once the scan is complete I need to send two byte arrays to the aspx session variable, so I can save these byte arrays against a record.
I currently am just trying to send a basic string from Silverlight to aspx to try and update the session variable (Trying to get the basics working, before stepping it up)
I get a NullReferenceException though when I try to update the session variable, and get a response from the WebService saying "NotFound"...
Here is what I now have:
Web Service:
namespace XXXX
{
/// <summary>
/// Summary description for EnrollService
/// </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 EnrollService : System.Web.Services.WebService
{
[WebMethod]
public void SetSessionEmpIDs(string Templates)
{
Session.Add("EmployeeIDs", Templates);
}
}
}
Silverlight side:
EnrollServiceReference.EnrollServiceSoapClient client = new EnrollServiceReference.EnrollServiceSoapClient();
client.SetSessionEmpIDs("IDsDONE");