Followers

Friday, March 04, 2005

debuging in asp.net

Okay...can you do the following steps with dbgclr.exe(Why i'm saying this, it provides debugging services with a graphical interface to help application developers find and fix bugs in programs that target the runtime)?.

so please follow the following steps:
Start the CLR Debugger; run DbgCLR.exe, which is in the GuiDebug directory of your .NET Frameworks installation.
From the Debug menu, select Program to Debug.
In the Program to Debug dialog box, go to the Program box and click the ellipsis button (...). The Find Program to Debug dialog box appears.
Navigate to the directory containing the EXE you want to debug and select the EXE.
Click Open.
This takes you back to the Program to Debug dialog box. Notice that the Working directory has been set to the directory containing your EXE.

In the Arguments box, type any arguments that your program requires.
Click OK.
From the File menu, choose Open, then click File.
In the Open File dialog box, choose the source file you want to open.
Click OK.
To open additional source files, repeat steps 8-10
Please let me know, whether you resolved with this.

Thursday, March 03, 2005

Shifting focus on next control on pressing the Enter key

if you want to configure enter key to move to next control in .NET then use following technique.

Set KeyPreview property of the form to "True"

Trap Key_down event of form and check if enter key was pressed. if then pass the focus to next control. code looks like below.

private void Form1_KeyDown ( object sender, KeyEventArgs e )
{
if ( e.KeyCode == Keys.Return )
{
Control c = GetNextControl ( ActiveControl, true ) ;
c.Focus( ) ;
}
}

.The ActiveControl property returns the reference of the control that is currently selected. The GetNextControl( ) method returns the control next to the specified control in tab order. The focus is set on the next control using the Focus( ) method.

.net Interview questions

http://www.andymcm.com/dotnetfaq.htm
.NET/C# Questions :
-------------------
http://forums.aspfree.com/showthread.php?t=23415
http://www.techinterviews.com/index.php?p=159
http://www.franklins.net/dotnetrocks/
http://blogs.crsw.com/mark/articles/252.aspx
http://www.dotnetspider.com/technology/KBPages/1068.aspx
http://forums.aspfree.com/archive/t-33756
Book
----
Programming Interviews Exposed: Secrets to Landing Your Next Job

Microsoft Interview questions
-----------------------------
http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm
Remoting Questions------------------
http://blogs.crsw.com/mark/articles/253.aspx

.PST files...

.PST files...
Today morning all of a sudden MS-Outlook of my client's PC displayed some error message and refused to open. after doing some wrestling with his PC for about nearly 1 & half hours (Soft-boot, hard-boot, increase memory, increase swap area and what not)..... then I found that the size of .PST file is more then 2.GB. Long back I had read somewhere that Outlook can't open it if size exceeds 2.GB.

"Any Knowledge does not go waste" stands true.......

But 2.GB ... sounds a crazy size.....Anyways for General Knowledge... Outlook stores all data in a .PST file located in folder C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Outlook\outlook.pst. To the best of my knowledge .PST stand for Personal Storage Table. if you are using Windows XP or 2000, ..PST files are considered to be as system files and are hidden by default. you will need to go to Folder options->View Tab of Windows explorer under Tool Menu to enable "Show hidden files and folders" option.

pst2gb.exe is the utility from Microsoft to recover most of your data from .PST file during such events

So the thumb rule to prevent accidents...

Try to keep any .pst files well under that 2GB limit
Use more than one .pst file.
Use the archive feature
Use compact the .pst file option ( right-click your folder's top level , click Advanced, and click Compact Now)
Keep deleting unwanted mails. OR Backup .PST file. (Burn it into a CD-R)

Outlook Express edition is better ... ;) at least it creates .dbx files for each folder. I use and prefer Outlook Express. what others feel ? ...... if some has better ideas, tips, tricks on MS-Outlook then do share it here, I would love to read them....

ASP.net tips regarding security

Tips.

Generally when using Forms authentication in ASP.NET you are able to secure your .aspx pages but you have not secured Images or documents like Ms-Word, Excel etc. A quick tip to secure these items is that you can configure that these extensions should be served by asp.net and not IIS.

In your IIS , Right click on the Virtual Directory and select Properties.
On Configuration Ta, a dialog box appears with the list of file extensions.
Click Add and Enter the extension type in the textbox such as .doc .ppt etc.
Point your path to aspnet_isapi.dll found under %windir%\Microsoft.NET\Framework\v1.1.4322\
In "Limit to" radio button and put the same properties as like for aspx files i.e. GET, POST etc.
Its Done!