I'm trying to embed Angular to my Asp.Net MVC project but when i try to import the scripts files I get this error. I'm trying to import the scripts this way cause everytime we run 'ng build --prod' the suffix changes and I dont wanna have to change the source every time I make a change and need to publish it
This is for a system of my corp and I need to deliver this.
I've tried to change the web.config, adding this:
<httpRuntime requestValidationMode="2.0" />
Or adding the following annotation to my controller/action:
[ValidateInput(false)]
This is my controller
public class AbastecimentoController : BaseController
{
public ActionResult Dashboard()
{
ViewBag.EmpresaId = UserInfo.EmpresaId;
ViewBag.GrupoEmpresarialId = UserInfo.GrupoEmpresarialId;
return View();
}
}
and this is my view
@{
ViewBag.Title = "Dashboard";
}
<app-root componente="abastecimentos" empresaId="@ViewBag.EmpresaId" grupoEmpresarialId="@ViewBag.GrupoEmpresarialId"></app-root>
@section Scripts{
<!-- Angular 8 / Dashboard Scripts-->
<script type="text/javascript" src="~/Scripts/libs/runtime-es2015*.js"></script>
<script type="text/javascript" src="~/Scripts/libs/runtime-es5*.js"></script>
<script type="text/javascript" src="~/Scripts/libs/polyfills-es2015*.js"></script>
<script type="text/javascript" src="~/Scripts/libs/polyfills-es5*.js"></script>
<script type="text/javascript" src="~/Scripts/libs/main-es2015*.js"></script>
<script type="text/javascript" src="~/Scripts/libs/main-es5*.js"></script>
<link rel="stylesheet" href="~/Scripts/libs/styles.*.css">
}
And when the page loads angular doesn't load and on browser console I get this error:
A possible value for order.Path has been detected on the client (*).
[HttpException (0x80004005): A possible value for order.Path has been detected on the client (*).] System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +562 System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +54
User contributions licensed under CC BY-SA 3.0