A few days ago I published my MVC + AngularJs application in IIS. Everything works fine except the database, the GET, ECT requests do not want to work ...
Launches the following exception:
This Request has been blocked because sensitive information could be reported to thir party web systems when this is used in a Get Request. to allow Get Request, set JsonRequestBehavion to allow get
This is the connection in my appconfig:
data source=10.xx.xx.93,1433;initial catalog=TrackingSystem;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework
And this is my controller:
[HttpGet]
public JsonResult GetData(String St)
{
JsonConvert.SerializeObject(DateTime.Now);
try
{
HandlingUnitRepository ZH = new HandlingUnitRepository();
return Json(ZH.GetData(St), JsonRequestBehavior.AllowGet);
}
catch
{
return Json("Error al intentar obtener la data!");
}
My request in angularjs:
$scope.GetData = function (select) {
$scope.Loading = true;
//Peticion Get para obtener el listado de ZourfReport
$http({
method: "GET",
url: "http://localhost:8082/HandlingUnit/GetData?St=" + select,
}).then(function mySuccess(response) {
$scope.Data = response.data;
$scope.Data.DateShipped;
}, function myError(response) {
$scope.Data = response.statusText;
});