Archive for March, 2005

IF you have worked with Updator block then you might have faced the same problem or if you are planning to move to updator block look at the following:-

The working of updator is as follows:-

1.IIS deployed folder2. Download manifest and compare 3. down load assembly if version is different 4. Copy assembly into a new folder that is new domain that is let into testappp\debug\versionnum 5. Change appstart.config to point to new version 6. Unload testapp.exe 7. Run app.start

That is track the IIS deployed folder of the application and if any changes happens there download the manifest and compare if version changes then copy the assembly from IIS to the new folder under the deployed directory’s debug in client application with a new version .Now change the app.config to point to new version and unload the application after providing controlto the loader app that is appstart.which will now load the new folder.

The problem with the above is for every revision and build change that is minor change a new foilder will created with the new assembly.

Here come our solution to the same that is to load the assembly into the same .The problem however is you can’t load the same dll into the current appdomain it ll not allow you to do so thus there comes the trick simply rename the dll before downloadijng the dll into the folder and when loader will points to the new config afterthat delete the same you can do so as your domain at that point will not be the current one.

another approach for the same was suggested by adam young in to rocky,russel and adam for pointing me the same but before following his approach i got the above solution.



Though the same is not required often as there very few integration system today (though Ms people thinks it in other way).However often you might need to debug ur unmanaged code from manged one .

here are the steps:-Taken FRom here

If you are using interop to call into a VB6 ActiveX dll or exe and you need to debug your VB6 project you may find yourself having both VS.NET and the VB6 IDE open.  This can certainly be far from efficient.

Typically you set your VB6 project to Wait for the Component to be created and you launch your .NET app and then hit breakpoints within the VB6 component.  Well, there™s an easier way to do this.  You can actually debug your VB6 component within VS.NET.  Here™s what you need to do:

Build your VB6 project with symbols.
In VB6 open up your vbp file and goto Project->Properties.  Select the compile tab and check Compile to Native Code.  Then select the No Optimization radio button and check Create Symbolic Debug Info.

This will generate a .PDB (Program Database) file along with your .EXE.  This file contains the debugging information so the VS.NET debugger can line up source and hit breakpoints, etc.  (Make sure you have binary compatibility on your VB6 dll set or you™ll have to drop and re-add your reference to the VB6 component in VS.NET.)

 Open your .NET project in VS.NET.
Go to the project properties and select the Configuration Properties->Debugging property page and enable unmanaged debugging.
    For VB.NET projects this option is Unmanaged code debugging and for C# is enable unmanaged debugging. 

Select the property page for the solution. 
Add to the Debug Source Files an entry that points to the path where the source code is for the VB6 component.
Add to the Debug Symbols Files an entry that points to the folder where the .PDB file is that was generated in step 1.
You should now be able to open your .bas, .cls, .frm, etc. files in VS.NET and you can put breakpoints in the file.  Once you debug the debugger will stop on those lines of code.

There was a great debate on whether to follow md5,sha1 or any otehr algorithm for security related issue.However nobody had tried to break the logics and succeed however eventually got some link on same:-

sha1 broken have a look


See on how to store password using bCrypt. Also worth reading future adaptable password scheme


Often it needed in many application to export to excel from grid,datset/recordset .there are few approacjes regd the same the primitives are use of scripting object’s create object ,use of excel object library com object,use of the excel driver object and the render objects.

however if you are in web apps and you need the same from datgrid to excel and u didn’t ahve any control in datagrid then then the siomple rendering like is very fast and useful


void ExportDataGridDataToExcel(DataGrid dg)


Response.ContentType = "application/";

// Remove the charset from the Content-Type header.

Response.Charset = "";

// Turn off the view state.

this.EnableViewState = false;

System.IO.StringWriter tw =

new System.IO.StringWriter();

System.Web.UI.HtmlTextWriter hw =

new System.Web.UI.HtmlTextWriter(tw);

// Get the HTML for the control.


// Write the HTML back to the browser.


// End the response.



for datagrid with control u need to implement some div tag and table rendering as well.