From 44c5f1df9a2dcce2932f40782b44d41321761340 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Mon, 9 Nov 2020 09:50:39 -0700 Subject: [PATCH] --- App_Code/ClsContabilidad.vb | 2 +- Ashx/SIGWeb.ashx | 15 +++++++++++---- LogIn.aspx | 13 +------------ LogIn.aspx.vb | 21 +-------------------- 4 files changed, 14 insertions(+), 37 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index ddcd598c7..6555b430c 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5551,7 +5551,7 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico - .Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta + '.Add("@Cuenta", SqlDbType.NVarChar).Value = Cuenta End With Try SqlAdapter.Fill(Data) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 3c0189d72..0bd572211 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -10,18 +10,25 @@ Imports System.IO Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest - If context.Request("metodo").ToString() = "GetTokenAngular" Then + If context.Request("metodo") IsNot Nothing AndAlso context.Request("metodo").ToString() = "GetTokenAngular" Then 'context.Response.ContentType = "application/json; charset=utf-8" context.Response.ContentType = "text/json" - Dim origin As String = context.Request.UrlReferrer.ToString() - context.Response.AddHeader("Access-Control-Allow-Origin", origin.Substring(0, origin.Length - 1)) + If context.Request IsNot Nothing AndAlso context.Request.UrlReferrer IsNot Nothing Then + Dim origin As String = context.Request.UrlReferrer.ToString() + context.Response.AddHeader("Access-Control-Allow-Origin", origin.Substring(0, origin.Length - 1)) + End If 'context.Response.AddHeader("Access-Control-Allow-Origin", "http://localhost:4200") 'context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST") context.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept") context.Response.AddHeader("Access-Control-Allow-Credentials", "true") context.Response.StatusCode = 200 - Dim key As String = GetTokenAngular(context) + Dim key As String = "" + Try + key = GetTokenAngular(context) + Catch ex As Exception + GuardaLog(ex.ToString()) + End Try Dim json As String = JsonConvert.SerializeObject(key) context.Response.Write(json) context.Response.Flush() diff --git a/LogIn.aspx b/LogIn.aspx index 80d75be74..ec14d4d0f 100644 --- a/LogIn.aspx +++ b/LogIn.aspx @@ -131,18 +131,7 @@ <%----%>