Synchronous Xmlhttprequest and Xmlhttprequest.withCredentials

Asked

Viewed 46 times

1

When I load my page appears these 2 messages.

inserir a descrição da imagem aqui

Below the encoding of my page.

@model SistemaComercial.Models.ItensVenda

@{
ViewBag.Title = "Adicionar novo item";
Layout = "~/Views/Shared/MasterPageCadastro.cshtml";
@* ----- Boostrap ----- *@
<link href="~/Content/bootstrap-theme.min.css" rel="stylesheet" />
<link href="~/Content/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
}
<h2 class="text-primary text-center">Novo Item</h2>

@using (Html.BeginForm())
{
@Html.ValidationSummary(true)

<fieldset class="scheduler-border">
    <legend class="scheduler-border"></legend>
    <div style="padding:20px;">
        <div class="editor-label">
            <b>Código Venda</b>
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.CodigoVenda, new {@readonly = "readonly" })
            @Html.ValidationMessageFor(model => model.CodigoVenda)
        </div><br />

        <div class="editor-label">
            <b>Código Produto</b>
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.CodigoProduto) <button class="btn btn-default" onclick="location.href='@Url.Action("Consulta", "Venda", new { CodigoVenda = @ViewBag.CodigoVenda })'">Consulta</button>
            @Html.ValidationMessageFor(model => model.CodigoProduto)
        </div><br />

        <div class="editor-label">
           <b>Quantidade</b>
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Quantidade)
            @Html.ValidationMessageFor(model => model.Quantidade)
        </div><br />
        <div class="editor-label">
            <b>Preco Unitário</b>
        </div>
        <div class="editor-field">
            @ViewBag.ValorUnitario
        </div><br /><br />

        <br />
        <button class="btn btn-default" onclick="location.href='@Url.Action("Movimentacao", "Venda", new { Codigo = @ViewBag.CodigoVenda })'">Cancelar</button>
        <input type="button" class="btn btn-success" value="Salvar (F5)" id="AjaxPost" />
        <br />
        <div id="content">

        </div>
    </div>
</fieldset>

 }
  <script>
        $(document).ready(function () {

       $("#AjaxPost").click(function () {
        $("#content").html("<b>Aguarde...</b>");

        var dataObject = {
            CodigoVenda: $("#CodigoVenda").val(),
            CodigoProduto: $("#CodigoProduto").val(),
            Quantidade: $("#Quantidade").val()
        };

        $.ajax({
            url: "@Url.Action("SalvarItem","Venda")",
            type: "POST",
            async: true,
            data: dataObject,
            dataType: "json",
           });

       });
   });

1 answer

0


This error is not of your code, note the name of the file in which is giving the error, this is a file of Browser Link, a Visual Studio feature, even note that the port used by this file (59671) is different by the port you are using on your site (63729).

The Browser Link is a feature of Visual Studio that allows for example that you update all browsers that have your page open at the click of a button inside Visual Studio, or that it automatically reloads a css file when you save it to Visual Studio without reloading the page.

So I would say that you can ignore this error that it should not cause any problem and will only appear while developing, when publish the site to the production server it will not occur.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.