Friday, May 11, 2007
Visual Studio 2005 Tips & Tricks #1 - Automatically format the code
Tale of a .Net Component
It is very rare to find a full fledged project implementation or a book which explains how to code a project, from scratch to rollout and updates.
If we look at real life that is what one expects, the best practices how to seperate layers of code, when to write components vs when to write controls, how to reuse code, but there were few implementations in the past like the pet shop project where an entire project was given as download for enthusiastic developers to learn. That is how i coded my first dot net project not by learning from a book or from msdn but by looking at the code of a sample dot net project provided by microsoft.
Today was the last post of a 5 part series explaining from scratch how to write a dot net component, i liked this article a lot and hence am posting it on my blog.
Tale of a .Net Component - Part 1 (Explains the requirement & the design)
http://www.devsource.com/article2/0,1895,2095440,00.asp
Tale of a .Net Component - Part 2 (Explains the class design)
http://www.devsource.com/article2/0,1895,2097685,00.asp
Tale of a .Net Component - Part 3 (Properties creation)
http://www.devsource.com/article2/0,1895,2099681,00.asp
Tale of a .Net Component - Part 4 (Depth in to code)
http://www.devsource.com/article2/0,1895,2104404,00.asp
Tale of a .Net Component - Part 5 (Testing & Rollout)
http://www.devsource.com/article2/0,1895,2111753,00.asp
The author of this excellent series is Peter Aitken (author of more than 40 books), http://www.pgacon.com/default.htm
I am sure any developer would love to read such articles.
Thursday, May 03, 2007
Sql Server 2005 - How to change sqlserver authentication mode - windows authentication / sql server and windows authentication mode
When we install Sql server 2005 during the installation it would prompt us for what kind of authentication mode to use (windows authentication or mixed mode[both sql and windows]), but at any point of time we can change this (similar to how we do it in sql2000) but with the new sql server management studio, the way we do it has slightly changed, this blog entry explains how to do the same.
1) Launch Sql Server Management Studio (SSMS), usually found in start > program files > Microsoft sql server 2005 > Sql Server Management Studio,
2) SSMS is nothing but a single IDE which combines both sql server 2000 enterprise manager and sql server 2000 query analyzer.
3) Since the mode is right now windows authentication, select the server type as "database engine" and then server name: the name of the sql server 2005 instance you are trying to connect to and authentication as "windows authentication" and click connect,
Note: If sql server 2005 is not yet started you may get an error msg (but in sql 2000 it used to start the sql server if it was not yet started but in 2005 it does not start it automatically).
4) Now the ssms will be connected, start the object explorer, several ways to start it, easiest is to press F8 or click on the icon in the menu which has the tool tip object explorer, (3rd from the right), object explorer is nothing but an tree view of all existing sql server instances, the databases and other agents (similar to sql 2000 enterprise manager left hand tree).
5) Right click on the sql server 2005 instance name and select properties to open the server properties popup window, in this window click on "security page" in the left hand side tree menu, and this page shows the server authentication, change it from windows authentication to sql server and windows authentication.
6) Now we need to perform one more additional step, configuring "sa" login or some other login and enabling it.
7) In the object explorer (F8) expand security, click on logins, the existing logins are shown in the right hand side, right click "sa" the default system administration login and select properties to show the properties window for "sa" login, here change the password of the login.
8) The main step is click on status page in the left hand side and change the status of the login to enabled (if not you will not be able to connect back using sa login)
Thus you can change the authentication modes in sql server 2005, but this may require a restart of the instance.
After restarting sql server 2005 try launching ssms and this time select mode as "sql server authentication" and enter login - "sa" and the password which you had changed in previous step and click "connect" and it should log you in.
Tags: Sql Server 2005, Sql Server,sql-server-2005Friday, March 02, 2007
Sql Server 2005 - A look at Installation : Instances
- More than one Sql Server 2005 can be installed on the same server, each installation is an instance,
- On the same machine you can have both Sql server 2000 and also Sql Server 2005 running side by side (like i do on my laptop),
- When you install Sql Server 2005 you are asked whether you want it to be installed as a default instance (no name for the instance) or you want to give it a name.
- During installation you can look at already existing instances as shown in the figure,

Why we need multiple instances?
- If you are planning to have a test environment and a production environment i would recommend installing Sql Server Developer edition on another pc and use it as a test environment, i do not like having test and production on the same OS box. Then why do we need multiple instance support? which is a great question, my answer is below,
- When you need to have multiple versions of sql server like 2000 & 2005 each run in their own instances,
- When you need to give admin or sa access to two different administrators to maintain their own sql servers,
- When you want to have another instance on the same OS where you can first test the service packs and ensure it works fine on the production OS and then do it to the other live instance,
- When you install other software like Vault or Sharepoint Portal Server 2007 or Visual Studio IDE 2005 they install their own instances of sql server 2005 or Sql Server 2005 Express editions.
SqlServer 2005 - About Sql 2005 & various editions
Microsoft spent 5 years to come up with this next release which has a lot of cool features,
- Improvements in performance,
- More analysis tools,
- Integrated development with cool dot net IDE and management studio,
- CLR capabilities,
- Http end points,
- Support for service broker and SOA,
- Better Sql jobs control with the new Sql Agent,
- Database Snapshots feature,
- Great database mirroring,
- Log shipping feature,
- Replication improvements,
- and lots n lots of T-Sql and Sql improvements.
I have been working with Sql 2000 for the past 5+ years, and it is one of my favourite databases, i had previous experience working with My Sql and i used to wonder why such a robust database like Sql did not have some good features which mysql had at that time. Example: it had paging at the backend level, you can specify in a query itself how many rows you want, even oracle had pagenum but sql lacked it in 2000 sql server.
The new sql 2005 is very promising and has made up for all the lacking features.
Sql Server 2005 is shipped free with VS Dot net IDE as sql express edition, it comes with sharepoint portal server 2007 and a bunch of other dot net applications. Any developer should learn the new features of Sql server 2005 and my entries would be helpful in that regard.
Sql Server comes in 5 editions:
- Sql Server 2005 Enterprise edition,
- Sql Server 2005 Standard edition,
- Sql Server 2005 Work group edition,
- Sql Server 2005 Developer edition (free for development and testing, exactly like EE),
- Sql Server 2005 Express edition (free like former MSDE)
Best ways to learn sql server 2005:
1) Books online free download - http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
2) Free E-learning courses from Microsoft - (for a limited time it is free soon to end)
https://www.microsoftelearning.com/sqlserver2005/
http://www.microsoft.com/events/series/technetsqlserver2005.mspx
3) Official site - http://www.microsoft.com/sql/default.mspx
4) Cost in $$ for Sql server 2005 - http://www.microsoft.com/sql/howtobuy/default.mspx
5) Made up your mind try it for free (180 day evaluation) - http://www.microsoft.com/sql/downloads/trial-software.mspx
6) Edition comparisons - http://www.microsoft.com/sql/editions/enterprise/comparison.mspx
7) Post a comment on my blog, if i know the answer will let you know :)
Wednesday, February 21, 2007
Classic ASP (not ASP.Net) code debugging with VS Dotnet IDE 2005
So i started my googling to find a solution which would make my daily coding life better and i was able to do it.
So here i am sharing my experience, "How to debug classic ASP using VS Dot net IDE 2005"
1) You need not have a sln or a project file, you can even open one single ASP file and debug it from top to bottom,
2) Open your ASP file in VS Dot net IDE 2005, then open IE and browse the page, this is done so that the ASP rendering process (IIS server but not aspnet_wp.exe, not w3wp.exe but dllhost.exe comes in to task manager),
3) Go to your default web site in IIS or your virtual directory >> right click properties >> home directory >> configuration >> Debugging tab >> in the debugging flags section,
check - Enable ASP server-side script debugging
In the script error messages section, check send detailed ASP error messages to client. (as shown in picture below).
4) Now comes the important step, open your vsdotnet ide 2005, and open the single ASP page and click Debug >> Attach to process >> check the check box [ ] show processes from all users, then look for a process called dllhost.exe Type = x86, Script and the username running it is YOURPCNAME\IWAM_YOURPCNAME.
Click Attach and wait for few minutes and click ok, now go back to your ASP page place a break point and then refresh the IE, and you should see it stops at the breakpoint.
Happy Debugging ASP :)
Tuesday, February 20, 2007
VSDotnet IDE 2005 making use of IIS instead of development webserver
So the URL will be something like,
http://localhost:2500 or a dynamic port,
Tuesday, January 30, 2007
Sharepoint enable anonymous access and extranet sites
Unfortunately doing this is not a piece of cake in sharepoint and requires few manual interventions, here is an excellent article with snapshots which explains how to do this.
http://andrewconnell.com/blog/articles/HowToConfigPublishingSiteWithDualAuthProvidersAndAnonAccess.aspx
Wednesday, January 10, 2007
Dot Net 3.0 Question Bank for Interview Preparation / General Knowledge
Main point is it has lot of WCF WPF and Dot Net 3.0 questions.
Full eBook with 4000 .NET 3.0 ,C#, Ajax,JAVA,.NET and SQL ServerInterview questions
http://www.questpond.com/SampleInterviewQuestionBook.zip
Download the JAVA , .NET and SQL Server interview sheet and rateyourself.
This will help you judge yourself are you really worth ofattending interviews. If you own a company best way to judge if thecandidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
2000 Interview questions of .NET , JAVA and SQL Server Interviewquestions (worth downloading it)
http://www.questpond.com/InterviewQuestions.zip
Core Java and OOP's Interview questions
http://www.questpond.com/OOPsAndCoreJava.zip
Servlets / JSP Interview questions
http://www.questpond.com/ServletsJSP.zip
Architecture Interview Question
http://www.questpond.com/ArchitectureInterviewQuestions.zip
Project Management Interview questions must to read for all aspiringproject managers
http://www.questpond.com/ProjectManagementInterviewQuestions.zip
Full Address book application in C# with technical specification ,estimation and test cases
http://www.questpond.com/AddressbookProject.zip
Web services Interview questions
http://www.questpond.com/WebServicesAndRemoting.zip
SQL Server 2005 Database optimization Interview questions
http://www.questpond.com/DatabaseOptimization.zip
SQL Server 2005 DTS Interview questions
http://www.questpond.com/DTSInterviewQuestions.zip
SQL Server datawarehoue and Data mining Interview questions
http://www.questpond.com/DatawareHousingandDataMining.zip
SQLCLR Interview questions
http://www.questpond.com/SQLCLRInterviewquestion.zip
SQL Server XML Interview questions
http://www.questpond.com/SQLServerXML.zip
Basic .NET Framework interview questions
http://www.questpond.com/FrameWorkSampleInterviewQuestions.zip
..NET Interop and COM Interview questions
http://www.questpond.com/InteropdotnetInterviewQuestions.zip
ASP.NET Caching Interview questions
http://www.questpond.com/CachingInterviewQestions.zip
Localization globalization Interview questions
http://www.questpond.com/LocalizationAndGlobalization.zip
Do not know how estimations are done here's a complete book on it
http://www.questpond.com/HowtoPrepareSoftwareQuotations.zip
Sunday, December 10, 2006
Microsoft Web Expression
http://www.microsoft.com/downloads/details.aspx?familyid=44FA7F93-7D57-4523-B0C9-2CE54397B732&mg_id=10053&displaylang=en
The tool can be downloaded from the above link.
Friday, November 17, 2006
More more more code samples :)
Similarly more code samples from .Net Framework 3.0
http://www.microsoft.com/downloads/details.aspx?FamilyID=22B58B6C-8F98-40D0-880D-C3339C5DA01E&displaylang=en&mg_id=10049
Overview
The Windows SDK samples for .NET Framework 3.0 include samples for .NET Framework 2.0, Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation, and Cross Technology samples. These samples can be downloaded from here or are available when the Windows SDK is installed locally.
101 code samples for VS Dot net IDE 2005
One great thing about being and working in microsoft technologies is all that pampering you get via code samples, the videos, the code samples, if not there are usergroups and forums.
There is no need to break our heads for doing anything as some other person has already done something for you.
In that list, here is a list of 101 code samples for VS Dot net IDE 2005
http://msdn2.microsoft.com/en-us/vstudio/aa718334.aspx
Base Class Libraries - Group 1 Samples
The Base Class Library Group 1 samples show how to use the classes in the namespaces System.Net, System.RegEx, System.Transaction, System.Console and more. Samples include:
- Changing ACL (Access Control Lists) on files
- Console Enhancements including buffer control, simple animations and colors
- Downloading files using FTP (File Transfer Protocol)
- Network Programming including PING, UDP, and TCP network statistics
- Using the new Stopwatch class to measure time
- Compressing and decompressing files in the GZip format
- Retrieving Drive Information
- Using Generic Collections
- Creating Regular Expressions to parse text
Base Class Libraries - Group 2 Samples
The Base Class Library Group 2 samples show how to use the new classes and methods in the namespaces System.Net.Cache, System.Runtime.InteropServices, System.Net.Sockets.Socket and more. Samples include:
- Building a tracing infrastructure to track errors and application performance
- Controlling cache policies with the new System.Net.Cache namespace
- Creating a process viewer
- Creating a Windows service manager
- Using the data protection API
- Encrypting and decrypting data
- Using platform invoke to access legacy or unmanaged code from within managed code
- Building in support for localization
- Using the NGEN utility
- Using the new SecureString class
- Using new socket class methods
- Using serial ports with the new Port class
- Working with the file system
- Working with threads to manage multiple tasks simultaneously
- Building a simple web server with HTTPListener
Web Development Samples
The Web Development samples show how to use some of the new features of ASP.NET 2.0.
Windows Forms Samples
The Windows Forms samples show how to use some of the new functionality available to developers building desktop applications.
Visual Studio Tools for Office Samples
The Visual Studio Tools for Office (VSTO) samples show how to add functionality to Office applications like Word, Excel, InfoPath, and Outlook using the .NET framework and C# or Visual Basic.
Tablet PC Samples
The Tablet PC samples show how to create ink-enabled applications that utilize the power handwritten input with Tablet and Ultra Mobile Personal Computers.
.NET Compact Framework Samples
The .NET Compact Framework samples show how to use the new functionality found in Windows Mobile 5.0.
Friday, November 10, 2006
Sharepoint & MOSS 2007 Books
Here is a list, (will try to update it periodically keep checking my blog).
FREE STUFF:
1) Microsoft PDF - 7 Development projects with sharepoint
This one is free but you can only view it, you cannot print it.
Right click and save target as to save to your hard disk,
http://download.microsoft.com/download/0/2/f/02f0f661-88e1-43c2-b523-88d2e9e6802f/7%20Development%20Projects%20with%20the%202007%20Microsoft%20Office%20System%20and%20Windows%20SharePoint%20Services%202007.pdf
Publications:
2) Microsoft SharePoint 2007 For Dummies (For Dummies (Computer/Tech)) (Paperback)
by Vanessa L. Williams
Hey dont laugh by looking at for dummies, they do have some great information.

Click here to Buy
3) Microsoft Office SharePoint Server 2007 Administrator's Companion (Pro Resource Kit) (Paperback)
by Bill English, Microsoft Sharepoint Community Experts

Click here to buy
4) Microsoft SharePoint 2007 Development Unleashed (Paperback)
by Kevin Hoffman, Robert Foster

Click here to buy
BOOKS from Microsoft Press (wait for few more months to release) Still in the press :)
5) Inside Microsoft® Windows® SharePoint® Services Version 3
Author Ted Pattison; Daniel Larson
Pages 560
Disk 1 null
Level Int/Adv
Published 04/04/2007
ISBN 0-7356-2320-1

Click here to see details (still in Press)
6)Microsoft® Windows® SharePoint® Services Version 3.0 Inside Out
Author Jim Buyens
Pages 800
Disk 1 Companion CD(s)
Level Int/Adv
Published 03/14/2007
ISBN 0-7356-2323-6

Click here to see details (still in Press will be out by Feb 28 2007)
7) The great step by step book
Microsoft® Windows® SharePoint® Services Version 3.0 Step by Step
Author Olga M. Londer, Todd Bleeker, Penelope Coventry and Bill English
Pages 368
Disk 1 Companion CD(s)
Level Beg/Int
Published 02/28/2007
ISBN 0-7356-2363-5

Still in press (will be released by Feb 28 2007)
Wednesday, November 08, 2006
Sharepoint Developer Videos
There is a chinese proverb which says a picture can express thousand words, like that all these "How to........" series videos and lots of other how to code how to use sharepoint videos helps the developers.
There are more developer videos which a developer can download and see and learn, they are found at,
1) Videos on KPI, Web Parts,
Microsoft Office System Developers Conference 2006
Download this series of developer-oriented videos to view conference breakout sessions about building smart client and browser-based BI solutions leveraging a wide array of extensible capabilities, including key performance indicators, PivotTables, Web parts, and spreadsheet-based Web services.
http://www.microsoft.com/downloads/details.aspx?FamilyID=621566FD-A3D8-4628-A2CB-538CC173509F&displaylang=en
2) Videos on How to serieshttp://www.microsoft.com/downloads/details.aspx?familyid=AAFBC288-9F1E-4398-AE06-617CEFEC5823&displaylang=en
3) Videos on Collaboration Tools:
Microsoft Office System Developers Conference 2006
Download this series of developer-oriented videos to view conference breakout sessions about how developers can use the 2007 Microsoft Office system to create powerful collaboration tools.
http://www.microsoft.com/downloads/details.aspx?familyid=029706C1-F20E-4BD1-99BB-78810E16F3D8&displaylang=en
4) Videos on Enterprise Content ManagementMicrosoft Office System Developers Conference 2006
Download this series of developer-oriented videos to view conference breakout sessions about the new, extensible content management
http://www.microsoft.com/downloads/details.aspx?familyid=562B9B75-55B7-4F5D-AFE4-1F78C8B7FC6D&displaylang=en
5) Videos on Portal Customization
Microsoft Office System Developers Conference 2006
Download this series of developer-oriented videos to view conference breakout sessions about customizing search capabilities, building custom portal interfaces, providing personalized views, and aggregating connections to line-of-business data.
http://www.microsoft.com/downloads/details.aspx?familyid=5EC4193A-8061-4FD8-8CA4-574540049FE9&displaylang=en
6) Videos on Business Intelligence
http://www.microsoft.com/downloads/details.aspx?familyid=AAFBC288-9F1E-4398-AE06-617CEFEC5823&displaylang=en
Tuesday, November 07, 2006
Blog of Eric Legault - sharepoint / outlook MVP
His MVP profile - http://aspnet2.com/mvp.ashx?EricLegault
His personal website - http://www.collaborativeinnovations.ca/
His Sharepoint blog - http://blogs.officezealot.com/legault/
Dot Net 3.0 Officially released today
http://www.netfx3.com/blogs/news_and_announcements/archive/2006/11/06/.NET-Framework-3.0-has-been-released_2100_.aspx
Saturday, November 04, 2006
Lots of webcasts
http://www.microsoft.com/events/series/msdnvsts2005.mspx
MSDN Webcast: Unit Testing with Visual Studio Team System (Level 200)
Monday, November 13, 2006
1:00 P.M.–2:00 P.M. Pacific Time
Join us as we examine some of the advanced unit-testing capabilities in Visual Studio Team System such as data binding, host adapters, and integration with Microsoft Visual Studio 2005 Team Foundation Server./>
MSDN Webcast: Overview of Visual Studio 2005 Team Edition for Software Testers (Level 200)
Friday, December 1, 2006
11:00 A.M.–12:00 P.M. Pacific Time
Learn about the major feature sets of Microsoft Visual Studio 2005 Team Edition for Software Testers and how they integrate into the development life cycle.
These guys have a webcast every day, check out their interactive calendar
http://www.microsoft.com/events/webcasts/calendar/monthview.aspx
Monday, October 30, 2006
SOA >> EXPOSE / COMPOSE / CONSUME

Service Oriented Architecture , Web 2.0 are the latest buzz words in the industry today.
There is an excellent PPT on Thom Robbins blog which explains the same and relates it to the Dot Net Framework.
Expose: Make use of Dot net framework code webservices or make use of Biz talk to expose services.
Compose: Use Share point server 2007 & Biz talk server 2006 & MS Office Visio 2007 to compose the services.
Consume: Use Share point server 2007 / MS office / Office performance point server to consume the webservices.
I was recently playing with share point and was amazed to see that the infopath forms collect the data and the desitnation can be an outlook folder or an email.
Please download the SOA ppt from this link,
http://www.thomscontent.com/posts/soa/realworldsoa.zip
Also look at the future roadmap for Microsoft.
Sunday, October 29, 2006
Info Path 2007 - cool features and video
The Infopath team blog is http://blogs.msdn.com/infopath/
There is an excellent video about Eric Richards and the info path team from microsoft.
Some cool features:
1) Infopath forms can be filled on the web, no need to have info path clients installed
2) Infopath forms work even on Firefox (not just IE)
3) Infopath forms can work offline, that is your form data is available offline you can save and fill your forms offline and submit it when you connect to internet,
4) You can fill forms in outlook
5) Round trips to database is avoided, client fills form and once data is consolidated is saved to server.
6) Totally based on xml and xpath
7) Infopath design tools are now available inside VS2005 IDE and you can drag and drop and code
Blog of Eric Richards - http://www.ericri.com/et/blog/
Video URL:
Scobleizer the channel 9 Video guy, meets the infopath development team in microsoft and shows the preview features in this 30 minute cool video.
mms://wm.microsoft.com/ms/msnse/0510/25766/new_infopath_team_2005_MBR.wmv
Wednesday, October 25, 2006
Few good share point links
http://www.sharepointu.com/
105 features of share point - a blog link which links to another site
http://markharrison.co.uk/blog/2006/02/sharepoint-show-105-features-in.htm
Online live test lab to learn share point
http://www.gbg.runaware.com/microsoft/en-us/office2007/td/launch?lbredir=1