Can you try registering it as a transient and see if that resolves your
issue
Kernel.Register(
Component.For<ServiceMetadataBehavior>().Lifestyle.Transient )

On Wed, Jun 24, 2009 at 8:31 AM, Bergius <[email protected]> wrote:

>
> Like this (based on examples such as the WcfIntegration demo):
>
> var smb = new ServiceMetadataBehavior { HttpsGetEnabled = true };
> kernel.Register( Component.For<IServiceBehavior>().Instance( smb ) );
>
> Maybe I could've solved it with ImplementedBy and component
> parameters?
>
> On Jun 24, 3:14 pm, Craig Neuwirt <[email protected]> wrote:
> > How was the ServiceMetadataBehavior added when it was mixing the wsdl?
> >
> > On Wed, Jun 24, 2009 at 8:08 AM, Bergius <[email protected]> wrote:
> >
> > > If anyone encounters this problem, the solution that worked for me was
> > > to create my own ServiceHostFactory (which inherits
> > > DefaultServiceHostFactory) and add a new ServiceMetadataBehavior
> > > instance per host it creates, instead of registering a single
> > > ServiceMetadataBehavior instance on the kernel (as per every test and
> > > example I've found to date).
> >
> > > If I've missed anything obvious that would have solved the problem
> > > outlined below, do let me know.
> >
> > > / Bergius
> >
> > > On Jun 16, 2:36 pm, Bergius <[email protected]> wrote:
> > > > Hi all.
> >
> > > > Environment: IIS 7 and WcfFacility. .svc files are generated and
> > > > services are auto-wired on app start. web.config contains zero
> service/
> > > > behavior configuration. ServiceMetadataBehavior with HttpsGetEnabled.
> >
> > > > My goal: SomeService.svc?wsdlshould publish only information
> > > > regarding SomeService
> > > > OR one Service.svc?wsdlshould publish information regarding all
> > > > registered services.
> >
> > > > The problem/oddness: when app has started, a first request to
> > > > SomeService.svc?wsdlreveals information only about SomeService. When
> > > > requesting AnotherService.svc?wsdl, it contains information about
> both
> > > > SomeService and AnotherService. Refreshing SomeService.svc?wsdlafter
> > > > a request to AnotherService also gives me information on both
> > > > services.
> >
> > > > Although the services are working, it feels a bit confused. I've
> tried
> > > > placing my services in different namespaces, but that only resulted
> in
> > > > more complexWSDL. As stated above, I'd like to see metadata for only
> > > > the service key referenced in the .svc file.
> >
> > > > Any ideas or pointers? Is this expected behavior, or have I done
> > > > something wrong?
> >
> > > > I've read the related discussion on programmatical creation of
> > > > IMetadataExchange endpoints and would love to see a follow-up on
> that.
> >
> > > > / Bergius
> >
> >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to