<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx</link><description>Yes, it is possible to specify a per-component application config when using a ServicedComponent with activation type set to Server Application. By default all Server Applications are sharing dllhost.exe.config located in %windir%\system32. But there</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#46363</link><pubDate>Mon, 29 Dec 2003 14:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:46363</guid><dc:creator>Paul</dc:creator><description>Hi Florin, this feature works only for winxp and win2k3. Do you know if exists something similar under win2k ?. Thanks.</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#47272</link><pubDate>Sat, 03 Jan 2004 02:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:47272</guid><dc:creator>Florin Lazar</dc:creator><description>Paul - Unfortunately Win2K doesn't support per app config files because Win2K doesn't have Application Root Directory.</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#111600</link><pubDate>Mon, 12 Apr 2004 14:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:111600</guid><dc:creator>Dante</dc:creator><description>Hi folrin, i've been trying this for some time and it just won't work, i have winXP prof, do i need to install service pack 2 for this to work? thanks</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#112861</link><pubDate>Wed, 14 Apr 2004 06:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:112861</guid><dc:creator>Florin Lazar</dc:creator><description>Dante, on XP you need at least COM+ QFE Rollup #6 (QXP 6) to be able to use this feature. You have two options: 1. Contact Microsoft Support to obtain the rollup or 2. Wait for SP2 for XP to be released.</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#134039</link><pubDate>Tue, 18 May 2004 13:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:134039</guid><dc:creator>Cibra</dc:creator><description>Under W2k3, the files can be renamed as &amp;lt;ServerApplicationName&amp;gt;.manifest and &amp;lt;ServerApplicationName&amp;gt;.config. Unfortunately this solution doesn't work under windows xp</description></item><item><title>Enterprise Services and app.config </title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#144750</link><pubDate>Mon, 31 May 2004 08:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144750</guid><dc:creator>Impersonation Failure</dc:creator><description>All out-of-process COM  applications by default are executed using the %SystemRoot%\System32\dllhost.exe surrogate process. What this used to mean that calling System.Configuration.ConfigurationSettings.AppSettings[</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#207831</link><pubDate>Wed, 04 Aug 2004 11:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:207831</guid><dc:creator>Kash</dc:creator><description>Hi i have similar problems&lt;br&gt;I'm developing mmc SNAP-in in vb6 using snapin designer,&lt;br&gt;snain needs to interact with database ,&lt;br&gt;database interaction code is written in vb.net,&lt;br&gt;&lt;br&gt;to use that .net assembly i register it for COM interoperability, And it successfully run in vb form project , And all config file settings successfdully obtained when runnin vb6 project exe.&lt;br&gt;Now i use that same vb.net assembly in snapin by registering for COM interoperability.&lt;br&gt;( Snapin creates .ocx file)&lt;br&gt;Now when i load snapin in mmc, it woun't find any config file, even though i renamed app.config as dllhost.exe.config&lt;br&gt;I'm using win2k&lt;br&gt;Any type of help highly appreciated</description></item><item><title>Exporting an Enterprise Service with a manifest</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#352297</link><pubDate>Thu, 13 Jan 2005 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:352297</guid><dc:creator>Hackward and Foreword</dc:creator><description /></item><item><title>Exporting an Enterprise Service with a manifest</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#352300</link><pubDate>Thu, 13 Jan 2005 21:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:352300</guid><dc:creator>Hackward and Foreword</dc:creator><description /></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#412069</link><pubDate>Tue, 26 Apr 2005 12:32:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:412069</guid><dc:creator>Oren</dc:creator><description>Hi there do you have any idea how to overcome the problem under the W2K environment any idea will be highly appreciated THNAKS</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#412634</link><pubDate>Wed, 27 Apr 2005 19:03:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:412634</guid><dc:creator>Roni Burd</dc:creator><description>For win2k I copied a code fragment that was suggested of ADVANCED DOTNET list.(I'm not sure from whom, and modified 4 lines of code) &lt;br&gt;&lt;br&gt;I post the source code because so maybe it can be useful to others. Basically all you have to do is inherit for ServicedComponentEx.&lt;br&gt;&lt;br&gt;Good luck!&lt;br&gt;&lt;br&gt;[AttributeUsage(AttributeTargets.Class)]&lt;br&gt;	public class ServicedComponentExProxyAttribute : ProxyAttribute, ICustomFactory    &lt;br&gt;	{&lt;br&gt;		private ProxyAttribute _base;                  &lt;br&gt;		private Type currentType;                  &lt;br&gt;		static AppDomain appDomain = null;                                    &lt;br&gt;		&lt;br&gt;		public ServicedComponentExProxyAttribute()&lt;br&gt;		{                 &lt;br&gt;			_base = (ProxyAttribute)typeof(ServicedComponent).GetCustomAttributes(typeof(ProxyAttribute),false)[0];&lt;br&gt;		}&lt;br&gt;		public override MarshalByRefObject CreateInstance(Type serverType)&lt;br&gt;		{&lt;br&gt;			return _base.CreateInstance(serverType);&lt;br&gt;		}           &lt;br&gt;		public override RealProxy CreateProxy(ObjRef objRef,Type serverType,object serverObject,Context serverContext)&lt;br&gt;		{                  &lt;br&gt;			return _base.CreateProxy(objRef,serverType,serverObject,serverContext);           &lt;br&gt;		}           &lt;br&gt;		Assembly ResolveHelper(object  o, ResolveEventArgs rargs)&lt;br&gt;		{                  &lt;br&gt;			if ( currentType.Assembly.FullName == rargs.Name )                  &lt;br&gt;			{                       &lt;br&gt;				return Assembly.LoadFrom(currentType.Assembly.Location);&lt;br&gt;			}                  &lt;br&gt;			else                  &lt;br&gt;			{&lt;br&gt;				return null;                  &lt;br&gt;			}&lt;br&gt;		}           &lt;br&gt;		MarshalByRefObject ICustomFactory.CreateInstance(Type serverType)&lt;br&gt;		{                  &lt;br&gt;			if ( AppDomain.CurrentDomain.FriendlyName == &amp;quot;myappdomain&amp;quot; )&lt;br&gt;			{                       &lt;br&gt;				return ((ICustomFactory)_base).CreateInstance(serverType);&lt;br&gt;			}                  &lt;br&gt;			else                  &lt;br&gt;			{                       &lt;br&gt;				if ( appDomain == null )                       &lt;br&gt;				{                            &lt;br&gt;					System.AppDomainSetup appDomainSetup = new AppDomainSetup();&lt;br&gt;					appDomainSetup.ApplicationBase = &lt;br&gt;						Path.Combine(Path.GetPathRoot(serverType.Assembly.Location), Path.GetDirectoryName(serverType.Assembly.Location));&lt;br&gt;					appDomainSetup.ApplicationName = &amp;quot;complus&amp;quot;;&lt;br&gt;					appDomainSetup.ConfigurationFile = serverType.Assembly.GetName().Name + &amp;quot;.exe.config&amp;quot;;&lt;br&gt;					appDomain = AppDomain.CreateDomain(&amp;quot;myappdomain&amp;quot;,null,appDomainSetup);                       &lt;br&gt;				}                       &lt;br&gt;				ResolveEventHandler reh = new ResolveEventHandler(this.ResolveHelper);&lt;br&gt;				currentType = serverType;                       &lt;br&gt;				AppDomain.CurrentDomain.AssemblyResolve += reh;&lt;br&gt;				MarshalByRefObject mbr = (MarshalByRefObject)appDomain.CreateInstanceFromAndUnwrap(serverType.Assembly.Location,serverType.FullName);&lt;br&gt;				AppDomain.CurrentDomain.AssemblyResolve -= reh;                       &lt;br&gt;				currentType = null;                       &lt;br&gt;				return mbr;                 &lt;br&gt;			}           &lt;br&gt;		}&lt;br&gt;	}&lt;br&gt;	[ServicedComponentExProxyAttribute]   &lt;br&gt;	public class ServicedComponentEx : ServicedComponent   &lt;br&gt;	{       &lt;br&gt;		public ServicedComponentEx()&lt;br&gt;		{}  &lt;br&gt;	}</description></item><item><title>Configuration file for .NET objects running under COM+ 1.5</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#443783</link><pubDate>Wed, 27 Jul 2005 14:23:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:443783</guid><dc:creator>Giulio Vian's WebLog</dc:creator><description>From &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/florinlazar/archive/2003/12/04/41369.aspx"&gt;http://blogs.msdn.com/florinlazar/archive/2003/12/04/41369.aspx&lt;/a&gt;:&lt;br&gt;setting the Application Root Directory...</description></item><item><title>re: How about using Transaction?</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#446791</link><pubDate>Tue, 02 Aug 2005 23:17:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:446791</guid><dc:creator>Sam</dc:creator><description>On XP/2003, application.manifest and application.config work well as long as the component is being called by a client without a transaction context.&lt;br&gt;&lt;br&gt;If you want to call the same component from a client under a new transaction context (this is easy to do by the way), then the component does not seem to be able to access the app.config file anymore. &lt;br&gt;&lt;br&gt;I have some code that illustrates my point if anybody is interested. I would appreciate any suggestions/workarounds to make this thing work.</description></item><item><title>re: Server Activated ServicedComponent and Config Files</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#452700</link><pubDate>Wed, 17 Aug 2005 19:23:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:452700</guid><dc:creator>Brian Russell</dc:creator><description>Or you could just call AppDomain.CurrentDomain.SetData(&amp;quot;APP_CON- FIG_FILE&amp;quot;, settingsFilePath);&lt;br&gt;&lt;br&gt;...</description></item><item><title>Using Log4Net from a COM+ Application</title><link>http://blogs.msdn.com/florinlazar/archive/2003/12/04/server-activated-servicedcomponent-and-config-files.aspx#729229</link><pubDate>Tue, 29 Aug 2006 04:08:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:729229</guid><dc:creator>George V. Reilly's Technical BLog</dc:creator><description>I spent far too much time on Friday trying to make log4net work in a COM+ application. Someone else had</description></item></channel></rss>