473,473 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

FIX: Slow compilations when using strong name

To all...

I have experienced this problem and recently so has my co-worker which led
me to try to solve the problem. Before I give you the fix, let me give a
brief overview of the problem. Hopefully this will be indexed efficiently by
google so that others with this problem can quickly benefit from it.

The problem manifests itself when on a Windows NT 4.0 domain and building
assemblies using a strong name key generated with the SN.EXE utility. I
cannot identify when the problem started, but it was definitely related to
the client and not the server because the problem occurred at different
times on two different machines. (We're talking months apart...) The problem
is that compilation takes an unacceptably long time (~15 seconds PER
PROJECT). If you disable the network interface, the problem goes away. If
you do not strong name your assemblies, the problem goes away.

I saw that one person solved the problem by changing the machine-based key
containers option with the SN.EXE utility. While this fixed the problem on
my machine (temporarily) it did not help at all on my co-worker's machine. I
turned on auditing (for every failure) and found an event log entry in the
security log that resembled the following:

Type: Failure Audit
Source: Security
Category: Detailed Tracking
Event ID: 596

Backup of data protection master key.
Key Identifier: (guid omitted)
Recovery Server:
Recovery Key ID:
Failure Reason: 0x3A

According to MSKB article 309408, this is from the DPAPI and there is a
workaround detailed in article 331333. I know, it looks like it has nothing
to do with VS.NET and the compilers, but in fact it does.

http://support.microsoft.com/default...b;en-us;309408
http://support.microsoft.com/default...b;en-us;331333

By adding the following registry value, the problem has been fixed on both
mine and my coworker's workstations and I could not be happier. Below is the
registry entry, but I suggest you read the KB articles before importing it
because it changes the way the DPAPI functions on Windows XP on a NT 4
domain.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography \Protect\Providers\df9d8c
d0-1501-11d1-8c7a-00c04fc297eb]
"MasterKeyLegacyNt4Domain"=dword:00000001

On a side note, the fix also corrected this very annoying little problem I
was having with Windows Messenger when I would open a new conversation
window it would lag for a few seconds before allowing me to type. Perhaps it
is related.

I hope I have made someone's day as I have certainly made my own. I was
beginning to consider not strong naming anything anymore. :) 15 seconds per
project in a solution with 8 or so projects was becoming quite annoying!!

Please email me if this fix helps you. I'd be happy to hear from you.

Josh Einstein (Apokalips XIII)
www.josheinstein.com

Nov 17 '05 #1
0 834

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Josh | last post by:
To all... I have experienced this problem and recently so has my co-worker which led me to try to solve the problem. Before I give you the fix, let me give a brief overview of the problem....
0
by: Josh | last post by:
To all... I have experienced this problem and recently so has my co-worker which led me to try to solve the problem. Before I give you the fix, let me give a brief overview of the problem....
2
by: Sky | last post by:
Hello: I'm trying to make sense of snk files, when to use, under what conditions to regenerate new ones,...can someone take a look if these statemes make sense? And then the final questions at the...
2
by: gnomee2 | last post by:
Hello Everyone, I have a strange problem that I cannot seem to solve. I have two server running Windows 2003 MSSQL on one IIS on the other. Out of the blue I have slow queries that cause asp...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.