automated dev commit
This commit is contained in:
commit
7551b4d824
18 changed files with 870 additions and 0 deletions
43
Program.cs
Normal file
43
Program.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using SoapCore;
|
||||
using SoapService.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Agregar servicios al contenedor
|
||||
builder.Services.AddSoapCore();
|
||||
builder.Services.TryAddSingleton<IWsServicioDeInformacion, WsServicioDeInformacion>();
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
|
||||
// Configurar Logging
|
||||
builder.Logging.AddConsole();
|
||||
builder.Logging.AddDebug();
|
||||
|
||||
// Configurar URL y Kestrel
|
||||
builder.WebHost.UseKestrel(options =>
|
||||
{
|
||||
options.ListenAnyIP(5050);
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configurar el pipeline HTTP
|
||||
app.UseHttpsRedirection();
|
||||
app.UseRouting();
|
||||
|
||||
// Configurar endpoints SOAP
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.UseSoapEndpoint<IWsServicioDeInformacion>(
|
||||
"/WsServicioDeInformacion.svc",
|
||||
new SoapEncoderOptions(),
|
||||
SoapSerializer.DataContractSerializer);
|
||||
|
||||
endpoints.UseSoapEndpoint<IWsServicioDeInformacion>(
|
||||
"/WsServicioDeInformacion.asmx",
|
||||
new SoapEncoderOptions(),
|
||||
SoapSerializer.XmlSerializer);
|
||||
});
|
||||
|
||||
app.Run();
|
Loading…
Add table
Add a link
Reference in a new issue