using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using System.Security.Cryptography; using CLIP.eForm.Consent.WebService; namespace CLIP.eForm.Consent.Web { public partial class FormSvc : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { RijndaelManaged aes = new RijndaelManaged(); //aes.KeySize = 256; //aes.BlockSize = 128; //aes.Mode = CipherMode.CBC; //aes.Padding = PaddingMode.PKCS7; //aes.Key = Encoding.UTF8.GetBytes("qwerasdfghjzxcvqwe54~!@#$%^*())A"); //aes.IV = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; var method = this.Request.HttpMethod; if (method.Equals("POST")) { string value = Request.Params["params"]; String consentMstRid = Request.Params["consentMstRid"] ?? String.Empty; if (!consentMstRid.Equals(String.Empty)) { using(ConsentSvc svc = new ConsentSvc()) { String result = svc.GetConsentFormXml(Int32.Parse(consentMstRid)); Response.ContentType = "plain/text"; Response.Clear(); Response.BinaryWrite(Encoding.UTF8.GetBytes(result)); } } } } } }