On Jun 25, 4:56 pm, Craig Neuwirt <[email protected]> wrote:
> On Thu, Jun 25, 2009 at 8:42 AM, Uri Goldstein <[email protected]>wrote:
>
>
>
> > Hi Craig,
>
> > I can't quite understand your first sentence - What do you mean by
> > "system.serviceModel configuration"? Do you mean that if Danel is
> > using castle xml config then he can use WCF config syntax inside it?
> > If so then his problem is solved.
>
> Typically, if you use castle's xml configuration and you want to use the WCF
> Facility,
> you would be best suited using the serviceModel configuration section in
> app.config/web.config.

But if I use the serviceModel configuration section then can Windsor
inject dependencies into my ServiceCredentials behavior?


>
> > His problem is that what he's trying to do is possible with WCF
> > config, but he doesn't know how to do the same thing with Castle XML
> > config.
>
> It is possible to use pure castle xml config, but you would then have to do
> all the work that WCF xml config is already doing, like locating the
> certificate based on some config parameters.  My castle xml config syntax is
> quite rusty, but it might look something like
>
> <component id="MyServiceCredentials"
>
> service="System.ServiceModel.Description.IServiceBehavior,
> System.ServiceModel"
>                    type="MyServiceCredentials">
>    <parameters>
>        <findValue>test</findValue>
>        <storeLocation>LocalMachine</storeLocation>
>        <storeName>My</storeName>
>        <x509FindType>FindBySubjectName</x509FindType>   <parameters>
> </component>
>
> and you MyServiceCredentials would implement IInitializable and use the
> supplied config to locate the cerificate.
>

Not being familiar with IInitializable, how does it fit into the
picture?


Tx.

>
>
> > Thanks,
> > Uri
>
> > On Jun 25, 3:22 pm, Craig Neuwirt <[email protected]> wrote:
> > > Danel,
> > > When using castle xml config, you are limited to using the
> > > system.serviceModel configuration.  If you can use the fluent
> > configuration,
> > > you can just register ServiceCredentials behvaior instance.  You can do
> > that
> > > latter with binsor too if you like,
>
> > > craig
>
> > > On Thu, Jun 25, 2009 at 3:51 AM, danel <[email protected]> wrote:
>
> > > > 1. Stack Trace:
>
> > > > [FileNotFoundException: Could not load file or assembly
> > > > 'System.ServiceModel' or one of its dependencies. The system cannot
> > > > find the file specified.]
> > > >   System.RuntimeTypeHandle._GetTypeByName(String name, Boolean
> > > > throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
> > > > StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0
> > > >   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean
> > > > throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
> > > > StackCrawlMark& stackMark) +64
> > > >   System.RuntimeType.PrivateGetType(String typeName, Boolean
> > > > throwOnError, Boolean ignoreCase, Boolean reflectionOnly,
> > > > StackCrawlMark& stackMark) +58
> > > >   System.Type.GetType(String typeName, Boolean throwOnError, Boolean
> > > > ignoreCase) +65
> > > >   Castle.Windsor.Installer.DefaultComponentInstaller.ObtainType
> > > > (String typeName) +74
>
> > > > [ConfigurationErrorsException: The type name
> > > > System.ServiceModel.Description.IServiceBehavior, System.ServiceModel
> > > > could not be located]
> > > >   Castle.Windsor.Installer.DefaultComponentInstaller.ObtainType
> > > > (String typeName) +164
> > > >   Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents
> > > > (IConfiguration[] configurations, IWindsorContainer container) +283
> > > >   Castle.Windsor.Installer.DefaultComponentInstaller.SetUp
> > > > (IWindsorContainer container, IConfigurationStore store) +121
> > > >   Castle.Windsor.WindsorContainer.RunInstaller() +76
> > > >   Castle.Windsor.WindsorContainer..ctor(IConfigurationInterpreter
> > > > interpreter) +144
> > > >   Castle.Windsor.WindsorContainer..ctor(String xmlFile) +61
> > > >   Site.Global.Application_Start(Object sender, EventArgs e) in C:
> > > > \Development\Djenne\Dev\Core\TradeServer\Site\Global.asax.cs:29
>
> > > > Assembly Load Trace: The following information can be helpful to
> > > > determine why the assembly 'System.ServiceModel' could not be loaded.
>
> > > > === Pre-bind state information ===
> > > > LOG: DisplayName = System.ServiceModel
> > > >  (Partial)
> > > > LOG: Appbase = file:///C:/Development/Djenne/Dev/Core/TradeServer/Site/
> > > > LOG: Initial PrivatePath = C:\Development\Djenne\Dev\Core\TradeServer
> > > > \Site\bin
> > > > Calling assembly : Castle.Windsor, Version=2.0.0.0, Culture=neutral,
> > > > PublicKeyToken=407dd0808d44fbdc.
> > > > ===
> > > > LOG: This bind starts in default load context.
> > > > LOG: Using application configuration file: C:\Development\Djenne\Dev
> > > > \Core\TradeServer\Site\web.config
> > > > LOG: Using machine configuration file from C:\Windows\Microsoft.NET
> > > > \Framework\v2.0.50727\config\machine.config.
> > > > LOG: Policy not being applied to reference at this time (private,
> > > > custom, partial, or location-based assembly bind).
> > > > LOG: Attempting download of new URL
> > > > file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary
> > > > ASP.NET Files/root/2ec7d594/f5851cc8/System.ServiceModel.DLL.
> > > > LOG: Attempting download of new URL
> > > > file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary
> > > > ASP.NET Files/root/2ec7d594/f5851cc8/System.ServiceModel/
> > > > System.ServiceModel.DLL.
> > > > LOG: Attempting download of new URL
>
> > file:///C:/Development/Djenne/Dev/Core/TradeServer/Site/bin/System.ServiceModel.DLL.
> > > > LOG: Attempting download of new URL
>
> > file:///C:/Development/Djenne/Dev/Core/TradeServer/Site/bin/System.ServiceModel/System.ServiceModel.DLL.
> > > > LOG: Attempting download of new URL
> > > > file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary
> > > > ASP.NET Files/root/2ec7d594/f5851cc8/System.ServiceModel.EXE.
> > > > LOG: Attempting download of new URL
> > > > file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary
> > > > ASP.NET Files/root/2ec7d594/f5851cc8/System.ServiceModel/
> > > > System.ServiceModel.EXE.
> > > > LOG: Attempting download of new URL
>
> > file:///C:/Development/Djenne/Dev/Core/TradeServer/Site/bin/System.ServiceModel.EXE.
> > > > LOG: Attempting download of new URL
>
> > file:///C:/Development/Djenne/Dev/Core/TradeServer/Site/bin/System.ServiceModel/System.ServiceModel.EXE.
>
> > > > 2. I have 3 class :
> > > > a. MyRepository
> > > > b. MySecurityTokenManager that inherits
> > > > ServiceCredentialsSecurityTokenManager that inherits
> > > > SecurityTokenManager (That composite MyRepository)
> > > > c. MyServiceCredentials that inherits ServiceCredentials (That
> > > > composite MySecurityTokenManager)
>
> > > > if i am using wcf configuration it's looks like this:
> > > >  <serviceCredentials type="MyServiceCredentials ">
> > > >            <serviceCertificate findValue="test"
> > > > storeLocation="LocalMachine" storeName="My"
> > > > x509FindType="FindBySubjectName" />
> > > > </serviceCredentials>
>
> > > > But i cannot inject MyRepository to MySecurityTokenManager .
>
> > > > The other option is windsor configuration that looks like this:
>
> > > >  <component id="MyServiceCredentials"
>
> > > > service="System.ServiceModel.Description.IServiceBehavior,
> > > > System.ServiceModel"
> > > >                type="MyServiceCredentials">
> > > >    </component>
>
> > > > how can i config the serviceCertificate ?
>
> > > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
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