473,413 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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 15 '05 #1
0 1462

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

Similar topics

2
by: Yonatan Goraly | last post by:
I am in the process of adding PostgreSQL support for an application, in addition to Oracle and MS SQL. I am using PostgreSQL version 7.3.2, Red Hat 9.0 on Intel Pentium III board. I have a...
8
by: Chris Stankevitz | last post by:
I can't tell you how frusterated I and my coworkers are with "MSVC 7.1 .net 2003" (what am I supposed to call this thing anyway?). Compiling and linking take twice as long with "MSVC 7.1 .net...
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...
5
toxicpaint
by: toxicpaint | last post by:
Hi there. I can't seem to work out what I'm doing wrong here and I was wondering if you could help. I have a form to submit a question, but as the questions vary in nature, I want them to go to...
3
by: acecraig100 | last post by:
I am fairly new to Javascript. I have a form that users fill out to enter an animal to exhibit at a fair. Because we have no way of knowing, how many animals a user may enter, I created a table...
11
by: MikeT | last post by:
This may sound very elementary, but can you trap when your object is set to null within the object? I have created a class that registers an event from an object passed in the constructor. When...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.