How to change GC flavor[from Server mode to WorkStation Mode] for dllhost.exe

by jask2002 19. March 2012 05:52

When you have a Managed COM+ component written in C# class library and hosted on to DLLHOST.EXE

By default on a multi proc box .Net would load Server Mode GC(Mscorsvr) and in case you want to change the GC flavor to Workstation Mode (Mscorwks) for some reasons

Typically we do the change in aspnet.config in framework 2.0 folder

<configuration>
<runtime>
    <gcServer enabled="false"/>
    <gcConcurrent enabled="false"/>
  </runtime>
</configuration>


And I can see it into effect for w3wp.exe as System.Environment.IsServerGC is returning False.


But the process in question dllhost.exe still have Server Mode loaded!


Then finally it took into effect when doing the change in Class Project library project by adding app.config

And also it took into effect when we added dllhost.exe.config OR dllhst3g.exe.config (depending upon your EXE)

You need to create a .config file for the C:\WINDOWS\system32\dllhst3g.exe.config (This will have server wide effect on all the dllhost.exe)
 
<?xml version ="1.0"?>
<configuration>
<runtime>
    <gcServer enabled="false"/>
    <gcConcurrent enabled="false"/>
  </runtime>
</configuration>

Till then bye bye Winking smile

 


PayPal — The safer, easier way to pay online. Has this post helped you? Saved you? If you'd like to show your appreciation. Please buy me a coffee or make a small contribution toward blog's maintenance(to keep it Ads free )

Tags: , ,

.Net | GC | Debugging

Comments (7) -

Yair
Yair Israel
3/27/2012 10:02:59 AM #

Running .net 4 on a 2008 server, this solution didn&amp;amp;amp;amp;amp;amp;#39;t work,
instead, you&amp;amp;amp;amp;amp;amp;#39;ll need to change the aspnet.config file in %WINDIR%\Microsoft.NET\Framework\V**\aspnet.config

as described in:
http://support.microsoft.com/kb/911716/en-us/

Reply

jask2002
jask2002
3/27/2012 11:11:58 AM #


@Yair

if you are looking for changing GC mode for ASP.NET application hosted on w3wp.exe. Then yes you have to change in aspnet.config as mentioned above article

Reply

SimpleScripts
SimpleScripts United States
7/6/2012 7:08:58 AM #

fantastic post, very informative. I wonder why the other experts of this sector don’t notice this. You should continue your writing. I’m confident, you’ve a great readers’ base already!

Reply

Becky Rachels
Becky Rachels United States
2/13/2013 8:18:40 AM #

I say the same, this post was brilliant, I was searching info to apply on my site: http://www.ganardineroporinternetya.org thank you so much...

Reply

Becky Rachels
Becky Rachels United States
2/13/2013 8:17:49 AM #

Where is the donate button, thanks for the info, I needed this for my site: http://www.ganardineroporinternetya.org

Reply

Jas
Jas United States
2/14/2013 6:58:55 AM #

I&amp;#39;m glad it helped you.
You can click on &amp;quot;Buy Now&amp;quot; button to show your appreciation.

Regards,

Jas

Reply

Jas
Jas
2/14/2013 6:59:47 AM #

Im glad it helped you.
You can click on Buy Now button to show your appreciation.

Regards,

Jas

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About me

Hi there,

My name is  Jas and I'm currently working with Microsoft IIS/ASP.Net Escalation services.

Tag cloud

Month List

RecentComments

Comment RSS
 

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.