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

WCF integration calls wrong ctor of ServiceHost base in case of InstanceContextMode.Single #197

Closed
TheBigRic opened this issue Mar 2, 2016 · 1 comment
Assignees
Milestone

Comments

@TheBigRic
Copy link
Collaborator

see this stackoverflow question.

In case of a singleton mode configured WCF service this constructor

public ServiceHost(
    object singletonInstance,
    params Uri[] baseAddresses
)

should be called otherwise WCF will try to create the type itself and it therefore needs a default constructor.

Currently SimpleInjectorServiceHost calls the most obvious ctor where a type is supplied, probably because you would expect WCF the call back into the container for the first resolve, but that is not the case!

@dotnetjunkie dotnetjunkie added this to the v3.1.3 milestone Apr 6, 2016
@dotnetjunkie dotnetjunkie self-assigned this Apr 7, 2016
dotnetjunkie pushed a commit that referenced this issue Apr 9, 2016
WCF integration failed to create WCF services marked with
InstanceContextMode.Single. (fixes #197)
@dotnetjunkie
Copy link
Collaborator

Fixed in v3.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants