Tengo el siguiente controlador para recibir parametros por get
Yo envio mi url asi http://localhost:63424/Sales/UsarCode/[email protected]&rcompany=restorevitalite&raddress=rfm%20xs%20xs&rpais=59&rtel=56581111&rhash=fsdff&ridpalpay=123&rpriority=2&rtel=6
public ActionResult UsarCode(string rmail, string rcompany, string raddress, string rpais, string rtel, string rhash, string ridpalpay, string rpriority, string idproduct)
{
using (ArcsaEntities ctx = new ArcsaEntities())
{
var pack = ctx.SalesArcsaReportsPakages.Where(p => p.hass == rhash).FirstOrDefault();
if (pack.hass == rhash && pack.status == true)
{
SalesARCSASearchFront searchFront = new SalesARCSASearchFront();
searchFront.fkSalesPayPal = Convert.ToInt32(ridpalpay);
searchFront.CorreoElectronico = rmail;
searchFront.Query = rcompany;
searchFront.Telefono = rtel;
searchFront.Direccion = raddress;
searchFront.fkProductARCSA = 2;
searchFront.fkCountry = Convert.ToInt32(rpais);
searchFront.CreatAt = DateTime.Now;
searchFront.UpdateAt = DateTime.Now;
ctx.SalesARCSASearchFront.Add(searchFront);
ctx.SaveChanges();
string uri = "http://189.240.112.242/arcsaws/arcsausa.asmx/OrderOfflineARCSAusa?key=S232Q334K320U314Q302L328S200X214O198O196I198B196P170&TypeOfReport=2&idSearchFrontARCSA=" + searchFront.Id;
var request = WebRequest.Create(uri) as HttpWebRequest;
var response = request.GetResponse();
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
var resultadoweb = readStream.ReadToEnd();
//Create the XmlDocument.
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(resultadoweb);
XmlNodeList elemlist = xmlDoc.GetElementsByTagName("Result");
XmlNodeList elemlist2 = xmlDoc.GetElementsByTagName("IdReport");
string suc = elemlist[0].InnerXml;
string reporte = elemlist2[0].InnerXml;
var insertfkreport = ctx.SalesARCSASearchFront.Where(i => i.Id == searchFront.Id).FirstOrDefault();
insertfkreport.fkReport = Convert.ToInt32(reporte);
ctx.SaveChanges();
RequestedReportsARCSA requesteReport = new RequestedReportsARCSA();
requesteReport.CreatedDate = DateTime.Now;
requesteReport.fkSalesArcsaReportsPakage = pack.id;
requesteReport.Telefono = rtel;
requesteReport.Direccion = raddress;
requesteReport.Company = rcompany;
requesteReport.fkCountry = Convert.ToInt32(rpais);
ctx.RequestedReportsARCSA.Add(requesteReport);
ctx.SaveChanges();
var Conteo = ctx.RequestedReportsARCSA.Where(c => c.fkSalesArcsaReportsPakage == pack.id).Count();
if (Conteo == pack.Quantity)
{
pack.status = false;
ctx.SaveChanges();
}
ViewBag.Reporte = reporte;
ViewBag.Email = rmail;
return View("~/Views/Sales/Congratulations_2.cshtml");
}
return Content("Error de procesamiento 701");
}
}
Puse un punto de interrupción pero solo llegan ciertas variables como email rhash pero las demás no las toma alguien me podría explicar porque, Gracias