archive-be.com » BE » B » BENNYMICHIELSEN.BE

Total: 348

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Changing your connection string at runtime with Spring.Net – Benny Michielsen
    at runtime for instance based on the current logged in user what works best is to either subclass DelegatingDbProvider or UserCredentialsDbProvider which actually is a subclass of DelegatingDbProvider Attached you can find a quick and dirty sample which shows what you need to hook up RuntimeConnectionString zip 8 29 kb Author BennyM Posted on 24 03 2009 Categories Spring NET Tags connectionstring 1 thought on Changing your connection string at runtime with Spring Net Joel Holder says 06 08 2009 at 22 51 Thanks for this Found link picking through forums at springframework net Your sample got me going This seems like such a pervasive need that it would be baked directly into framework Anyway thanks again Joel Reply Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post WCF ChannelManagement drop 3 Next Next post Cuyahoga Patch for ContactUs 1 6 0 Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock

    Original URL path: http://blog.bennymichielsen.be/2009/03/24/changing-your-connection-string-at-runtime-with-spring-net/ (2016-04-29)
    Open archived version from archive


  • connectionstring – Benny Michielsen
    with two DbProviders to change information about your connection string at runtime One provider to change the credentials at runtime named UserCredentialsDbProvider and one that can choose a connectionstring from a predefined list called MultiDelegatingDbProvider If you want to change the connection string at runtime for instance based on the current logged in user what works best is to either subclass DelegatingDbProvider or UserCredentialsDbProvider which actually is a subclass of DelegatingDbProvider Attached you can find a quick and dirty sample which shows what you need to hook up RuntimeConnectionString zip 8 29 kb Author BennyM Posted on 24 03 2009 Categories Spring NET Tags connectionstring 1 Comment on Changing your connection string at runtime with Spring Net Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and Raspberry Pi 3 bhldev on Exposing iCal data in WebAPI Archives March 2016 February 2016 August 2015 July 2015 June 2015 May 2015 April 2015 March 2014 November 2013

    Original URL path: http://blog.bennymichielsen.be/tag/connectionstring/ (2016-04-29)
    Open archived version from archive

  • WCF ChannelManagement drop 3 – Benny Michielsen
    helped me to test the code without a channelfactory instance I did a lot of renaming in the codebase but on the consuming end not much has changed A SingleAction operating channel is still the easiest to configure object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint object Creating a fixed pool is one extra line object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ChannelManagementMode value FixedPool object A variable pool means just another value as ChannelManagementMode object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ChannelManagementMode value VariablePool object If you want to use your own channel manager you can use the ProductTemplate to hook everything up The sample below illustrates this here the variable pool is configured via the template instead of using the ChannelManagementMode property of the FactoryObject object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ProductTemplate object property name ChannelManager object type WCFChannelManager ChannelPoolManager lt Server IService1 Perponcher WCFChannelManager constructor arg value MyEndpoint constructor arg object type WCFChannelManager AutoSizePoolFactory Perponcher WCFChannelManager constructor arg object property object property object The same approach can be used to configure the channelfactory for i e passing credentials object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ChannelManagementMode value VariablePool property name ProductTemplate object property name ChannelManager ChannelFactory Credentials UserName UserName value username property name ChannelManager ChannelFactory Credentials UserName Password value password object property object That s it for now Future

    Original URL path: http://blog.bennymichielsen.be/2009/03/22/wcf-channelmanagement-drop-3/ (2016-04-29)
    Open archived version from archive

  • Migrating from ‘asmx’ webservices to WCF with Spring.Net – Benny Michielsen
    be used by my presenter and is created via the OrderServiceChannelFactory Anyone who has some experience with WCF sees that this is just the same as you would do in code when using channels So we re done No not really There is one rather big caveat In the old days my client service reference would still function if there had been an exception For example if the network cable was unplugged and I called a method on the server I d get an exception If I d plug the cable back in and call the method again my client service reference would still function and call the server successfully This is not the case with WCF channels if there is an exception either communication wise like the unplugged network cable or the server throws an exception my client channel will transition in a faulted state Any calls I make on this instance will fail I need a new instance from the channelfactory to get my application going again I could change my presenter to check the service reference but that would mean I need to couple my presenter to WCF and need to add new behaviour This is not something you d want to do I can t get around this problem by normal AOP techniques I can t let the channel check it s own status and have it magically change it s own memory reference to a new instance Wouldn t it be great if that boilerplate code checking the state creating new channels was automagically done when calling a method on my client service reference Well using the Spring framework I ve been able to accomplish this You won t need to change or add any code as long as your service is exposed with an

    Original URL path: http://blog.bennymichielsen.be/2009/03/01/migrating-from-asmx-webservices-to-wcf-with-spring-net/ (2016-04-29)
    Open archived version from archive

  • Configuring the ChannelManager – Benny Michielsen
    use here Recycle and ThrowAway ThrowAway being the default Not sure about these names though object id OneTimeUseChannel type WCFChannelManager SingleActionChannelManager lt WCFChannelManagerTests IService object id MyService type WCFChannelManager ChannelManagerFactoryObject property name ChannelType expression T WCFChannelManagerTests IService property name EndpointConfigurationName value MyEndpointName property name ProductTemplate object property name ChannelManager ref OneTimeUseChannel object property object If one of the default ways to manage the lifecycle of a channel is not what you want or need you can create your own and specify it in the ProductTemplate property of the ChannelManagerFactoryObject The example above shows how you can do this in this case it would result in the same default behaviour you get in the first xml configuration I showed in the beginning of my post If you even want to customize the way a channel is retrieved an action is executed on it and then handed back to the channel lifecycle manager you can subclass ChannelActionWrapper and specify that type in the ChannelActionWrapperType property of the ChannelManagerFactoryObject This is illustrated below object id MyService type WCFChannelManager ChannelManagerFactoryObject property name ChannelActionWrapperType expression T WCFChannelManagerTests MockChannelManager property name EndpointConfigurationName value MyEndpointName object public class MockChannelManager ChannelActionWrapper IService public MockChannelManager base null public override IService GetChannelToWorkWith return new Service public object ExecuteOperation MethodInfo info object parameters return this ExecuteInChannel info parameters The ChannelType will now be retrieved from your subclass so you don t need to specify the ChannelType And that s all I have for you now Series Migrating from asmx webservices to WCF with Spring Net Configuring the ChannelManager First Drop Second Drop Third Drop Author BennyM Posted on 05 03 2009 Categories Software Development Spring NET Tags channel wcf Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation

    Original URL path: http://blog.bennymichielsen.be/2009/03/05/configuring-the-channelmanager/ (2016-04-29)
    Open archived version from archive

  • First drop of ChannelManagement available. – Benny Michielsen
    context resource uri config spring objects context objects xmlns http www springframework net object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint object objects spring system serviceModel client endpoint name MyEndpoint address http localhost 8731 Design Time Addresses Server Service1 contract Server IService1 binding wsHttpBinding client system serviceModel Out and ref parameters are not yet supported WCFChannelManager zip 1 17 mb Series Migrating from asmx webservices to WCF with Spring Net Configuring the ChannelManager First Drop Second Drop Third Drop Author BennyM Posted on 08 03 2009 Categories Software Development Spring NET Tags channel wcf Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post This week on my screen 3 Next Next post This week on my screen 4 Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono

    Original URL path: http://blog.bennymichielsen.be/2009/03/08/first-drop-of-channelmanagement-available/ (2016-04-29)
    Open archived version from archive

  • WCF ChannelManagement drop 2 – Benny Michielsen
    found some issues with it like when you wanted to configure the ChannelFactory in your configuration file but these are now fixed Next up pooling WCFChannelManager drop2 zip 1 14 mb Series Migrating from asmx webservices to WCF with Spring Net Configuring the ChannelManager First Drop Second Drop Third Drop Author BennyM Posted on 14 03 2009 Categories Software Development Spring NET Tags channel wcf Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post This week on my screen 4 Next Next post This week on my screen 5 Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning Brew Chris Alcock The Morning Brew 2052 on Getting up and running with Mono and Raspberry Pi 3 bhldev on Exposing iCal data in WebAPI Archives March 2016 February 2016 August 2015 July 2015 June 2015 May 2015 April 2015 March 2014 November 2013 August 2012 July 2012 January 2012 November 2011 June 2011 May 2011

    Original URL path: http://blog.bennymichielsen.be/2009/03/14/wcf-channelmanagement-drop-2/ (2016-04-29)
    Open archived version from archive

  • pool – Benny Michielsen
    only solution I found that worked pretty ok was a wrapper interface which exposes the CreateChannel method it helped me to test the code without a channelfactory instance I did a lot of renaming in the codebase but on the consuming end not much has changed A SingleAction operating channel is still the easiest to configure object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint object Creating a fixed pool is one extra line object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ChannelManagementMode value FixedPool object A variable pool means just another value as ChannelManagementMode object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ChannelManagementMode value VariablePool object If you want to use your own channel manager you can use the ProductTemplate to hook everything up The sample below illustrates this here the variable pool is configured via the template instead of using the ChannelManagementMode property of the FactoryObject object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ProductTemplate object property name ChannelManager object type WCFChannelManager ChannelPoolManager lt Server IService1 Perponcher WCFChannelManager constructor arg value MyEndpoint constructor arg object type WCFChannelManager AutoSizePoolFactory Perponcher WCFChannelManager constructor arg object property object property object The same approach can be used to configure the channelfactory for i e passing credentials object id MyService type WCFChannelManager ChannelManagerFactoryObject Perponcher WCFChannelManager property name ChannelType expression T Server IService1 Common property name EndpointConfigurationName value MyEndpoint property name ChannelManagementMode value VariablePool property name ProductTemplate object property name ChannelManager ChannelFactory Credentials UserName UserName value username

    Original URL path: http://blog.bennymichielsen.be/tag/pool/ (2016-04-29)
    Open archived version from archive