Wednesday, July 05, 2006

Framework Errors Thanks to the IIS LockDown Tool

I started getting the following error after running the IIS LockDown Tool on my development PC at work. It was on a virtual machine so there was no real damage done. Use this as an example of what could happen.

“Cannot execute a program. The command being executed was "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /noconfig /fullpaths @"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\sharedservices\8edd40bf\a4dccc9b\f8suefbe.cmdline".

This was occurring for my 1.1 apps as well. After much searching and messing with permissions, I found the solution. A simple “repair” of the framework install does the trick and resets the permissions appropriately. I believe the reason I could not get the permissions correct is because the tool will reset registry persmissions for certain nodes. Depending on how many are change, you can see that this could become a tedious task if done manually.

If this post helps you, let me know an post a comment. - E

5 comments:

  1. Hi there,

    I have been facing the problem you faced and when I searched, it took me to your post. So, here I am, writing to you.

    My .net 2.0 application (which hosts an HTTP server using HTTP.SYS) has begun to throw this error after long hours of operation (when there are a lot of clients connected and connecting).

    I don't have IIS installed on the machine. I don't know what the IIS LockDown Tool is and I'm not sure if I'm (unknowingly) using it.

    Do you think the error I'm facing has the same cause ? I have yet to try out your solution.

    Please let me know your thoughts at ksharma@westell.com .

    Thanks n Regards,
    Kunal

    ReplyDelete
  2. I'm glad you found me. It shows that my blog is finally getting indexed.

    I agree, it is probably related to permission issues. Is there some way they were inadvertently changed without your knowledge. I've seen seemingly low impact installations of software or updates have a impact on permissions in the past. Try my solution the next time you have a maintenance window, and let me know how it goes.

    ReplyDelete
  3. I found exact same problem after adjusting security to my SQL Server through the surface area config.

    To fix I ran

    .Net 1.1: C:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i

    .Net 2.0: C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

    ReplyDelete
  4. Hi,

    I had the same problem and discovered that i ran out of memory of sorts.

    After checking Redhats "ANTS Memory Profiler" i found that i had a large amount of memory in the COM+ of the GC roots. A quick google and i found myself here: http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx

    I then read the following:

    If you use any of the other constructors, multiple versions of the same assembly are generated and never unloaded, which results in a memory leak and poor performance. The easiest solution is to use one of the previously mentioned two constructors. Otherwise, you must cache the assemblies in a Hashtable...

    After creating a hashtable for the serializers my problem of a memory leak (and poor performance) and the resulting error message like yours, was gone.

    Hope this helps anyone else experiencing a similiar problem.

    Cheers,

    ReplyDelete
  5. all above soltion is not correct so far

    ReplyDelete