Archive for August, 2005

Where is Aspnet_setreg.exe source code?

August 8th, 2005 No comments

Various places (including, say:
You can create the encrypted credentials and store them in the registry with the ASP.NET Set Registry console application (Aspnet_setreg.exe), which uses CryptProtectData to accomplish the encryption. To download Aspnet_setreg.exe, along with the Visual C++ source code and documentation, visit the Web site and search for “aspnet_setreg”.I have been unable to locate the source code for this program. The best I could find on was a forum thread by someone asking where the source code is, and none having an answer.)
So, where is the source code?! I am looking to duplicate its functionality in my program.

Categories: Uncategorized Tags:

SP4 might slow down your single instance of sql server 2000

August 8th, 2005 No comments

if  Address Windowing Extensions(AWE) has been enabled on a single instance of sql server 2000, after applying SP4, you got to apply .2040 hotfix as well, otherwise your SQL server instance only uses 50% of the available physical memory that sucks:).

1) run the following script from SQL Query Analyzer to determine if AWE is enabled on the server :

sp_configure ‘show advanced options’, 1
sp_configure ‘awe enabled’

If run_value is set to 1, AWE is enabled on the server.

2) BTW After applying the SP4, just make sure that it has been installed properly as I’ve heard that some broken installations of SP4 are not reported properly. Run the following query in Analyzer and you should get the following results.

 Query in Query Analyzer:

SELECT SERVERPROPERTY(‘productversion’) 

Result after applying SP4:


Result after applying SP4 and its hotfix :


Categories: Uncategorized Tags:

Asynchronous JavaScript and XML (AJAX)

August 2nd, 2005 No comments

Michael Schwarz has built an amazing library (AJAX) to allow server-side processing without requiring postback.In fact his framework exposes a functionality to asynchronously sending and receiving HTTP Requests and HTTP Responses to and from the server. I guess Google suggest and Google map are both using the same technique. I’m sure that AJAX will change the asynchronous design patterns and will have a great impact on separating tiers in application architecture soon. Here is the definition of AJAX I found in Wikipedia.

Categories: Uncategorized Tags:

Why do I set Debug=False in my ASP.NET Applications when they go live in production?

August 1st, 2005 No comments

A web.config of an ASP.NET application has a compilation element which exposes a Debug attribute that can be set to either “True” to produce release(retail) binaries or “False” for debug binaries.In both cases what is ultimately generated is binary ,but the way they are generated and the way they affect general performance of your ASP.NET application is very different.

  1. In most of the cases I don’t really need each page of my ASP.NET application to be compiled individually into separate assemblies (Debug=”True”). I know the cost of loading each assembly into memory and how it kills the performance. I would even delete global.asax for small ASP.NET applications where I don’t use it at all as it is also compiled into a separate assembly.
  2. I do really need the pages under each folder to be batch-compiled by arriving of the first request rather than multiple compilations upon requests to different pages. Be informed that batch compilation occurs at the directory level, not the application level and there is no batch-compilation when Debug=”True”.
  3. Many people bring up some lame excuses that our web server is behind the firewall and who cares about the security!!!! Well, that’s ludicrous that people never think about the problem ahead till they are in trouble. I’d say driving a hummer doesn’t mean that you shouldn’t buckle up, Firewall is cool but it doesn’t mean that you as a developer should forget about the security principles that you must consider in the project’s life cycle. When Debug=”True” is specified debug symbol file, compiler command line file, compiler output file, etc are all compiled and placed in the “WindowsMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET” in addition to the assembly. It means your source code is deployed to the production server and can easily be deciphered.Beside that the inclusion of debug information ALSO reduces performance. (but allows a debugger to be attached to step through the assembly’s code, and also allows ASP.NET to provide additional information when an exception is thrown such as the line on which the exception was thrown)

Microsoft offers an excellent whitepaper which I really suggest you to read before deploying your application to the production server.


Categories: Uncategorized Tags: