Synchronous XMLHttpRequest and XMLHttpRequest.withCredentials

1

When I load my page, these 2 messages appear.

Belowthecodingofmypage.

@modelSistemaComercial.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>}<h2class="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",
           });

       });
   });

    
asked by anonymous 11.11.2015 / 20:04

1 answer

1

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

The Browser Link is a feature of Visual Studio that allows for example that you update all browsers that are with your page open with the click of a button inside Visual Studio, or that it reload a css file automatically when you save it in Visual Studio without having to reload the page.

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

    
11.11.2015 / 20:39