superbobface
superbobface
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
thanks for looking tho
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
lol dont worry, I've gotta head out shortly, nah its privvy
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
starst with this var builder = WebApplication.CreateBuilder(args);
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
Microsoft.AspNETCore.App and Microsoft.NetCore.App
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
CoreWCF.Http, CoreWCF.Primites and System.Data.SqlClietn
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
fair, instead pass options into the service contstructor? Or reference the orgiinal app class?
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
public IntefleCSService(IConfiguration configuration) { _config = configuration; }
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
its this IntefleCSService that can't be created
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
var builder = WebApplication.CreateBuilder(args);

builder.Logging.AddConsole();

builder.WebHost.ConfigureKestrel((context, options) =>
{
options.AllowSynchronousIO = true;
});

// Add WSDL support
builder.Services.AddServiceModelServices().AddServiceModelMetadata();
builder.Services.AddSingleton<IServiceBehavior, UseRequestHeadersForMetadataAddressBehavior>();
builder.Services.AddOptions();
var app = builder.Build();

// Configure an explicit none credential type for WSHttpBinding as it defaults to Windows which requires extra configuration in ASP.NET
var myWSHttpBinding = new WSHttpBinding(SecurityMode.Transport);
myWSHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;

app.UseServiceModel(builder =>
{
builder.AddService<EchoService>((serviceOptions) => { })
.AddService<IntefleCSService>((serviceOptions) => { serviceOptions.DebugBehavior.IncludeExceptionDetailInFaults = true; })
// Add a BasicHttpBinding at a specific endpoint
.AddServiceEndpoint<EchoService, IEchoService>(new BasicHttpBinding(), "/EchoService/")
// Add a WSHttpBinding with Transport Security for TLS
//.AddServiceEndpoint<EchoService, IEchoService>(myWSHttpBinding, "/EchoService/WSHttps")
// Add a BasicHttpBinding at a specific endpoint
.AddServiceEndpoint<IntefleCSService, IIntefleCSService>(new BasicHttpBinding(), "/IntefleCSService/");
// Add a WSHttpBinding with Transport Security for TLS
//.AddServiceEndpoint<IntefleCSService, IIntefleCSService>(myWSHttpBinding, "/IntefleCSService/WSHttps");
});

var serviceMetadataBehavior = app.Services.GetRequiredService<CoreWCF.Description.ServiceMetadataBehavior>();
serviceMetadataBehavior.HttpGetEnabled = true;

app.Run();
var builder = WebApplication.CreateBuilder(args);

builder.Logging.AddConsole();

builder.WebHost.ConfigureKestrel((context, options) =>
{
options.AllowSynchronousIO = true;
});

// Add WSDL support
builder.Services.AddServiceModelServices().AddServiceModelMetadata();
builder.Services.AddSingleton<IServiceBehavior, UseRequestHeadersForMetadataAddressBehavior>();
builder.Services.AddOptions();
var app = builder.Build();

// Configure an explicit none credential type for WSHttpBinding as it defaults to Windows which requires extra configuration in ASP.NET
var myWSHttpBinding = new WSHttpBinding(SecurityMode.Transport);
myWSHttpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;

app.UseServiceModel(builder =>
{
builder.AddService<EchoService>((serviceOptions) => { })
.AddService<IntefleCSService>((serviceOptions) => { serviceOptions.DebugBehavior.IncludeExceptionDetailInFaults = true; })
// Add a BasicHttpBinding at a specific endpoint
.AddServiceEndpoint<EchoService, IEchoService>(new BasicHttpBinding(), "/EchoService/")
// Add a WSHttpBinding with Transport Security for TLS
//.AddServiceEndpoint<EchoService, IEchoService>(myWSHttpBinding, "/EchoService/WSHttps")
// Add a BasicHttpBinding at a specific endpoint
.AddServiceEndpoint<IntefleCSService, IIntefleCSService>(new BasicHttpBinding(), "/IntefleCSService/");
// Add a WSHttpBinding with Transport Security for TLS
//.AddServiceEndpoint<IntefleCSService, IIntefleCSService>(myWSHttpBinding, "/IntefleCSService/WSHttps");
});

var serviceMetadataBehavior = app.Services.GetRequiredService<CoreWCF.Description.ServiceMetadataBehavior>();
serviceMetadataBehavior.HttpGetEnabled = true;

app.Run();
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
magic net6 stuff that freaks me out 🙂
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
no, just Program.cs
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
thats what VS thinks it is hovering over the parameter to the service class constructor
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
Microsoft.Extensions.Configuration.IConfiguration
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
let me double check
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
well i dont think so
32 replies
CC#
Created by superbobface on 4/22/2023 in #help
❔ .net core 6 IConfiguration Injection
if I inspect app just before calling Run() "{[{Name = IConfiguration FullName = Microsoft.Extensions.Configuration.IConfiguration}, {Method = {System.Object <CreateServiceAccessor>b__1(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)}}]}" this is in the realizedServics list
32 replies
CC#
Created by superbobface on 3/28/2023 in #help
❔ Exclude items from linq query if they contain one from an array of substrings
thank you tho
28 replies