Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing WcfProxy.DefaultBinding or its properties has no effect #739

Closed
klk103 opened this issue Jul 5, 2017 · 3 comments
Closed

Changing WcfProxy.DefaultBinding or its properties has no effect #739

klk103 opened this issue Jul 5, 2017 · 3 comments
Labels
Milestone

Comments

@klk103
Copy link
Contributor

klk103 commented Jul 5, 2017

I'm working on a PowerShell script that uses some of our existing business objects, and connects to a dataportal on our application server the same way that our other applications do, instead of using a local in-process portal.

I can't use the standard app.config approach (because PowerShell), so I thought that configuring the dataportal in the script would look like this (we use transport security instead of message):

[Csla.ApplicationContext]::DataPortalProxy = [Csla.DataPortalClient.WcfProxy].AssemblyQualifiedName
[Csla.ApplicationContext]::DataPortalUrlString = "https://portal.internal/Production.svc"
[Csla.DataPortalClient.WcfProxy]::DefaultBinding.Security.Mode = [System.ServiceModel.SecurityMode]::Transport

But apparently the Binding property that's loaded from DefaultBinding isn't actually used when creating a channel, so the security mode isn't applied to the binding that's ultimately used.

@rockfordlhotka
Copy link
Member

@klk103, I like the changes - the code is cleaner the way you have it now.

I do wonder if this is a potential breaking change for existing code? Or was this broken in a way that your updates won't break anyone?

@rockfordlhotka rockfordlhotka added this to the 4.7.100 milestone Jul 7, 2017
@klk103
Copy link
Contributor Author

klk103 commented Jul 10, 2017

I believe it's the latter. The Core/Xamarin code actually uses the Binding property correctly, which was a BasicHttpBinding before and still is for those builds, and the rest of the builds incorrectly used WsHttpBinding every time, which is now their default.

The only scenario I can see this causing issues for is if anyone with a .Net 4.x project was modifying DefaultBinding, or they subclassed WcfProxy and made changes to Binding. That code would currently have no effect, but it would become "active" if this change was made.

rockfordlhotka added a commit that referenced this issue Jul 10, 2017
#739 WcfProxy consistently uses DefaultBinding if enabled
@rockfordlhotka rockfordlhotka modified the milestones: 4.6.603, 4.7.100 Jul 19, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants