You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to migrate an existing project from .net48 to .net8. During migration an existing implementation of IEndpointBehavior I get stucked. Because the compiler does not found the property DispatchRuntime, but if I look into the implementation the property is already there (but returns always null, what is also confusing to me), see screenshot.
Also intellisense does not provide any property of the EndpointDispatcher, what I don't understand, because everything is public, see second screenshot.
Targetframework: .net8.0-windows
Packages:
System.ServiceModel.NetTcp (8.0.0)
System.ServiceModel.Primitives (8.0.0)
To Reproduce
Added a playground project, to abstract things from the main project... Important part is the .net8 client - HeaderContextBehavior, Line 49.
The idea is to add and retrieve custom header information from the messages.
(Currently the sample server does nothing with added header information. But during porting same things for the server part with core wcf , the DispatchRuntime property is available, as I see in my main project.)
You can get to the DispatchRuntime in the ApplyClientBehavior method. Change your implementation to this and it should work. Let me know if that doesn't work for you.
@j-bernhard@mconnew
Hi,
I have a similar problem while trying to register EndpointBehaviors to SOAP endpoint in Program.cs. The method UseSoapEndpoint does not allow me to add EndpointBehaviors.
Do you have any advice or recommendations for me?
Thank you,
Ondřej Macháček
builder.Services.AddSingleton<ServerMessageLoggerBehavior>();
var app = builder.Build();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.UseSoapEndpoint<ISimpleSOAPService>("/SimpleSOAPService.asmx", new SoapEncoderOptions(), SoapSerializer.XmlSerializer, configure =>
{
var serviceProvider = app.Services;
var logger = serviceProvider.GetRequiredService<ILogger<ServerMessageInspector>>();
configure.EndpointBehaviors.Add(new ServerMessageLoggerBehavior(logger));
});
Hy,
Describe the bug
I am trying to migrate an existing project from .net48 to .net8. During migration an existing implementation of IEndpointBehavior I get stucked. Because the compiler does not found the property DispatchRuntime, but if I look into the implementation the property is already there (but returns always null, what is also confusing to me), see screenshot.
Also intellisense does not provide any property of the EndpointDispatcher, what I don't understand, because everything is public, see second screenshot.
Targetframework: .net8.0-windows
Packages:
To Reproduce
Added a playground project, to abstract things from the main project... Important part is the .net8 client - HeaderContextBehavior, Line 49.
The idea is to add and retrieve custom header information from the messages.
(Currently the sample server does nothing with added header information. But during porting same things for the server part with core wcf , the DispatchRuntime property is available, as I see in my main project.)
CoreWcf.zip
Expected behavior
That the property can be access and provide the same behavior as before (net48), or another way how to solve issue.
Screenshots
![image](https://private-user-images.githubusercontent.com/8314146/334435065-8926f0fa-25cf-428a-ba57-995c499cb6e5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0MjMwNzUsIm5iZiI6MTcyMTQyMjc3NSwicGF0aCI6Ii84MzE0MTQ2LzMzNDQzNTA2NS04OTI2ZjBmYS0yNWNmLTQyOGEtYmE1Ny05OTVjNDk5Y2I2ZTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTlUMjA1OTM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWMxNzAwNGNmMjUxYWY1MjJlOWM3ZjhiODg2NDNlNGQwMTgxZjAzMGQ0YTBjMTY2M2EwMDRkYTJlZGJiZWFhOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ENDuf85IPromp-E3tb95Ay60qwe6shXUybexkMiF8kw)
Additional context
Regards,
Joerg
The text was updated successfully, but these errors were encountered: