Compare commits

...

5 Commits

  1. BIN
      .vs/AOLBackend/DesignTimeBuild/.dtbcache.v2
  2. BIN
      .vs/AOLBackend/v17/.futdcache.v1
  3. BIN
      .vs/AOLBackend/v17/.suo
  4. BIN
      .vs/ProjectEvaluation/aolbackend.metadata.v2
  5. BIN
      .vs/ProjectEvaluation/aolbackend.projects.v2
  6. 1
      AOLBackend.csproj
  7. 1
      AOLBackend.csproj.user
  8. 2
      Contracts/IUsuarioRepository.cs
  9. 2
      Contracts/Operaciones/IOpViajesRepository.cs
  10. 12
      Contracts/Utils/IFileManagerRepository.cs
  11. 9
      Contracts/Utils/IFilePaths4ProcessRepository.cs
  12. 2
      Controllers/Catalogos/CatClientesController.cs
  13. 2
      Controllers/Catalogos/CatProveedoresController.cs
  14. 2
      Controllers/Catalogos/CatRutasController.cs
  15. 3
      Controllers/Catalogos/CatServiciosController.cs
  16. 2
      Controllers/Catalogos/CatTipoUnidadController.cs
  17. 3
      Controllers/Catalogos/CatUbicacionesController.cs
  18. 6
      Controllers/Operaciones/OpViajesController.cs
  19. 64
      Controllers/Usuarios/AuthController.cs
  20. 112
      Controllers/Usuarios/UsuariosController.cs
  21. 148
      Controllers/Utils/FileManagerController.cs
  22. 56
      Controllers/Utils/MFileManagerController.cs
  23. 1
      DTO/Operaciones/DTOOpViajes.cs
  24. 10
      DTO/Usuario/DTOUsuarioSendEmail.cs
  25. 24
      Models/IUsuarios.cs
  26. 14
      Models/Utils/FileManager.cs
  27. 7
      Models/Utils/FilePaths4Process.cs
  28. 18
      Program.cs
  29. 4
      Repository/Operaciones/OpViajesRepository.cs
  30. 22
      Repository/UsuariosRepository.cs
  31. 88
      Repository/Utils/FileManagerRepository.cs
  32. 26
      Repository/Utils/FilePaths4ProcessRepository.cs
  33. 61
      Services/EmailSender/EmailSender.cs
  34. 106
      Services/MFileManager/SvcMFileManager.cs
  35. 178
      Services/Tools/CryptDecrypt.cs
  36. 8
      appsettings.Development.json
  37. 14
      appsettings.json
  38. BIN
      bin/Debug/net6.0/AOLBackend.dll
  39. BIN
      bin/Debug/net6.0/AOLBackend.exe
  40. BIN
      bin/Debug/net6.0/AOLBackend.pdb
  41. 8
      bin/Debug/net6.0/appsettings.Development.json
  42. 14
      bin/Debug/net6.0/appsettings.json
  43. 5
      obj/AOLBackend.csproj.nuget.dgspec.json
  44. 2
      obj/AOLBackend.csproj.nuget.g.props
  45. 5
      obj/Debug/net6.0/AOLBackend.GeneratedMSBuildEditorConfig.editorconfig
  46. BIN
      obj/Debug/net6.0/AOLBackend.assets.cache
  47. BIN
      obj/Debug/net6.0/AOLBackend.csproj.AssemblyReference.cache
  48. 2
      obj/Debug/net6.0/AOLBackend.csproj.CoreCompileInputs.cache
  49. 89
      obj/Debug/net6.0/AOLBackend.csproj.FileListAbsolute.txt
  50. BIN
      obj/Debug/net6.0/AOLBackend.dll
  51. BIN
      obj/Debug/net6.0/AOLBackend.pdb
  52. BIN
      obj/Debug/net6.0/apphost.exe
  53. BIN
      obj/Debug/net6.0/ref/AOLBackend.dll
  54. BIN
      obj/Debug/net6.0/refint/AOLBackend.dll
  55. 151
      obj/project.assets.json
  56. 2
      obj/project.nuget.cache
  57. 309
      obj/staticwebassets.pack.sentinel

Binary file not shown.

Binary file not shown.

@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.8" />
<!-- <PackageReference Include="Microsoft.Exchange.WebServices" Version="2.2.0" /> -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.22.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.22.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />

@ -3,5 +3,6 @@
<PropertyGroup>
<Controller_SelectedScaffolderID>ApiControllerWithActionsScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
<NameOfLastUsedPublishProfile>C:\Projects\staging\AOLBackend\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
</Project>

@ -22,5 +22,7 @@ namespace AOLBackend.Contracts
public Task<IEnumerable<DTOClonarUsuario>> ClonarUsuario(DTOClonarUsuario user);
public Task<Boolean> Activate(int id, int Activo);
}
}

@ -7,7 +7,7 @@ namespace AOLBackend.Contracts.Operaciones
public Task<DTOOpViajes> Append(DTOOpViajes data);
public Task<IEnumerable<DTOOpViajesServicios>> AppendServicio(DTOOpViajesServicios data);
public Task<IEnumerable<DTOOpViajes>> GetAll();
public Task<IEnumerable<DTOOpViajesServicios>> GetAllServices();
public Task<IEnumerable<DTOOpViajesServicios>> GetAllServices(int Status);
public Task<DTOUltimaCaja> GetLastTrailerBox(int idViaje);
public Task<IEnumerable<DTOOpViajesEstatusSecuencia>> GetStatusSecuence();
public Task<DTOResultTripStatus> ChangeTripStatus(DTOChangeTripStatus data);

@ -0,0 +1,12 @@
using AOLBackend.Models.Utils;
namespace AOLBackend.Contracts.Utils
{
public interface IFileManagerRepository
{
public Task<FileManager> FileManager(FileManager data);
public Task<FileManager> getFileByProcess(long id, int Proceso);
public Task<List<FileManager>> getAllFilesByProcess(long Tags, int Proceso);
public Task<FileManager> getFileById(long id);
public Task deleteFileByProcess(long id, int Proceso);
}
}

@ -0,0 +1,9 @@
using AOLBackend.Models.Utils;
namespace AOLBackend.Contracts.Utils
{
public interface IFilePaths4ProcessRepository
{
public Task<FilePaths4Process> getPaths4ProcessById(long id);
}
}

@ -1,9 +1,11 @@
using AOLBackend.Contracts.Catalogos;
using AOLBackend.Models.Catalogos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Catalogos
{
[Authorize]
[ApiController]
[Route("api/Catalogos/[controller]")]
public class CatClientesController : ControllerBase

@ -1,9 +1,11 @@
using AOLBackend.Contracts.Catalogos;
using AOLBackend.Models.Catalogos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Catalogos
{
[Authorize]
[ApiController]
[Route("api/Catalogos/[controller]")]
public class CatProveedoresController : ControllerBase

@ -2,9 +2,11 @@ using AOLBackend.Contracts.Catalogos;
using AOLBackend.Models.Catalogos;
using AOLBackend.DTO.Catalogos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Catalogos
{
[Authorize]
[ApiController]
[Route("api/Catalogos/[controller]")]
public class CatRutasController : ControllerBase

@ -1,10 +1,11 @@
using AOLBackend.Contracts.Catalogos;
using AOLBackend.Models.Catalogos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Catalogos
{
[Authorize]
[ApiController]
[Route("api/Catalogos/[controller]")]
public class CatServiciosController : ControllerBase

@ -1,9 +1,11 @@
using AOLBackend.Contracts.Catalogos;
using AOLBackend.Models.Catalogos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Catalogos
{
[Authorize]
[ApiController]
[Route("api/Catalogos/[controller]")]
public class CatTipoUnidadController : ControllerBase

@ -1,10 +1,11 @@
using AOLBackend.Contracts.Catalogos;
using AOLBackend.Models.Catalogos;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Catalogos
{
[Authorize]
[ApiController]
[Route("api/Catalogos/[controller]")]
public class CatUbicacionesController : ControllerBase

@ -1,9 +1,11 @@
using AOLBackend.Contracts.Operaciones;
using AOLBackend.DTO.Operaciones;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace AOLBackend.Controllers.Operaciones
{
[Authorize]
[ApiController]
[Route("api/Operaciones/[controller]")]
public class OpViajesController : ControllerBase
@ -41,9 +43,9 @@ namespace AOLBackend.Controllers.Operaciones
[HttpGet]
[Route("GetAllServices")]
public async Task<IEnumerable<DTOOpViajesServicios>> GetAllServices()
public async Task<IEnumerable<DTOOpViajesServicios>> GetAllServices(int Status)
{
var entrada = await _Repo.GetAllServices();
var entrada = await _Repo.GetAllServices(Status);
return entrada;
}

@ -1,11 +1,13 @@
using AOLBackend.Contracts;
using AOLBackend.DTO;
using AOLBackend.DTO.Usuario;
using AOLBackend.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using AOLBackend.Services.EmailSender;
using System.Text;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
@ -48,9 +50,8 @@ namespace AOLBackend.Controllers.Usuarios
claims.Add(new Claim(JwtRegisteredClaimNames.Iat, DateTime.UtcNow.ToString()));
claims.Add(new Claim("UserId", user.Id.ToString()));
claims.Add(new Claim("Usuario", user.Usuario));
claims.Add(new Claim("Departamento", (user.sDept ?? user.sDept ?? "No asignado")));
claims.Add(new Claim("UserType", (user != null) ? user.TipoUsuario.ToString() : "0"));
if (menu!=null)
if (menu != null)
{
foreach (IMenu item in menu) { claims.Add(new Claim(ClaimTypes.Role, item.Url)); }
}
@ -60,8 +61,8 @@ namespace AOLBackend.Controllers.Usuarios
_config["Jwt:Issuer"],
_config["Jwt:Audience"],
claims,
expires: DateTime.UtcNow.AddHours(Int32.Parse(_config["Jwt:ExpirationHours"])),
//expires: DateTime.UtcNow.AddMinutes(5),
expires: DateTime.UtcNow.AddHours(Int32.Parse(_config["Jwt:ExpirationHours"])),
//expires: DateTime.UtcNow.AddMinutes(2),
signingCredentials: signIn);
var _token = new JwtSecurityTokenHandler().WriteToken(token);
@ -85,5 +86,60 @@ namespace AOLBackend.Controllers.Usuarios
{
return StatusCode(200, "Its Ok");
}
[Route("resetPassword")]
[HttpPost]
public async Task<IActionResult> ResetPassword(DTOLogin user)
{
try
{
var result = await _usuariosRepo.ResetPassword(user);
if (result == null)
{
return StatusCode(400, "Cuenta de usuario no existe");
}
var encrypted = AOLBackend.Services.Tools.CryptDecrypt.Encryption(user.Usuario);
EmailSender eSender = new EmailSender(_config);
string htmlContent = $@"<html>
<body>
<table style='font-size:14px; border: 1px solid #225EDD; padding: 5px; width: 1500px; height: 150px;'>
<tr style='background-color: #225EDD; color: #FFFFFF;'><td>Hola: {user.Usuario}, mediante el siguiente correo electronico, se le notifica que se ha cambiado su contraseña</td></tr>
<tr><td>Para validar que usted cambio su contraseña, favor de dar click al siguiente <a href='https://localhost:7000/api/Catalogos/Usuarios/AcceptReset?key={encrypted.Replace("/", "%2F").Replace("+", "%2B").Replace("=", "%3D")}'>link</a></td></tr>
<tr><td>Que tenga un excelente dia!</td></tr>
</table>
</body>
</html> ";
string resultSendEmail = eSender.SrvSendEmail(htmlContent, "Confirmacion de credenciales de alphaomega.com.mx", user.Usuario);
return Ok(resultSendEmail);
}
catch (Exception ex)
{
return StatusCode(500, ex);
}
}
[Route("AcceptReset")]
[HttpGet]
public async Task<IActionResult> AcceptReset(string key)
{
{
var decrypted = AOLBackend.Services.Tools.CryptDecrypt.Decryption(@key);
try
{
var usuarios = await _usuariosRepo.GetAllUsuariosShort();
foreach (DTOUsuarioShort usr in usuarios)
{
if (usr.Usuario == decrypted)
{
Boolean result = await _usuariosRepo.Activate(usr.id, 1);
if (result) return Ok("Cuenta activada!");
else return StatusCode(500, "Ocurrio un error!");
}
}
}
catch (Exception ex) { return StatusCode(500, ex.Message); }
return StatusCode(200, "Cuenta activada!");
}
}
}
}

@ -2,18 +2,24 @@
using AOLBackend.DTO;
using AOLBackend.DTO.Usuario;
using AOLBackend.Models;
using AOLBackend.Services.EmailSender;
using Microsoft.AspNetCore.Mvc;
using System.Text;
namespace AOLBackend.Controllers.Usuarios
{
[Route("api/[controller]")]
[Route("api/Catalogos/[controller]")]
[ApiController]
public class UsuariosController : ControllerBase
{
private readonly IUsuarioRepository _usuariosRepo;
// private readonly IConfiguration _config;
private readonly IConfiguration _config;
public UsuariosController(IUsuarioRepository usuariosRepo, IConfiguration config) { _usuariosRepo = usuariosRepo; }
public UsuariosController(IUsuarioRepository usuariosRepo, IConfiguration config)
{
_usuariosRepo = usuariosRepo;
_config = config;
}
[Route("getUsuarioById")]
[HttpGet]
@ -28,9 +34,9 @@ namespace AOLBackend.Controllers.Usuarios
catch (Exception ex) { return StatusCode(500, ex.Message); }
}
[Route("getAllUsuarios")]
[Route("GetAll")]
[HttpGet]
public async Task<IActionResult> GetAllUsuarios()
public async Task<IActionResult> GetAll()
{
try
{
@ -52,7 +58,6 @@ namespace AOLBackend.Controllers.Usuarios
catch (Exception ex) { return StatusCode(500, ex.Message); }
}
[Route("Auth")]
[HttpPost]
public async Task<IActionResult> Auth(DTOLogin user)
@ -65,26 +70,6 @@ namespace AOLBackend.Controllers.Usuarios
catch (Exception ex) { return StatusCode(500, ex.Message); }
}
[Route("resetPassword")]
[HttpPost]
public async Task<IActionResult> ResetPassword(DTOLogin user)
{
try
{
var result = await _usuariosRepo.ResetPassword(user);
if (result == null)
{
return StatusCode(400, "Cuenta de usuario no existe");
}
return Ok(result);
}
catch (Exception ex)
{
return StatusCode(500, ex);
}
}
[Route("searchUsuario")]
[HttpPost]
public async Task<IActionResult> SearchUsuario(DTOLogin user)
@ -101,18 +86,33 @@ namespace AOLBackend.Controllers.Usuarios
}
}
[Route("createUser")]
[Route("Append")]
[HttpPost]
public async Task<IActionResult> POST(IUsuarios user)
public async Task<IActionResult> Append(IUsuarios user)
{
try
{
var usuario = await _usuariosRepo.CreateUsuario(user);
if (user.Id == 0)
{
/* Utilerias email = new Utilerias(_config);
Boolean sendOk = email.SendEmail("", usuario);*/
EmailSender eSender = new EmailSender(_config);
string htmlContent = $@"<html>
<body>
<table style='font-size:14px; border: 1px solid #225EDD; padding: 5px; width: 1500px; height: 150px;'>
<tr style='background-color: #225EDD; color: #FFFFFF;'><td>Hola: {user.Nombre}, mediante el siguiente correo electronico, se le notifica que se le ha creado un nuevo acceso</td></tr>
<tr><td>Para acceder a su cuenta, favor de entrar a: https://www.alphaomega.com.mx/</td></tr>
<tr><td>Nombre de usuario: <b>{user.Usuario}</b></td></tr>
<tr><td>Para poder entrar por primera vez, es necesario que establezca su contraseña</td></tr>
<tr><td>Para cambiar/establecer la contraseña, entre a <a href='https://www.alphaomega.com.mx/'>link</a> y de un click al link Olvido contraseña</td></tr>
<tr><td>Si por alguna razon, no recuerda su contrasena, repita este proceso de resetear su contraseña</td></tr>
<tr><td>No es necesario responder a este correo, ya que fue generado en automatico por el sistema.</td></tr>
<tr style='background-color: #F7192A; font-weight: bold; color: #FFFFFF'><td>Nota: Las credenciales de acceso son responsabilidad personal, nadie solo usted debe conocerlas</td></tr>
<tr><td>Que tenga un excelente dia!</td></tr>
</table>
</body>
</html> ";
string result = eSender.SrvSendEmail(htmlContent, "Confirmacion de credenciales de alphaomega.com.mx", user.Usuario);
return Ok(result);
}
return Ok(usuario);
}
@ -121,7 +121,7 @@ namespace AOLBackend.Controllers.Usuarios
[Route("clonarUsuario")]
[HttpPost]
public async Task<IActionResult> POST(DTOClonarUsuario user)
public async Task<IActionResult> clonarUsuario(DTOClonarUsuario user)
{
try
{
@ -130,5 +130,53 @@ namespace AOLBackend.Controllers.Usuarios
}
catch (Exception ex) { return StatusCode(500, ex.Message); }
}
[Route("SendEmail")]
[HttpGet]
public async Task<IActionResult> SendEmail(string Usuario, string Nombre, string Correo)
{
var content = Usuario;
EmailSender eSender = new EmailSender(_config);
string htmlContent = $@"<html>
<body>
<table style='font-size:14px; border: 1px solid #225EDD; padding: 5px; width: 1500px; height: 150px;'>
<tr style='background-color: #225EDD; color: #FFFFFF;'><td>Hola: {Nombre}, mediante el siguiente correo electronico, se le notifica que se le ha creado un nuevo acceso</td></tr>
<tr><td>Para acceder a su cuenta, favor de entrar a: https://www.alphaomega.com.mx/</td></tr>
<tr><td>Nombre de usuario: <b>{Usuario}</b></td></tr>
<tr><td>Para poder entrar por primera vez, es necesario que establezca su contraseña</td></tr>
<tr><td>Para cambiar/establecer la contraseña, puede ir al menu Reset, proporcione su nombre de usuario y su nueva contraseña</td></tr>
<tr><td>Si por alguna razon, no recuerda su contrasena, repita este proceso de resetear su contraseña</td></tr>
<tr><td>No es necesario responder a este correo, ya que fue generado en automatico por el sistema.</td></tr>
<tr style='background-color: #F7192A; font-weight: bold; color: #FFFFFF'><td>Nota: Las credenciales de acceso son responsabilidad personal, nadie solo usted debe conocerlas</td></tr>
<tr><td>Que tenga un excelente dia!</td></tr>
</table>
</body>
</html> ";
string result = eSender.SrvSendEmail(htmlContent, "Confirmacion de credenciales de alphaomega.com.mx", Correo);
return Ok(result);
}
/* [Route("AcceptReset")]
[HttpGet]
public async Task<IActionResult> AcceptReset(string key)
{
var decrypted = AOLBackend.Services.Tools.CryptDecrypt.Decryption(@key);
try
{
// return Ok(decrypted);
var usuarios = await _usuariosRepo.GetAllUsuariosShort();
foreach (DTOUsuarioShort usr in usuarios)
{
if (usr.Usuario == decrypted)
{
Boolean result = await _usuariosRepo.Activate(usr.id, 1);
if (result) return Ok("Cuenta activada!");
else return StatusCode(500, "Ocurrio un error!");
}
}
}
catch (Exception ex) { return StatusCode(500, ex.Message); }
return StatusCode(200, "Cuenta activada!");
} */
}
}

@ -0,0 +1,148 @@
using AOLBackend.Contracts.Utils;
using AOLBackend.Models.Utils;
using Microsoft.AspNetCore.Mvc;
namespace AOLBackend.Controllers.Utils
{
[ApiController]
[Route("api/[controller]")]
public class FileManagerController : ControllerBase
{
private readonly IFileManagerRepository _Repo;
private readonly IFilePaths4ProcessRepository _RepoRelativePath;
private readonly IConfiguration _config;
private readonly string RootPathCorresponsales;
public FileManagerController(IFileManagerRepository Repo,
IFilePaths4ProcessRepository RepoRelativePath,
IConfiguration config)
{
_config = config;
_Repo = Repo;
_RepoRelativePath = RepoRelativePath;
RootPathCorresponsales = _config.GetValue<string>("AllFiles");
}
[Route("GetFileInfoByProcess")]
[HttpGet]
public async Task<FileManager> GetFileInfoByProcess([FromQuery] int id, int Proceso)
{
FileManager data = new FileManager();
data = await _Repo.getFileByProcess(id, Proceso);
return data;
}
[Route("GetFileInfoById")]
[HttpGet]
public async Task<FileManager> GetFileInfoByProcess([FromQuery] int id)
{
FileManager data = new FileManager();
data = await _Repo.getFileById(id);
return data;
}
[Route("AppendFileByProcess")]
[HttpPost]
public async Task<FileManager> AppendFileByProcess(IFormFile file, int IdUsuario, int Proceso, string Tags, int crud)
{
DateTime time = DateTime.Now;
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso);
string fullPath = "";
fullPath = RootPathCorresponsales + RelativePath.Path;
string fileMime = file.FileName.Substring(file.FileName.Length - 4);
string newFileName = file.FileName.Replace(fileMime, "") + "_" + time.ToString("yyyy_MM_dd_HH_mm_ss") + fileMime;
FileManager data = new FileManager();
data.id = 0;
data.IdUsuario = IdUsuario;
data.NombreArchivo = newFileName;
data.Proceso = Proceso;
data.FechaRegistro = "";
data.Tags = Tags;
data.Activo = 1;
long fileLength = 0;
if (@crud == 1)
{
if (file.Length > 0)
{
var filePath = fullPath + newFileName;
using (var stream = System.IO.File.Create(filePath))
{
await file.CopyToAsync(stream);
}
fileLength = new System.IO.FileInfo(filePath).Length / 1024;
data.Size = fileLength;
if (fileLength > 0)
{
return await _Repo.FileManager(data);
}
}
}
return data;
}
[Route("getFile")]
[HttpGet, DisableRequestSizeLimit]
public async Task<IActionResult> getFileFromFileManager([FromQuery] long id, int Proceso)
{
Boolean ExisteEnDisco = false;
FileManager recFound = await _Repo.getFileByProcess(id, Proceso);
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso);
string fullPath = "";
fullPath = RootPathCorresponsales + RelativePath.Path;
if (!String.IsNullOrEmpty(recFound.NombreArchivo))
{
try
{
if (System.IO.File.Exists(Path.Combine(fullPath, recFound.NombreArchivo)))
{
ExisteEnDisco = true;
}
else return BadRequest(new { respuesta = "Ese archivo no existe" });
}
catch (IOException ex)
{
return BadRequest(new { respuesta = "Ese archivo no existe" + ex.ToString() });
}
if (ExisteEnDisco)
{
string fileMime = recFound.NombreArchivo.Substring(recFound.NombreArchivo.Length - 3).ToLower();
var mime = "application/" + fileMime.ToLower();
string targetFile = fullPath + recFound.NombreArchivo;
if (System.IO.File.Exists(targetFile))
{
byte[] pdfBytes = System.IO.File.ReadAllBytes(targetFile);
MemoryStream ms = new MemoryStream(pdfBytes);
return new FileStreamResult(ms, mime);
}
}
}
return BadRequest(new { respuesta = "Ese archivo no existe" });
}
[HttpDelete("DeleteById/{id}")]
public async Task<IActionResult> DeleteByProcess(long id)
{
FileManager Found = await _Repo.getFileById(id);
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Found.Proceso);
string fullPath = "";
fullPath = RootPathCorresponsales + RelativePath.Path;
try
{
if (System.IO.File.Exists(Path.Combine(fullPath, Found.NombreArchivo)))
{
System.IO.File.Delete(Path.Combine(fullPath, Found.NombreArchivo));
await _Repo.deleteFileByProcess(Found.id, Found.Proceso);
}
else return new OkObjectResult(new { respuesta = "Ese archivo no existe" });
}
catch (IOException ex)
{
return new OkObjectResult(new { respuesta = "Ocurrio un error al intentar eliminar el registro: " + ex.ToString() });
}
return new OkObjectResult(new { respuesta = "Se elimino el registro" });
}
}
}

@ -0,0 +1,56 @@
using Microsoft.AspNetCore.Mvc;
using AOLBackend.Services.MFileManager;
using AOLBackend.Contracts.Utils;
using AOLBackend.Models.Utils;
namespace AOLBackend.Controllers.Utils
{
[Route("api/Utils/[controller]")]
public class MFileManagerController : Controller
{
private readonly IFileManagerRepository _Repo;
private readonly IConfiguration _config;
private readonly IFilePaths4ProcessRepository _RepoRelativePath;
private readonly string RootPath;
public MFileManagerController(IConfiguration config, IFilePaths4ProcessRepository RepoRelativePath, IFileManagerRepository Repo)
{
_config = config;
_RepoRelativePath = RepoRelativePath;
_Repo = Repo;
RootPath = _config.GetValue<string>("AllFiles");
}
[HttpGet]
[Route("GetFilesFromLog")]
public async Task<List<FileManager>> GetFilesFromLog(int Tags, int Proceso)
{
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso);
SvcMFileManager FM = new SvcMFileManager(_config, _Repo, RootPath + RelativePath.Path + "\\");
return await FM.GetFilesFromLog(Tags, Proceso);
}
[HttpGet]
[Route("GetFileContentById")]
public async Task<IActionResult> GetFileContentById(long id, int Proceso)
{
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso);
SvcMFileManager FM = new SvcMFileManager(_config, _Repo, RootPath + RelativePath.Path);
return await FM.getFileContentById(id);
}
[HttpPost]
[Route("Append")]
public async Task<List<FileManager>> Append(List<IFormFile> FileList, int Tags, int Proceso, int Usuario)
{
List<string> data = new List<string>();
FilePaths4Process RelativePath = await _RepoRelativePath.getPaths4ProcessById(Proceso);
SvcMFileManager FM = new SvcMFileManager(_config, _Repo, RootPath + RelativePath.Path + "\\");
List<string> filePaths = await FM.SaveFile2DiskList(FileList);
var fileData = await FM.SaveFileLog(filePaths, Tags, Proceso, Usuario);
return fileData;
}
}
}

@ -18,6 +18,7 @@ namespace AOLBackend.DTO.Operaciones
public string? sDestino { get; set; } = null!;
public byte Hazmat { get; set; } = 0;
public byte TipoOperacion { get; set; } = 1;
public string sTipoOperacion { get; set; } = null!;
public string Pedimento { get; set; } = null!;
public int Status { get; set; } = 0;
public int Activo { get; set; } = 0;

@ -0,0 +1,10 @@
namespace AOLBackend.DTO.Usuario
{
public class DTOUsuarioSendEmail
{
public string Usuario { get; set; } = null!;
public string Nombre { get; set; } = null!;
public string Correo { get; set; } = null!;
}
}

@ -6,32 +6,8 @@
public string Usuario { get; set; } = null!;
public string Nombre { get; set; } = null!;
public string Contrasena { get; set; } = null!;
public string Correo { get; set; } = null!;
public byte TipoUsuario { get; set; } = 2;
public byte Activo { get; set; } = 1;
public string FechaAlta { get; set; } = null!;
public int UsuarioAlta { get; set; } = 0!;
public string FechaModifico { get; set; } = null!;
public int UsuarioModifico { get; set; } = 0!;
public string FechaElimino { get; set; } = null!;
public int UsuarioElimino { get; set; } = 0!;
public string MotivoElimino { get; set; } = null!;
public int IdModulo { get; set; } = 0!;
public int Dept { get; set; } = 0!;
public string? sDept { get; set; } = null!;
public int Tmercancia { get; set; } = 0!;
public string FechaUltimaVisita { get; set; } = null!;
public int Visitas { get; set; } = 0!;
public int Internos { get; set; } = 0!;
public int PermisoEspecial { get; set; } = 0!;
public int EstadoConfiguracion { get; set; } = 0!;
public string FechaValidacionConf { get; set; } = null!;
public string RealizoEncuesta { get; set; } = null!;
public int EncuestaActiva { get; set; } = 0!;
public string FechaLimiteEncuesta { get; set; } = null!;
public string CodigoAccesoM { get; set; } = null!;
public string TokenAccesoM { set; get; } = null!;
public string DeviceToken { get; set; } = null!;
public int IdPerfil { get; set; } = 0!;
}
}

@ -0,0 +1,14 @@
namespace AOLBackend.Models.Utils
{
public class FileManager
{
public long id { get; set; } = 0!;
public int IdUsuario { get; set; } = 0!;
public int Proceso { get; set; } = 0!;
public string NombreArchivo { get; set; } = null!;
public string FechaRegistro { get; set; } = null!;
public string Tags { get; set; } = null!;
public long Size { get; set; } = 0!;
public byte Activo { get; set; } = 0!;
}
}

@ -0,0 +1,7 @@
namespace AOLBackend.Models.Utils
{
public class FilePaths4Process
{
public string Path { set; get; } = string.Empty;
}
}

@ -2,9 +2,13 @@ using AOLBackend.Context;
using AOLBackend.Contracts;
using AOLBackend.Contracts.Catalogos;
using AOLBackend.Contracts.Operaciones;
using AOLBackend.Contracts.Utils;
using AOLBackend.Repository;
using AOLBackend.Repository.Catalogos;
using AOLBackend.Repository.Operaciones;
using AOLBackend.Repository.Utils;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
@ -25,6 +29,10 @@ builder.Services.AddScoped<ICatRutasRepository, CatRutasRepository>();
//Operaciones
builder.Services.AddScoped<IOpViajesRepository, OpViajesRepository>();
//Utilerias
builder.Services.AddScoped<IFileManagerRepository, FileManagerRepository>();
builder.Services.AddScoped<IFilePaths4ProcessRepository, FilePaths4ProcessRepository>();
builder.Services.AddControllers();
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(options =>
{
@ -48,12 +56,16 @@ builder.Services.AddCors(p => p.AddPolicy("corsapp", builder =>
//builder.WithOrigins("*").AllowAnyMethod().AllowAnyHeader();
builder.WithOrigins("http://localhost:3000",
"http://localhost:7001",
"http://localhost:5000",
"https://localhost:5001",
"https://alphaomega.com.mx",
"https://www.alphaomega.com.mx",
"https://74.208.165.122",
"https://www.alphaomega.com.mx:443",
"https://74.208.165.122:443",
"http://localhost",
"http://192.168.100.242:3000",
"http://74.208.65.168",
"http://reportes.gemcousa.com").AllowAnyMethod().AllowAnyHeader();
"http://74.208.165.122:5000").AllowAnyMethod().AllowAnyHeader();
}));
var app = builder.Build();

@ -61,11 +61,11 @@ namespace AOLBackend.Repository.Operaciones
var entrada = await connection.QueryAsync<DTOOpViajes>(query, new { }, commandType: CommandType.StoredProcedure);
return entrada;
}
public async Task<IEnumerable<DTOOpViajesServicios>> GetAllServices()
public async Task<IEnumerable<DTOOpViajesServicios>> GetAllServices(int Status)
{
var query = "[Operaciones.Viajes.Servicios.Get]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<DTOOpViajesServicios>(query, new { }, commandType: CommandType.StoredProcedure);
var entrada = await connection.QueryAsync<DTOOpViajesServicios>(query, new { @Status }, commandType: CommandType.StoredProcedure);
return entrada;
}
public async Task<DTOUltimaCaja> GetLastTrailerBox(int idViaje)

@ -84,7 +84,7 @@ namespace AOLBackend.Repository
public async Task<DTOLogin> ResetPassword(DTOLogin user)
{
var query = "resetPassword";
var query = "[Usuario.ResetPassword]";
using (var connection = _context.CreateConnection())
{
var usuarios = await connection.QueryAsync<DTOLogin>(query, new
@ -101,7 +101,7 @@ namespace AOLBackend.Repository
public async Task<IUsuarios> CreateUsuario(IUsuarios user)
{
var query = "createUsuario";
var query = "[Usuario.Append]";
using (var connection = _context.CreateConnection())
{
if (user.Id == 0) user.Contrasena = _config.GetValue<string>("DefaultUser:Password");
@ -111,11 +111,8 @@ namespace AOLBackend.Repository
@Usuario = user.Usuario,
@Nombre = user.Nombre,
@Contrasena = CryptDecrypt.Encrypt(user.Contrasena),
@Correo = user.Correo,
@TipoUsuario = user.TipoUsuario,
@Activo = user.Activo,
@UsuarioAlta = user.UsuarioAlta,
@IdPerfil = user.IdPerfil
}, commandType: CommandType.StoredProcedure);
return usuario.First();
}
@ -134,5 +131,20 @@ namespace AOLBackend.Repository
return usuario.ToList();
}
}
public async Task<Boolean> Activate(int id, int Activo)
{
var query = "[Usuario.Activate]";
using (var connection = _context.CreateConnection())
{
var usuario = await connection.QueryAsync<IUsuarios>(query, new
{
@id = id,
@Activo = Activo,
}, commandType: CommandType.StoredProcedure);
return true;
}
}
}
}

@ -0,0 +1,88 @@
using Dapper;
using AOLBackend.Context;
using AOLBackend.Contracts.Utils;
using AOLBackend.Models.Utils;
using System.Data;
namespace AOLBackend.Repository.Utils
{
public class FileManagerRepository : IFileManagerRepository
{
private readonly DapperContext _context;
public FileManagerRepository(DapperContext context) { _context = context; }
public async Task<FileManager> FileManager(FileManager data)
{
var query = "[Utils.FileManager.Append]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<FileManager>(query, new
{
@id = 0,
@IdUsuario = data.IdUsuario,
@Proceso = data.Proceso,
@NombreArchivo = data.NombreArchivo,
@Tags = data.Tags,
@Size = data.Size
},
commandType: CommandType.StoredProcedure);
return entrada.First();
}
public async Task<FileManager> getFileByProcess(long id, int Proceso)
{
var query = "[Utils.FileManager.Get]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<FileManager>(query, new
{
@id = 0,
@Proceso = Proceso,
@NombreArchivo = "",
@Tags = id,
},
commandType: CommandType.StoredProcedure);
return entrada.FirstOrDefault(new FileManager { id = id, Proceso = Proceso, NombreArchivo = "", Tags = "", Size = 0 });
}
public async Task<FileManager> getFileById(long id)
{
var query = "[Utils.FileManager.Get]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<FileManager>(query, new
{
@id = id,
@Proceso = 0,
@NombreArchivo = "",
@Tags = id,
},
commandType: CommandType.StoredProcedure);
return entrada.FirstOrDefault(new FileManager { id = id, Proceso = 0, NombreArchivo = "", Tags = "", Size = 0 });
}
public async Task<List<FileManager>> getAllFilesByProcess(long Tags, int Proceso)
{
var query = "[Utils.FileManager.Get]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<FileManager>(query, new
{
@id = 0,
@Proceso = Proceso,
@NombreArchivo = "",
@Tags = Tags,
},
commandType: CommandType.StoredProcedure);
return entrada.ToList();
}
public async Task deleteFileByProcess(long id, int Proceso)
{
var query = "[Utils.FileManager.Delete]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<FileManager>(query, new
{
@id = id,
@Proceso = Proceso,
},
commandType: CommandType.StoredProcedure);
}
}
}

@ -0,0 +1,26 @@
using Dapper;
using AOLBackend.Contracts.Utils;
using AOLBackend.Context;
using AOLBackend.Models.Utils;
using System.Data;
namespace AOLBackend.Repository.Utils
{
public class FilePaths4ProcessRepository : IFilePaths4ProcessRepository
{
private readonly DapperContext _context;
public FilePaths4ProcessRepository(DapperContext context) { _context = context; }
public async Task<FilePaths4Process> getPaths4ProcessById(long id)
{
var query = "[Utils.FileManager.RootPath.Get]";
using var connection = _context.CreateConnection();
var entrada = await connection.QueryAsync<FilePaths4Process>(query, new
{
@id = id,
},
commandType: CommandType.StoredProcedure);
return entrada.First();
}
}
}

@ -0,0 +1,61 @@
using System.Net.Mail;
using System.Net;
using System;
using System.Collections.Generic;
using System.Text;
//using EASendMail;
namespace AOLBackend.Services.EmailSender
{
public class EmailSender
{
private IConfiguration _config;
public EmailSender(IConfiguration config)
{
_config = config;
}
public String SrvSendEmail(string htmlContent, string Subject, string toEmail)
{
string EmailServer = _config.GetValue<string>("EmailServer");
string EmailAccount = _config.GetValue<string>("EmailAccount");
string[] Email = EmailAccount.Split('@');
int EmailPort = Convert.ToInt32(_config.GetValue<string>("EmailPort"));
string EmailPassword = _config.GetValue<string>("EmailPassword");
string EmailUser = Email[0];
string EmailDomain = Email[1].Replace("@", "");
DateTime now = DateTime.Now;
try
{
using (var smtp = new SmtpClient(EmailServer, EmailPort))
{
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential(EmailAccount, EmailPassword);
smtp.Host = EmailServer;
var correo = new MailMessage(EmailAccount, toEmail);
correo.From = new MailAddress("<" + EmailAccount + ">", "<" + EmailUser + ">");
correo.Sender = new MailAddress("<" + EmailAccount + ">", "<" + EmailUser + ">");
correo.Headers.Add("Message-Id", String.Concat("<", now.ToString("yyMMdd"), ".", now.ToString("HHmmss"), "@alphaomega.com.mx>"));
correo.To.Add(toEmail);
correo.Subject = Subject;
correo.Body = "htmlContent";
correo.BodyEncoding = System.Text.Encoding.UTF8;
correo.SubjectEncoding = System.Text.Encoding.Default;
correo.IsBodyHtml = true;
smtp.Send(correo);
return "Message Sent Succesfully";
}
}
catch (Exception ex)
{
return ex.ToString();
}
}
public String SrvSendEmail2(string htmlContent, string Subject, string toEmail)
{
return "";
}
}
}

@ -0,0 +1,106 @@
using AOLBackend.Models.Utils;
using AOLBackend.Contracts.Utils;
using Microsoft.AspNetCore.Mvc;
namespace AOLBackend.Services.MFileManager
{
public class SvcMFileManager
{
private readonly IFileManagerRepository _Repo;
private readonly IConfiguration _config;
// private readonly IFilePaths4ProcessRepository _RepoRelativePath;
private readonly string rootPath;
public SvcMFileManager(IConfiguration config, IFileManagerRepository Repo, string _rootPath)
{
_config = config;
_Repo = Repo;
rootPath = _rootPath;
}
public async Task<List<FileManager>> GetFilesFromLog(int Tags, int Proceso)
{
return await _Repo.getAllFilesByProcess(Tags, Proceso);
}
public async Task<IActionResult> getFileContentById(long id)
{
Boolean ExisteEnDisco = false;
byte[] emptyFile = System.IO.File.ReadAllBytes("c:\\downs\\empty.png");
//byte[] emptyFile = System.IO.File.ReadAllBytes("D:\\data\\empty.png");
MemoryStream emptyms = new MemoryStream(emptyFile);
FileManager recFound = await _Repo.getFileById(id);
if (!String.IsNullOrEmpty(recFound.NombreArchivo))
{
try
{
if (System.IO.File.Exists(Path.Combine(rootPath, recFound.NombreArchivo)))
{
ExisteEnDisco = true;
}
else
{
return new FileStreamResult(emptyms, "image/png");
}
}
catch (IOException ex)
{
return new FileStreamResult(emptyms, "image/png");
}
if (ExisteEnDisco)
{
string fileMime = recFound.NombreArchivo.Substring(recFound.NombreArchivo.Length - 3).ToLower();
var mime = "application/" + fileMime.ToLower();
string targetFile = rootPath + "\\" + recFound.NombreArchivo;
if (System.IO.File.Exists(targetFile))
{
byte[] pdfBytes = System.IO.File.ReadAllBytes(targetFile);
MemoryStream ms = new MemoryStream(pdfBytes);
return new FileStreamResult(ms, mime);
}
}
}
return new FileStreamResult(emptyms, "image/png");
}
public async Task<List<string>> SaveFile2DiskList(List<IFormFile> FileList)
{
DateTime time = DateTime.Now;
var filePaths = new List<string>();
FileManager data = new FileManager();
foreach (var file in FileList)
{
string fileMime = file.FileName.Substring(file.FileName.Length - 4);
string newFileName = file.FileName.Replace(fileMime, "") + "_" + time.ToString("yyyy_MM_dd_HH_mm_ss") + fileMime;
if (file.Length > 0)
{
var filePath = rootPath + newFileName;
using (var stream = System.IO.File.Create(filePath))
{
await file.CopyToAsync(stream);
filePaths.Add(newFileName);
}
}
}
return filePaths;
}
public async Task<List<FileManager>> SaveFileLog(List<string> files, int Tags, int Proceso, int Usuario)
{
List<FileManager> resultados = new List<FileManager>();
foreach (string file in files)
{
FileManager data = new FileManager();
long fileLength = new System.IO.FileInfo(rootPath + file).Length / 1024;
data.id = 0;
data.IdUsuario = Usuario;
data.Proceso = Proceso;
data.NombreArchivo = file;
data.Tags = Tags.ToString();
data.Size = fileLength;
await _Repo.FileManager(data);
}
return await _Repo.getAllFilesByProcess(Tags, Proceso);
}
}
}

@ -5,14 +5,15 @@ namespace AOLBackend.Services.Tools
{
public class CryptDecrypt
{
private readonly static string key = "G3mc0H42hk3y2!0$2*2#n4813dc2h47p";
private readonly static string keyString = "G3mc0H42hk3y2!0$2*2#n4813dc2h47p";
private readonly static int BlockSize = 128;
public static string Encrypt(string text)
{
byte[] iv = new byte[16];
byte[] array;
using (Aes aes = Aes.Create())
{
aes.Key = Encoding.UTF8.GetBytes(key);
aes.Key = Encoding.UTF8.GetBytes(keyString);
aes.IV = iv;
ICryptoTransform encrypt = aes.CreateEncryptor(aes.Key, aes.IV);
using (MemoryStream ms = new MemoryStream())
@ -36,7 +37,7 @@ namespace AOLBackend.Services.Tools
byte[] buffer = Convert.FromBase64String(text);
using (Aes aes = Aes.Create())
{
aes.Key = Encoding.UTF8.GetBytes(key);
aes.Key = Encoding.UTF8.GetBytes(keyString);
aes.IV = iv;
ICryptoTransform decryptor = aes.CreateDecryptor(aes.Key, aes.IV);
using (MemoryStream ms = new MemoryStream(buffer))
@ -51,5 +52,176 @@ namespace AOLBackend.Services.Tools
}
}
}
/* public static string EncryptString(string text)
{
var key = Encoding.UTF8.GetBytes(keyString);
using (var aesAlg = Aes.Create())
{
using (var encryptor = aesAlg.CreateEncryptor(key, aesAlg.IV))
{
using (var msEncrypt = new MemoryStream())
{
using (var csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
using (var swEncrypt = new StreamWriter(csEncrypt)) { swEncrypt.Write(text); }
var iv = aesAlg.IV;
var decryptedContent = msEncrypt.ToArray();
var result = new byte[iv.Length + decryptedContent.Length];
Buffer.BlockCopy(iv, 0, result, 0, iv.Length);
Buffer.BlockCopy(decryptedContent, 0, result, iv.Length, decryptedContent.Length);
msEncrypt.Flush();
msEncrypt.Close();
return Convert.ToBase64String(result);
}
}
}
}
public static string DecryptString(string cipherText)
{
var fullCipher = Convert.FromBase64String(cipherText);
var iv = new byte[16];
var cipher = new byte[16];
Buffer.BlockCopy(fullCipher, 0, iv, 0, iv.Length);
Buffer.BlockCopy(fullCipher, iv.Length, cipher, 0, iv.Length);
var key = Encoding.UTF8.GetBytes(keyString);
using (var aesAlg = Aes.Create())
{
using (var decryptor = aesAlg.CreateDecryptor(key, iv))
{
string result;
using (var msDecrypt = new MemoryStream(cipher))
{
using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
{
using (var srDecrypt = new StreamReader(csDecrypt))
{
result = srDecrypt.ReadToEnd();
}
}
}
return result;
}
}
}
private static char Cipher(char ch, int key)
{
if (!char.IsLetter(ch))
return ch;
char offset = char.IsUpper(ch) ? 'A' : 'a';
return (char)((((ch + key) - offset) % 26) + offset);
}
public static string Encipher(string input, int key)
{
string output = string.Empty;
foreach (char ch in input)
output += Cipher(ch, key);
return output;
}
public static string Decipher(string input, int key)
{
return Encipher(input, 26 - key);
}
static public byte[] Encryption(byte[] Data, bool DoOAEPPadding)
{
try
{
byte[] encryptedData;
using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
{
RSA.ImportParameters(RSA.ExportParameters(false));
encryptedData = RSA.Encrypt(Data, DoOAEPPadding);
}
return encryptedData;
}
catch (CryptographicException e)
{
Console.WriteLine(e.Message);
return null;
}
}
static public byte[] Decryption(byte[] Data, bool DoOAEPPadding)
{
try
{
byte[] decryptedData;
using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
{
RSA.ImportParameters(RSA.ExportParameters(true));
decryptedData = RSA.Decrypt(Data, DoOAEPPadding);
}
return decryptedData;
}
catch (CryptographicException e)
{
Console.WriteLine(e.ToString());
return null;
}
}
*/
public static string Encryption(string strText)
{
var publicKey = "<RSAKeyValue><Modulus>21wEnTU+mcD2w0Lfo1Gv4rtcSWsQJQTNa6gio05AOkV/Er9w3Y13Ddo5wGtjJ19402S71HUeN0vbKILLJdRSES5MHSdJPSVrOqdrll/vLXxDxWs/U0UT1c8u6k/Ogx9hTtZxYwoeYqdhDblof3E75d9n2F0Zvf6iTb4cI7j6fMs=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";
var testData = Encoding.UTF8.GetBytes(strText);
using (var rsa = new RSACryptoServiceProvider(1024))
{
try
{
// client encrypting data with public key issued by server
rsa.FromXmlString(publicKey.ToString());
var encryptedData = rsa.Encrypt(testData, true);
var base64Encrypted = Convert.ToBase64String(encryptedData);
return base64Encrypted;
}
finally
{
rsa.PersistKeyInCsp = false;
}
}
}
public static string Decryption(string strText)
{
var privateKey = "<RSAKeyValue><Modulus>21wEnTU+mcD2w0Lfo1Gv4rtcSWsQJQTNa6gio05AOkV/Er9w3Y13Ddo5wGtjJ19402S71HUeN0vbKILLJdRSES5MHSdJPSVrOqdrll/vLXxDxWs/U0UT1c8u6k/Ogx9hTtZxYwoeYqdhDblof3E75d9n2F0Zvf6iTb4cI7j6fMs=</Modulus><Exponent>AQAB</Exponent><P>/aULPE6jd5IkwtWXmReyMUhmI/nfwfkQSyl7tsg2PKdpcxk4mpPZUdEQhHQLvE84w2DhTyYkPHCtq/mMKE3MHw==</P><Q>3WV46X9Arg2l9cxb67KVlNVXyCqc/w+LWt/tbhLJvV2xCF/0rWKPsBJ9MC6cquaqNPxWWEav8RAVbmmGrJt51Q==</Q><DP>8TuZFgBMpBoQcGUoS2goB4st6aVq1FcG0hVgHhUI0GMAfYFNPmbDV3cY2IBt8Oj/uYJYhyhlaj5YTqmGTYbATQ==</DP><DQ>FIoVbZQgrAUYIHWVEYi/187zFd7eMct/Yi7kGBImJStMATrluDAspGkStCWe4zwDDmdam1XzfKnBUzz3AYxrAQ==</DQ><InverseQ>QPU3Tmt8nznSgYZ+5jUo9E0SfjiTu435ihANiHqqjasaUNvOHKumqzuBZ8NRtkUhS6dsOEb8A2ODvy7KswUxyA==</InverseQ><D>cgoRoAUpSVfHMdYXW9nA3dfX75dIamZnwPtFHq80ttagbIe4ToYYCcyUz5NElhiNQSESgS5uCgNWqWXt5PnPu4XmCXx6utco1UVH8HGLahzbAnSy6Cj3iUIQ7Gj+9gQ7PkC434HTtHazmxVgIR5l56ZjoQ8yGNCPZnsdYEmhJWk=</D></RSAKeyValue>";
var testData = Encoding.UTF8.GetBytes(strText);
using (var rsa = new RSACryptoServiceProvider(1024))
{
try
{
var base64Encrypted = strText;
// server decrypting data with private key
rsa.FromXmlString(privateKey);
var resultBytes = Convert.FromBase64String(base64Encrypted);
var decryptedBytes = rsa.Decrypt(resultBytes, true);
var decryptedData = Encoding.UTF8.GetString(decryptedBytes);
return decryptedData.ToString();
}
finally
{
rsa.PersistKeyInCsp = false;
}
}
}
}
}

@ -1,7 +1,7 @@
{
/* "ConnectionStrings": {
"SqlConnection": "server=127.0.0.1,14033; database=GEMCO; User Id=sa;Password=toor1234.;Encrypt=False;"
}, */
{
"ConnectionStrings": {
"SqlConnection": "server=.; database=AOL; Integrated Security=true;TrustServerCertificate=True;"
},
"Logging": {
"LogLevel": {
"Default": "Information",

@ -1,7 +1,6 @@
{
"ConnectionStrings": {
"SqlConnection": "server=.; database=AOL; Integrated Security=true;TrustServerCertificate=True;"
// "SqlConnection": "server=127.0.0.1,14033; database=GEMCO; User Id=sa; Password=toor1234.; TrustServerCertificate=True;"
"SqlConnection": "server=localhost; database=AOL; User Id=AOLadmin;Password=40La6m1n.22;Encrypt=False;"
},
"DefaultUser": {
"Password": "Bienvenido123!"
@ -18,10 +17,15 @@
"Issuer": "JWTAuthenticationServer",
"Audience": "JWTServicePostmanClient",
"Subject": "JWTServiceAccessToken",
"ExpirationHours": 4
"ExpirationHours": 4,
"ExpirationMinutes": 1
},
"EmailServer": "146.20.161.11",
"EmailPort": 587,
"EmailServer": "alphaomega-com-mx.mail.protection.outlook.com",
"EmailPort": "25",
"EmailUser": "noreply",
"EmailDomian": "alphaomega.com.mx",
"EmailAccount": "noreply@alphaomega.com.mx",
"EmailPassword": "Al%G22a3",
"pathArchivoElectronico": "D:\\data\\ArchivoElectronicoSIR\\www.gemcousa.com\\SIR-GEMCO\\DOCS-SIR\\",
"pathTemp": "D:\\data\\temp\\",
"pathFotosBodega": "D:\\data\\Bodega\\Fotos\\",

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,7 +1,7 @@
{
/* "ConnectionStrings": {
"SqlConnection": "server=127.0.0.1,14033; database=GEMCO; User Id=sa;Password=toor1234.;Encrypt=False;"
}, */
{
"ConnectionStrings": {
"SqlConnection": "server=.; database=AOL; Integrated Security=true;TrustServerCertificate=True;"
},
"Logging": {
"LogLevel": {
"Default": "Information",

@ -1,7 +1,6 @@
{
"ConnectionStrings": {
"SqlConnection": "server=.; database=AOL; Integrated Security=true;TrustServerCertificate=True;"
// "SqlConnection": "server=127.0.0.1,14033; database=GEMCO; User Id=sa; Password=toor1234.; TrustServerCertificate=True;"
"SqlConnection": "server=localhost; database=AOL; User Id=AOLadmin;Password=40La6m1n.22;Encrypt=False;"
},
"DefaultUser": {
"Password": "Bienvenido123!"
@ -18,10 +17,15 @@
"Issuer": "JWTAuthenticationServer",
"Audience": "JWTServicePostmanClient",
"Subject": "JWTServiceAccessToken",
"ExpirationHours": 4
"ExpirationHours": 4,
"ExpirationMinutes": 1
},
"EmailServer": "146.20.161.11",
"EmailPort": 587,
"EmailServer": "alphaomega-com-mx.mail.protection.outlook.com",
"EmailPort": "25",
"EmailUser": "noreply",
"EmailDomian": "alphaomega.com.mx",
"EmailAccount": "noreply@alphaomega.com.mx",
"EmailPassword": "Al%G22a3",
"pathArchivoElectronico": "D:\\data\\ArchivoElectronicoSIR\\www.gemcousa.com\\SIR-GEMCO\\DOCS-SIR\\",
"pathTemp": "D:\\data\\temp\\",
"pathFotosBodega": "D:\\data\\Bodega\\Fotos\\",

@ -75,7 +75,8 @@
"net47",
"net471",
"net472",
"net48"
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
@ -87,7 +88,7 @@
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.100\\RuntimeIdentifierGraph.json"
}
}
}

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Alfonso Garcia\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.4.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Alfonso Garcia\.nuget\packages\" />

@ -5,12 +5,13 @@ build_property.UsingMicrosoftNETSdkWeb = true
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AOLBackend
build_property.RootNamespace = AOLBackend
build_property.ProjectDir = C:\projects\staging\AOLBackend\
build_property.ProjectDir = c:\Projects\staging\AOLBackend\
build_property.RazorLangVersion = 6.0
build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = C:\projects\staging\AOLBackend
build_property.MSBuildProjectDirectory = c:\Projects\staging\AOLBackend
build_property._RazorSourceGeneratorDebug =

@ -1 +1 @@
eefe8f67b06397f0ffbb2eddb23dd69eb10fac57
98dcc38fb2c7ab63ef7a47333e0e07fce2a8e400

@ -40,45 +40,50 @@ C:\projects\staging\AOL\AOLBackend\obj\Debug\net6.0\refint\AOLBackend.dll
C:\projects\staging\AOL\AOLBackend\obj\Debug\net6.0\AOLBackend.pdb
C:\projects\staging\AOL\AOLBackend\obj\Debug\net6.0\AOLBackend.genruntimeconfig.cache
C:\projects\staging\AOL\AOLBackend\obj\Debug\net6.0\ref\AOLBackend.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\appsettings.Development.json
C:\projects\staging\AOLBackend\bin\Debug\net6.0\appsettings.json
C:\projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.exe
C:\projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.deps.json
C:\projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.runtimeconfig.json
C:\projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.pdb
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Dapper.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Abstractions.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.JsonWebTokens.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Logging.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Protocols.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Tokens.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.OpenApi.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Swashbuckle.AspNetCore.Swagger.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Swashbuckle.AspNetCore.SwaggerGen.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\Swashbuckle.AspNetCore.SwaggerUI.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\System.Data.SqlClient.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\System.IdentityModel.Tokens.Jwt.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win-arm64\native\sni.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win-x64\native\sni.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win-x86\native\sni.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\unix\lib\netcoreapp2.1\System.Data.SqlClient.dll
C:\projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.csproj.AssemblyReference.cache
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.GeneratedMSBuildEditorConfig.editorconfig
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.AssemblyInfoInputs.cache
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.AssemblyInfo.cs
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.csproj.CoreCompileInputs.cache
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.MvcApplicationPartsAssemblyInfo.cs
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.MvcApplicationPartsAssemblyInfo.cache
C:\projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets.build.json
C:\projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets.development.json
C:\projects\staging\AOLBackend\obj\Debug\net6.0\scopedcss\bundle\AOLBackend.styles.css
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.csproj.CopyComplete
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.dll
C:\projects\staging\AOLBackend\obj\Debug\net6.0\refint\AOLBackend.dll
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.pdb
C:\projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.genruntimeconfig.cache
C:\projects\staging\AOLBackend\obj\Debug\net6.0\ref\AOLBackend.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\appsettings.Development.json
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\appsettings.json
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.exe
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.deps.json
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.runtimeconfig.json
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\AOLBackend.pdb
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Dapper.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Abstractions.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.JsonWebTokens.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Logging.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Protocols.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.IdentityModel.Tokens.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Microsoft.OpenApi.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Swashbuckle.AspNetCore.Swagger.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Swashbuckle.AspNetCore.SwaggerGen.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\Swashbuckle.AspNetCore.SwaggerUI.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\System.Data.SqlClient.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\System.IdentityModel.Tokens.Jwt.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win-arm64\native\sni.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win-x64\native\sni.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win-x86\native\sni.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\unix\lib\netcoreapp2.1\System.Data.SqlClient.dll
C:\Projects\staging\AOLBackend\bin\Debug\net6.0\runtimes\win\lib\netcoreapp2.1\System.Data.SqlClient.dll
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.csproj.AssemblyReference.cache
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.GeneratedMSBuildEditorConfig.editorconfig
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.AssemblyInfoInputs.cache
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.AssemblyInfo.cs
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.csproj.CoreCompileInputs.cache
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.MvcApplicationPartsAssemblyInfo.cs
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.MvcApplicationPartsAssemblyInfo.cache
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets\msbuild.AOLBackend.Microsoft.AspNetCore.StaticWebAssets.props
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets\msbuild.build.AOLBackend.props
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets\msbuild.buildMultiTargeting.AOLBackend.props
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets\msbuild.buildTransitive.AOLBackend.props
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets.pack.json
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets.build.json
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\staticwebassets.development.json
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\scopedcss\bundle\AOLBackend.styles.css
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.csproj.CopyComplete
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.dll
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\refint\AOLBackend.dll
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.pdb
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\AOLBackend.genruntimeconfig.cache
C:\Projects\staging\AOLBackend\obj\Debug\net6.0\ref\AOLBackend.dll

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -5,10 +5,14 @@
"Dapper/2.0.123": {
"type": "package",
"compile": {
"lib/net5.0/Dapper.dll": {}
"lib/net5.0/Dapper.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net5.0/Dapper.dll": {}
"lib/net5.0/Dapper.dll": {
"related": ".xml"
}
}
},
"Microsoft.AspNetCore.Authentication.JwtBearer/6.0.8": {
@ -17,10 +21,14 @@
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "6.10.0"
},
"compile": {
"lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": {}
"lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": {}
"lib/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": {
"related": ".xml"
}
},
"frameworkReferences": [
"Microsoft.AspNetCore.App"
@ -49,10 +57,14 @@
"Microsoft.IdentityModel.Abstractions/6.22.0": {
"type": "package",
"compile": {
"lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": {}
"lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": {}
"lib/net6.0/Microsoft.IdentityModel.Abstractions.dll": {
"related": ".xml"
}
}
},
"Microsoft.IdentityModel.JsonWebTokens/6.22.0": {
@ -61,10 +73,14 @@
"Microsoft.IdentityModel.Tokens": "6.22.0"
},
"compile": {
"lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": {}
"lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": {}
"lib/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll": {
"related": ".xml"
}
}
},
"Microsoft.IdentityModel.Logging/6.22.0": {
@ -73,10 +89,14 @@
"Microsoft.IdentityModel.Abstractions": "6.22.0"
},
"compile": {
"lib/net6.0/Microsoft.IdentityModel.Logging.dll": {}
"lib/net6.0/Microsoft.IdentityModel.Logging.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.IdentityModel.Logging.dll": {}
"lib/net6.0/Microsoft.IdentityModel.Logging.dll": {
"related": ".xml"
}
}
},
"Microsoft.IdentityModel.Protocols/6.10.0": {
@ -86,10 +106,14 @@
"Microsoft.IdentityModel.Tokens": "6.10.0"
},
"compile": {
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.dll": {}
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.dll": {}
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.dll": {
"related": ".xml"
}
}
},
"Microsoft.IdentityModel.Protocols.OpenIdConnect/6.10.0": {
@ -99,10 +123,14 @@
"System.IdentityModel.Tokens.Jwt": "6.10.0"
},
"compile": {
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": {}
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": {}
"lib/netstandard2.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": {
"related": ".xml"
}
}
},
"Microsoft.IdentityModel.Tokens/6.22.0": {
@ -113,10 +141,14 @@
"System.Security.Cryptography.Cng": "4.5.0"
},
"compile": {
"lib/net6.0/Microsoft.IdentityModel.Tokens.dll": {}
"lib/net6.0/Microsoft.IdentityModel.Tokens.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/Microsoft.IdentityModel.Tokens.dll": {}
"lib/net6.0/Microsoft.IdentityModel.Tokens.dll": {
"related": ".xml"
}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {
@ -131,10 +163,14 @@
"Microsoft.OpenApi/1.2.3": {
"type": "package",
"compile": {
"lib/netstandard2.0/Microsoft.OpenApi.dll": {}
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
"related": ".pdb;.xml"
}
},
"runtime": {
"lib/netstandard2.0/Microsoft.OpenApi.dll": {}
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
"related": ".pdb;.xml"
}
}
},
"Microsoft.Win32.Registry/4.7.0": {
@ -144,10 +180,14 @@
"System.Security.Principal.Windows": "4.7.0"
},
"compile": {
"ref/netstandard2.0/_._": {}
"ref/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {}
"lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
"related": ".xml"
}
},
"runtimeTargets": {
"runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
@ -213,10 +253,14 @@
"Microsoft.OpenApi": "1.2.3"
},
"compile": {
"lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {}
"lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {
"related": ".pdb;.xml"
}
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {}
"lib/net6.0/Swashbuckle.AspNetCore.Swagger.dll": {
"related": ".pdb;.xml"
}
},
"frameworkReferences": [
"Microsoft.AspNetCore.App"
@ -228,19 +272,27 @@
"Swashbuckle.AspNetCore.Swagger": "6.2.3"
},
"compile": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {}
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
"related": ".pdb;.xml"
}
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {}
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
"related": ".pdb;.xml"
}
}
},
"Swashbuckle.AspNetCore.SwaggerUI/6.2.3": {
"type": "package",
"compile": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {}
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
"related": ".pdb;.xml"
}
},
"runtime": {
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {}
"lib/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
"related": ".pdb;.xml"
}
},
"frameworkReferences": [
"Microsoft.AspNetCore.App"
@ -254,10 +306,14 @@
"runtime.native.System.Data.SqlClient.sni": "4.7.0"
},
"compile": {
"ref/netcoreapp2.1/System.Data.SqlClient.dll": {}
"ref/netcoreapp2.1/System.Data.SqlClient.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netcoreapp2.1/System.Data.SqlClient.dll": {}
"lib/netcoreapp2.1/System.Data.SqlClient.dll": {
"related": ".xml"
}
},
"runtimeTargets": {
"runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll": {
@ -277,10 +333,14 @@
"Microsoft.IdentityModel.Tokens": "6.22.0"
},
"compile": {
"lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": {}
"lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": {}
"lib/net6.0/System.IdentityModel.Tokens.Jwt.dll": {
"related": ".xml"
}
}
},
"System.Security.AccessControl/4.7.0": {
@ -290,10 +350,14 @@
"System.Security.Principal.Windows": "4.7.0"
},
"compile": {
"ref/netstandard2.0/_._": {}
"ref/netstandard2.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Security.AccessControl.dll": {}
"lib/netstandard2.0/System.Security.AccessControl.dll": {
"related": ".xml"
}
},
"runtimeTargets": {
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
@ -305,7 +369,9 @@
"System.Security.Cryptography.Cng/4.5.0": {
"type": "package",
"compile": {
"ref/netcoreapp2.1/System.Security.Cryptography.Cng.dll": {}
"ref/netcoreapp2.1/System.Security.Cryptography.Cng.dll": {
"related": ".xml"
}
},
"runtime": {
"lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll": {}
@ -320,10 +386,14 @@
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"compile": {
"ref/netcoreapp3.0/_._": {}
"ref/netcoreapp3.0/_._": {
"related": ".xml"
}
},
"runtime": {
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {}
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
"related": ".xml"
}
},
"runtimeTargets": {
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
@ -1102,11 +1172,11 @@
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\projects\\staging\\AOLBackend\\AOLBackend.csproj",
"projectUniqueName": "C:\\Projects\\staging\\AOLBackend\\AOLBackend.csproj",
"projectName": "AOLBackend",
"projectPath": "C:\\projects\\staging\\AOLBackend\\AOLBackend.csproj",
"projectPath": "C:\\Projects\\staging\\AOLBackend\\AOLBackend.csproj",
"packagesPath": "C:\\Users\\Alfonso Garcia\\.nuget\\packages\\",
"outputPath": "C:\\projects\\staging\\AOLBackend\\obj\\",
"outputPath": "C:\\Projects\\staging\\AOLBackend\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Alfonso Garcia\\AppData\\Roaming\\NuGet\\NuGet.Config",
@ -1170,7 +1240,8 @@
"net47",
"net471",
"net472",
"net48"
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
@ -1182,7 +1253,7 @@
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.100\\RuntimeIdentifierGraph.json"
}
}
}

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "h1u0HQs4mEbTV4WJsMrgE3Hunt3CLJp7/89fjgdV6zy7e/QRVuYOEoC0xk2j+AEakhvCr9H5jhqvtHtrM+sycw==",
"dgSpecHash": "rBIRBlcPbX0fjjiwFZySjBCqrfo4F0ceRPhnq+vPt64/UiER8fOjOU2oEMJ8iR8m6l1m7+CyXrI0IiOW1jV5ZA==",
"success": true,
"projectFilePath": "C:\\projects\\staging\\AOLBackend\\AOLBackend.csproj",
"expectedPackageFiles": [

@ -142,3 +142,312 @@
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0

Loading…
Cancel
Save