Shashwat's profile Shashwat Chan...PhotosBlogListsMore Tools Help

Blog


    June 07

    SPUtility.SendEmail vs. SmtpClient.Send

    When there is requirement  to send email in SharePoint , developers usually use

                               

                              Microsoft.SharePoint.Utilities.SPUtility.SendEmail(web, false, false, emailId, MailSubject, htmlBody);

     

    due to the fact that this class automatically uses the default SMTP configuration settings of the SharePoint.

                               

    Developers avoid using System.Net.Mail.SmtpClient class to send emails because they need to have the SMTP configuration before using this class. However they can use the below code snippet to automatically detect the SMTP settings with the help of SPWebApplication.

     

                                System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();

                                message.IsBodyHtml = true;

                                message.Body = html;

                                message.From = new System.Net.Mail.MailAddress(SPContext.Current.Site.WebApplication.OutboundMailSenderAddress);

                                SPOutboundMailServiceInstance smtpServer = SPContext.Current.Site.WebApplication.OutboundMailServiceInstance;

                                System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(smtpServer.Server.Address);

                                message.To.Add(emailId);

                                message.Subject = "Test";

                                smtp.Send(message);

     

     

    A major drawback of using SPUtility.SendEmail is of its character limitation of 2048 per line which strips out the content of the Email after sending while System.Net.Mail.SmtpClient does not have  any such limitation.

    December 05

    Useful RegEx Patterns

    Here is the list of Daily useful regex patterns.
     
    Pattern Description Examples Incorrect Correct
    ^[\w-'\.]{2,128}$ Allows word characters [A-Za-z0-9_], single quote, dash and period must be at least two characters long and less then 128 Username Shashwat!- Shashwat
    ^.*(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[`~!@\$%\^\&\*\(\)-_\=\+\[\{\]\}\\\|;:',<\.>/?]).*$ The password must be longer and contains at least one uppercase, one lowercase, one numeric, and one symbolic character. Password sh S0hash+wat
    ^[a-zA-Z-'\.\s]{2,128}$ Allows alphabetical chars, single quote, dash and space must be at least two characters long and caps out at 128 Name, City Name Shashwat! Shashwat,
    Shashwat Chandra,
    Shashwat K Chandra,
    Shashwat k’ Chandra
     
    \d{1,3}.?\d{0,3}\s[a-zA-Z]{2,30}(\s[a-zA-Z]{ 2,15})?([#\.0-9a-zA-Z]*)? A Series of digits (Potentially containing punctuation), followed by the series of characters representing the street name and then potentially a type of street and unit number  Address 45-50!!! South Lake Road 123 Main St., 
    2nd Ave Bell Street,
     45-50 South Lake Road #8
     
    ^(\d{5}-\d{4}|\d{5}|\d{9})$ Allows 5 digit, 5+4 digit and 9 digit zip codes. Must be at least two characters long and caps out at 128(database size). Zip Code 900341, 90034-1234
    ^[01]?[- .]?(\([2-9]\d{2}\)|[2-9]\d{2})[-.]?\d{3}[- .]?\d{4}$ Allows phone number of the format: NPA = [2-9][0-8][0-9] Nxx = [2-9][0-9][0-9] Station = [0-9][0-9][0-9][0-9] US Phone Number 617/555/1212 1-617-555-1212, (617) 555-1212
    ^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d Optional dashes between group of numbers Credit Card Number, Visa, and Passport Number etc 1234567890 4444-1234-5678-9900
    ^\d{3}[-]?\d{2}[-]?\d{4}$ Allows SSN's of the format 123-456-7890. Accepts hyphen delimited SSN’s or plain numeric values. SSN 123-456 123-45-6789, 987654321
    ^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$ Allows common email address that can start with a alphanumeric char and contain word, dash and period characters followed by a domain name meeting the same criteria followed by a alpha suffix between 2 and 9 character lone Email Address shashwat_c@hotmail shashwat_c@hotmail.com
    ^^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_=]*)?$ Allows HTTP and FTP URL's, domain name must start with alphanumeric and can contain a port number followed by a path containing a standard path character and ending in common file suffixies found in URL's and accounting for potential CGI GET data URL http://= http://shashonline.spaces.live.com
    ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ Allows four octets of numbers that contain values between 4 numbers in the IP address to 0-255 and are separated by periods. IP Address 300.300.300.300 192.168.0.1
    ^[A-Za-z]+$ Allows one or more alphabetical characters. This is a more generic validation function. AlphaText    
    ^[A-Za-z0-9]+$ Allows one or more alphabetical and/or numeric characters. This is a more generic regex patterns. AlphaNumericText    
    /[+-]?\d+(\.\d+)?$ Allows one or more positive or negative, integer or decimal numbers. This is a more generic regex pattern. NumericText    
    November 05

    Create your own Tabbloid

     
    tabbloid-from-hp
     
    One way is to help people create more materials that are “print worthy”. Tabbloid from HP is one such project. Tabbloid promises to create a personal magazine out of all your favorite feeds and then deliver it to you as a neat PDF - something that is print-worthy. If a small percentage of people who receive these personal magazines print them, HP would be happy.
     
    ~ShashLight bulb
     
    January 22

    .NET Source Code Available for Debugging

    The source code for several key .NET libraries is now available for debugging purposes. They are not "open source" in the sense you can do anything you want with them, instead there is a strict "look but don't touch" license known as the Microsoft Reference License. Even still, they should be an immense resource to .NET developers.

    Scott Guthrie announced that Microsoft intended to release the .NET source code back in October. Since then we have not heard much with everyone's attention split between Visual Studio 2008 and the various post-release libraries still under development.

    The source code is only available via Visual Studio 2008's integrated debugging features, and then only for the paid SKUs. Hobbyists using VS Express or a third-party editor will not be able to download the files.

    Once you follow the instructions in Shawn Burke's Blog, stepping through Microsoft's source code is just as easy as looking at you own. You can also look at the source code directly for classes you have already seen, but this requires digging through the symbol cache.

    The namespaces included in the initial release are

    • System
    • System.CodeDom
    • System.Collections
    • System.ComponentModel
    • System.Data
    • System.Diagnostics
    • System.Drawing
    • System.Globalization
    • System.IO
    • System.Net
    • System.Reflection
    • System.Runtime
    • System.Security
    • System.Text
    • System.Threading
    • System.Web
    • System.Web.Extensions
    • System.Windows
    • System.Windows.Forms
    • System.Xml
    October 18

    10 types of techies…

    10 types of techies… and how to manage them

     

    It’s wrong to stereotype people. It isn’t wrong, however, to recognize classifications of the team members you deal with every day. Many of the types of techies identified below may seem familiar to veteran IT managers. My ideas on how to work effectively with each type follow the descriptions.

    This information originally appeared in the article “Tame these 10 types of techies,” by Patrick Andrews.

    #1: Human Bottleneck

    These techies either demand to do all the coding, or never finish their work, or both. Impress upon them that quality is often the opposite of perfectionism. Also, feed them small, well-defined tasks and praise any competent output that is on schedule.

    #2: Bright Green

    These straight-out-of-college developers like the new, cool technology. They tend to over-engineer by exploiting all the bells and whistles of the development environment — even when it’s inappropriate. These green techies often rely on their planet-size intellects to help them get back on schedule in predelivery all-nighters. Introduce them to colleagues who recently were Bright Green but learned the hard way to focus on deliverables.

    #3: Tried-But-Untested

    The mantra of these techies is, “Hey, we’ve got a whole testing team, why should I worry about checking my code?” It’s a guarantee that these specimens will cause you grief, so it’s essential to pull them up short. You’ll be doing them a favor in the long term.

    #4: Techno-Babbler

    Their code doesn’t work because they “need” something. These techies spend too much time in newsgroups and fail to realize that overusing jargon is not a sign of adulthood. Require these techies to give an acronym-free, from-first-principles explanation of project results to management.

    #5: User-Loser

    These techies consider many client questions stupid and deem the client worthy of a verbal flame. This often leads to the client not doing business with your company in the future. If your developers have contempt for “suits,” try introducing a “dress-up Wednesday” — and keep them away from outside phone contact.

    #6: Task Farmer

    As your self-appointed deputy, this type of techie assumes that the project plan is only a guideline and that it’s acceptable for team members to swap roles and tasks without asking you. Clarify that although their suggestions are welcome, you’re the one who carries the weight of the project.

    #7: Under the Radar

    This colleague has a tendency to generate maximally obscure code. This is usually a way to hide inelegance of implementation and to secure employment by preventing any other developers from working on his or her input. A curative strategy is to make the techie responsible for technical mentoring of a demanding Bright Green team member.

    #8: Winging-It Commander

    This type of techie’s curriculum vitae says they’re proficient in Java, SQL, and Perl, but their lines of code are sparse and curiously primitive. This techie will also place unusual demands on other team members to help “debug” their deliverables. Projects can’t accommodate this level of on-the-job training. Encourage team members to be honest about their technical comfort zones by offering them appropriate training opportunities.

    #9: Prima Donna

    These characters simply won’t tackle mundane tasks. And if you suggest that they have to adapt existing code, there’s always a performance of operatic proportions. Make it clear that they’ll work for the technical author for a month if this nonsense persists.

    #10: Gender Agenda

    Some developers have trouble working for, or even alongside, colleagues of the opposite sex. Challenge their assumptions by introducing them to a cross-section of your most accomplished colleagues.

    Project managers don’t have time to conduct therapy sessions in the course of an already-demanding project. All you can do is recognize team members’ specific ongoing issues and ensure that they don’t damage the work in progress.

    October 10

    Finally me an MCPD and MCTS :)

       Microsoft Certified Professional Transcript
    Latest Activity Recorded Sep 29, 2007




    SHASHWAT  CHANDRA





    Microsoft Certification Status

    Credential Certification / Version Date Achieved
    Microsoft Certified Professional Developer Sep 29, 2007
    Enterprise Application Developer Sep 29, 2007
    Microsoft Certified Technology Specialist Aug 21, 2007
    .Net Framework 2.0: Distributed Applications Sep 24, 2007
    .Net Framework 2.0: Web Applications Sep 17, 2007
    .Net Framework 2.0: Windows Applications Aug 21, 2007


    Microsoft Certification Exams Completed Successfully

    Exam ID Description Date Completed
    549 PRO: Designing and Developing Enterprise Applications by Using the Microsoft® .NET Framework Sep 29, 2007
    529 TS: Microsoft® .NET Framework 2.0 - Distributed Application Development Sep 24, 2007
    528 TS: Microsoft® .NET Framework 2.0 - Web-based Client Development Sep 17, 2007
    526 TS: Microsoft® .NET Framework 2.0 - Windows®-based Client Development Aug 21, 2007
    536 TS: Microsoft® .NET Framework 2.0 - Application Development Foundation Jul 30, 2007

    Quote

    Microsoft New Genetaion of Certifications
     
    Microsoft has come up with new generation of its certifications.
     
    MCTS-->MCPD-->MCTA
     
    1) Microsft Certified Techonolgy Specialist (MCTS)
     
        Exam 70-536,Exam 70-528,Exam 70-526,Exam 70-529
     
    2) Microsft Certified Proffesional Devloper(MCPD)
     
        MCTS+ Exam 70-549
     
    3) Microsft Certified Architect(MCTA)
     
     
    For me I have to climb up the ladder from MCTS-->MCPD-->MCTA making it a microsoft way.Dont know when will i start.
    September 12

    Visual Studio to Finally Address Perfomance Issues

    Visual Studio to Finally Address Performance Issues

    Posted by Jonathan Allen on Sep 10, 2007 06:55 AM

    Community
    .NET
    Topics
    Artifacts & Tools,
    Performance & Scalability

    Visual Studio has been plagued with performance issues that have been getting worse with each version. These problems rarely occur in small projects but can have a dramatic impact on solutions with multiple projects or even a single, very large project.

    In a Channel 9 video, Cameron McColl apologized for Microsoft not thoroughly testing Visual Studio with large solutions. He then discusses some of the specific performance problems and how they were addressed in VS 2008.

    The first issue he covers is that of stepping through code. As many .Net developers know, there can be a 5 to 10 second lag time between each line of code. While this doesn't occur all the time, it can be quite frustrating when it does. He does not go into detail, but he does mention that in addition to the "crazy stuff" that they were doing, they had also stumbled onto an OS bug that added an extra second per step. This fix is supposed to be part of VS 2005 Server Pack 1 as well as VS 2008.

    The next issue he discusses is how Visual Studio can suddenly freeze for a number of seconds as someone is typing. This has a number of causes, several of which have been fixed. One cause is the number of items in the task list, which includes errors, warnings, and 'to-do' items. Whenever the task list was updated, it refreshed each item by removing and re-adding it. This involved an expensive calculation involving the position of the scroll bar.

    Another fix involves VB's background compiler. The background compiler gives Visual Basic a much richer design time experience with features like up to the minute code completion and error detection. Languages like C# and VC++ do not have this, so often the developer has to rebuild the project just to get a clear picture of the application's state.

    A downside of this is that Visual Studio, while opening a solution, would wait until the background complier had a chance to run. This delay was particularly bad with larger projects. As part of this fix, the class and method drop-down lists above the code editor will now indicate when they are not ready.

    Another much-needed change is that Visual Studio will now allow developers to cancel out of long-running operations. If a certain action requires information from the background compiler, the IDE will only wait to seconds before displaying a progress bar and cancel button.

    The next fix is for scenarios wherein there is a significant delay when trying to edit an aspx file in a large web application. Like with the code editor, this was due to the IDE waiting for the background compiler. Now the editor starts working immediately, with the tradeoff that code coloring and completion is not available until the background compiler catches up.

    The final fix he mentioned deals with compiling. For a solution in VS 2005 with 25 projects and approximately 3,000 files, a Rebuild All would take about 45 minutes. In VS 2008, that is down to one minute. Why? Because if a project was referenced by N other projects, it would be completely cleaned and rebuilt N+1 times. 

    September 04

    10 Reasons to pursue an MBA..

    One of my favourite philosphical evangelist has written this blog,i can't wait to blog it.

    Disclaimer: Of course, ten is not a magic number and there are more reasons. You are welcome to add your own. Thanks.

    Here are ten reasons to pursue an MBA (from a good school that is..)

    1. Network - Your MBA network is for lifetime if you know how to leverage it.

    2. Learning in a disciplined fashion - Without an MBA, you are learning from the school of hard knocks. There is a chance that you will pay a higher price for some lessons in the school of hard knocks

    3. Awareness - Chances are you don’t know everything and chances are you will never know everything in this lifetime. However, there are some things that you need to know that you don’t know that you need to know. An MBA will increase your awareness on these things.

    4. To get an advantage at the start: With an MBA, you enter the work world in the fast lane. Of course, you can’t stay on the fast lane just because you have an MBA. You need to produce highly valued accomplishments for your employer or customers or both.

    5. Course correction: For some reason you picked the wrong subject for your graduate degree and you don’t want to have a career in that field. You want to change course mid-way. An MBA may provide a bridge from where you are to the field of your choice.

    6. Status: MBA from a good university looks great on your resume.

    7. Entry Ticket to many organizations: There are many organizations (especially in the management consulting world) whose doors are open almost exclusively for MBA grads from top universities. If joining them is one of your dreams, you may be better off doing an MBA.

    8. Tune-up your purpose: You may have an idea of what you want to do in life. When you meet a set of highly-ambitious people and hear them share their vision and purpose of their lives, it may trigger you to “upgrade” your own vision and purpose of your life.

    9. Safe Laboratory: It provides a safe and almost risk free laboratory for bouncing off your ideas, testing them and

    10. Access to thought leaders: You have chance to meet thought leaders, corporate executives and visionaries who come and speak (mostly for free). If you connect with them and build on that relationship, you have an unfair competitive advantage.

    You have to weigh the price you pay while pursuing an MBA (time, cost, energy and lost opportunities during that time) to get the above benefits and determine whether an MBA is for you. Now, for some reason, you can’t earn an MBA, you don’t have to panic.

    July 27

    Talking about Take you IE favorites with you where ever you go

     

    Quote

    Take you IE favorites with you where ever you go



    How many of you have felt that u miss out the favorites that you had in your computer in your previous location or when you were with a previous employer.  how many of you had missed out the favorites when you browsed pages in a Net Cafe.

    now you can take your favorites with you. With windows live favorites you can share your favorites in internet and access it where ever you are. try http://favorites.live.com

    S.Sundararajan      



    NRIs: Are you still paying for money transfers to India?
    July 24

    VS 2008 to support Nested Master Pages

    One of the most lauded features in ASP.NET 2.0 is Master Pages. Master Pages serve as templates for a site, making it easier to create and maintain consistent style site-wide. They do have one drawback under VS 2005: they cannot be nested.

    Nested master pages are essential for larger sites that have more than one layout. Without them, developers have to manually ensure the common elements in each master page such as banners and copyright notices are kept in sync.

    It turns out that nested master pages are actually supported by ASP.NET 2.0 itself. It is only in the Visual Studio 2005 IDE where they cannot be used. Visual Studio 2008 adds full support for nested master pages, allowing developers to switch to this model without losing IDE support.

    It should be noted that since this feature is in ASP.NET 2.0, developers will not need to deploy .NET 3.5 to their production servers. They merely need to ensure that the project is set to compile to .NET 2.0.

    Scott Guthrie has a
    walk-through of nested master pages on his blog.  

    July 15

    Run Commands

    Here are some run commands. Check them out.

    To Access. - Run Command

    Example : To Accessibility Controls  run access.cpl

    Accessibility Controls - access.cpl

    Add Hardware Wizard - hdwwiz.cpl

    Add/Remove Programs - appwiz.cpl

    Administrative Tools - control admintools

    Automatic Updates - wuaucpl.cpl

    Bluetooth Transfer Wizard - fsquirt

    Calculator - calc

    Certificate Manager - certmgr.msc

    Character Map - charmap

    Check Disk Utility - chkdsk

    Clipboard Viewer - clipbrd

    Command Prompt - cmd

    Component Services - dcomcnfg

    Computer Management - compmgmt.msc

    Date and Time Properties - timedate.cpl

    DDE Shares - ddeshare

    Device Manager - devmgmt.msc

    Direct X Control Panel (If Installed)* - directx.cpl

    Direct X Troubleshooter - dxdiag

    Disk Cleanup Utility - cleanmgr

    Disk Defragment - dfrg.msc

    Disk Management - diskmgmt.msc

    Disk Partition Manager - diskpart

    Display Properties - control desktop

    Display Properties - desk.cpl

    Display Properties (w/Appearance Tab Preselected) - control color

    Dr. Watson System Troubleshooting Utility - drwtsn32

    Driver Verifier Utility - verifier

    Event Viewer - eventvwr.msc

    File Signature Verification Tool - sigverif

    Findfast - findfast.cpl

    Folders Properties - control folders

    Fonts - control fonts

    Fonts Folder - fonts

    Free Cell Card Game - freecell

    Game Controllers - joy.cpl

    Group Policy Editor (XP Prof) - gpedit.msc

    Hearts Card Game - mshearts

    Iexpress Wizard - iexpress

    Indexing Service - ciadv.msc

    Internet Properties - inetcpl.cpl

    IP Configuration (Display Connection Configuration) - ipconfig /all

    IP Configuration (Display DNS Cache Contents) - ipconfig /displaydns

    IP Configuration (Delete DNS Cache Contents) - ipconfig /flushdns

    IP Configuration (Release All Connections) - ipconfig /release

    IP Configuration (Renew All Connections) - ipconfig /renew

    IP Configuration (Refreshes DHCP & Re - Registers DNS) - ipconfig /registerdns

    IP Configuration (Display DHCP Class ID) - ipconfig /showclassid

    IP Configuration (Modifies DHCP Class ID) - ipconfig /setclassid

    Java Control Panel (If Installed) - jpicpl32.cpl

    Java Control Panel (If Installed) - javaws

    Keyboard Properties - control keyboard

    Local Security Settings - secpol.msc

    Local Users and Groups - lusrmgr.msc

    Logs You Out Of Windows - logoff

    Microsoft Chat - winchat

    Minesweeper Game - winmine

    Mouse Properties - control mouse

    Mouse Properties - main.cpl

    Network Connections - control netconnections

    Network Connections - ncpa.cpl

    Network Setup Wizard - netsetup.cpl

    Notepad - notepad

    Nview Desktop Manager (If Installed) - nvtuicpl.cpl

    Object Packager - packager

    ODBC Data Source Administrator - odbccp32.cpl

    On Screen Keyboard - osk

    Opens AC3 Filter (If Installed) - ac3filter.cpl

    Password Properties - password.cpl

    Performance Monitor - perfmon.msc

    Performance Monitor - perfmon

    Phone and Modem Options - telephon.cpl

    Power Configuration - powercfg.cpl

    Printers and Faxes - control printers

    Printers Folder - printers

    Private Character Editor - eudcedit

    Quicktime (If Installed) - QuickTime.cpl

    Regional Settings - intl.cpl

    Registry Editor - regedit

    Registry Editor - regedit32

    Remote Desktop - mstsc

    Removable Storage - ntmsmgr.msc

    Removable Storage Operator Requests - ntmsoprq.msc

    Resultant Set of Policy (XP Prof) - rsop.msc

    Scanners and Cameras - sticpl.cpl

    Scheduled Tasks - control schedtasks

    Security Center - wscui.cpl

    Services - services.msc

    Shared Folders - fsmgmt.msc

    Shuts Down Windows - shutdown

    Sounds and Audio - mmsys.cpl

    Spider Solitare Card Game - spider

    SQL Client Configuration - cliconfg

    System Configuration Editor - sysedit

    System Configuration Utility - msconfig

    System File Checker Utility (Scan Immediately) - sfc /scannow

    System File Checker Utility (Scan Once At Next Boot) - sfc /scanonce

    System File Checker Utility (Scan On Every Boot) - sfc /scanboot

    System File Checker Utility (Return to Default Setting) - sfc /revert

    System File Checker Utility (Purge File Cache) - sfc /purgecache

    System File Checker Utility (Set Cache Size to size x) - sfc /cachesize=x

    System Properties - sysdm.cpl

    Task Manager - taskmgr

    Telnet Client - telnet

    User Account Management - nusrmgr.cpl

    Utility Manager - utilman

    Windows Firewall - firewall.cpl

    Windows Magnifier - magnify

    Windows Management Infrastructure - wmimgmt.msc

    Windows System Security Tool - syskey

    Windows Update Launches - wupdmgr

    Windows XP Tour Wizard - tourstart

    Wordpad – write

    July 13

    Talking about Microsoft enterprise event in the next year - Feb. 27, 2008

     

    Quote

    Microsoft enterprise event in the next year - Feb. 27, 2008

    Turner announced that Windows Server® 2008, Visual Studio® 2008 and Microsoft SQL Server™ 2008 will launch together at an event in Los Angeles on Feb. 27, 2008, kicking off hundreds of launch events around the world.” Read more from here. http://dotnetsamplechapters.blogspot.com/2007/07/windows-server-2008-visual-studio-2008.html

    July 12

    Hidden Programs of Windows

     
    1- Private Character Editor
    This program is for designing icons and Characters(Alphapet )
    Click :start
    Then :run
    type :EUDCEDIT
    ............ ......... ......... ......... ......... ......... ......... ......... .....\
    ............ ......... ......... ......... ......... ......... ........
    2- iExpress
    This Program is for converting your files to EXCUTABLE files
    Click : start
    Then : run
    type : iexpress
    ............ ......... ......... ......... ......... ......... ......... ......... .....\
    ............ ......... ......... ......... ......... ......... ........
    3-Disk Cleanup
    This program used for cleaning harddisk to offer space
    Click : start
    Then : run
    type : cleanmgr

    ............ ......... ......... ......... ......... ......... ......... ......... .....\
    ............ ......... ......... ......... ......... ......... ........
    4-Dr Watson
    This program Is for repairing problems in Windows
    Click : start
    Then : run
    type : drwtsn32
    ............ ......... ......... ......... ......... ......... ......... ......... .....\
    ............ ......... ......... ......... ......... ......... ........
    5-Windows Media Player 5.1
    Opens the old media player
    Click : start
    Then : run
    type : mplay32
    ............ ......... ......... ......... ......... ......... ......... ......... .....\
    ............ ......... ......... ......... ......... ......... ........
    Program ............ . CODE
    __________ __________
    Character Map = charmap

    DirectX diagnosis = dxdiag

    Object Packager = packager

    System Monitor = perfmon

    Program Manager = progman

    Remote Access phone book = rasphone

    Registry Editor = regedt32

    File siganture verification tool = sigverif

    Volume Control = sndvol32

    System Configuration Editor = sysedit

    Syskey = syskey

    microsoft Telnet Client = telnet

     

    July 11

    .NET 3.0 Apps running on Live Sites

    Turning the Pages 2.0™, has been developed for the Microsoft Vista operating system and was launched on 30 January. It will also run on Windows XP with the .NET 3.0 framework.These books are available on British Library.
     
     
    Also some Silverlight games are been devloped in the below URL-->
     

     

     

    July 10

    .NET Waves

    A good blog article by Mohmmad Akif...Must to Share...I bet all the ambiguties regarding .NET versions will be cleared after reading the below articles.
     
    The latest version of Microsoft's .NET, .NET Framework 3.0, opens up new possibilities for developing the next generation of business solution software. It is designed to enhance productivity, reduce infrastructure plumbing, provide an identity meta-system, and facilitate development of enterprise-class services, work flow solutions and immersive user experiences.

    During my discussions with a wide variety of architects I have learned that Solution Architects care very much about security, open standards, interoperability, services oriented architecture, relationship between key technologies (for example Workflow Foundation and Biztalk) and productivity. In this article, I have attempted to provide a description of .NET 3.0 in terms of areas that are of significant interest for the architect community.

     

    .NET versions

    It has been almost six years since Microsoft released the first version of the .NET Framework. The 3.0 incarnation is the first framework being distributed with the operating system, i.e. with every Windows Vista installation and is also supported on Windows XP SP2 and Windows Server 2003. Until .NET 3.0, each version of the .NET framework was also accompanied by a new Common Language Runtime, hereafter referred to as the CLR. Microsoft has not modified the CLR for the 3. 0 version of the .NET framework and this is an important point to understand.

    As .NET 2.0 and 3.0 share the same CLR, everything written in .NET 2.0 works in .NET 3.0 which is an important and significant departure from previous versions. In terms of change, for those who love algebra equations the relationship can be summed anecdotally as:

    .NET 3.0 = .NET 2.0 + WCF + WPF + WCS + WF

    I will provide a definition of each of the acronyms, but anytime you get confused about the relationship between .NET 2.0 and 3.0, keep the above equation foremost in mind. One of the key philosophies behind .NET 3.0 is to provide functionality that can be considered ‘infrastructure plumbing' as part of the framework. This allows you to focus on your key business problem.

    The .NET Framework 3.0 achieves this objective through four key standards-based pillars corresponding to areas identified and requested by our customers. It also introduced a key new language called XAML. XAML is a declarative XML-based language that defines objects and their properties in XML allowing customers to develop workflows (WF) and immersive user experiences (WPF) declaratively. Let us explore the key pillars of the .NET 3.0 framework in greater detail.

     

    Windows Communication Foundation (WCF)

    WCF allows you to architect services by offering a standards- based framework and a composable architecture. The three key design philosophies for WCF are interoperability, productivity and service-oriented development.

    Microsoft provides a number of messaging layer channels and service model layer behaviours that can be added and removed easily. It also allows you to define your own custom instances, for example you can write or buy a custom encoder for ASCII and insert it as a reusable channel in the messaging layer that can be used across various systems. WCF interoperates with existing investments and combines and extends existing Microsoft distributed systems technologies like Enterprise Services, System.Messaging, Microsoft .NET Remoting, ASMX and Web Services Extensions (WSE). This change implies that you can use a single model for different types of application behaviours which significantly reduces the complexity in application development. WCF also offers interoperability with non-Microsoft applications through support of the WS-I basic profile and a number of additional WS-* standards.

    Finally in terms of productivity you can get a significant order of magnitude difference in developing secure transactional web services using WCF. Think of WCF as tens of thousands of lines of code that you would need to develop, generate and maintain, but instead are provided now as part of the base framework. WCF offers one of the first core programming frameworks that have been designed from the ground-up for services oriented development.

     

    Windows Workflow (WF)

    Workflow Foundation is an enterprise class workflow development framework and engine that has taken declarative workflow mainstream for the first time. WF supports human, system, sequential and state-machine workflows. It provides runtime infrastructure, flexible flow control, long running and stateful work flows and runtime and design time transparency and auditing capabilities for compliance and record management.

    Workflow Foundation allows you to define a workflow as a set of activities. Activities are the unit of execution and allow for easy re-use and composition. Basic activities are steps within a workflow while composite activities contain other activities. You can add and remove activities even when a workflow is already in progress allowing you significant flexibility in terms of change. Workflow Foundation provides a base activity library out-of-the-box and a framework for partners and customers to easily author custom activities.

    In terms of authoring options, you can use XAML mark-up only, mark-up plus code or code-only. Visual Studio 2005 Designer for Workflow Foundation is available as a downloadable plug-in and provides a drag-and-drop design surface, intuitive graphical tools, integration with the Properties window, debugging and graphic Commenting capabilities.

    A number of architects have asked me about the relationship between Workflow Foundation, BizTalk, Microsoft Office SharePoint Server 2007, (MOSS 2007) and Windows SharePoint Services (WSS).

    Workflow Foundation, (WF), was developed by the same team at Microsoft that developed the BizTalk workflow engine and is intended to be utilized by BizTalk Server in future versions. WF provides the foundation for implementing workflow scenarios mostly within an application and between applications in certain cases. BizTalk allows you to automate your business processes, orchestrate processes comprising of systems implemented in different technologies through adapters and provide advance business activity monitoring capabilities.

    In terms of MOSS 2007 and WSS, MOSS 2007 is built on top of WF and provides additional functionalities and features using WF for the base functionality. Windows SharePoint Services provides a subset of the functionality of MOSS 2007 as an add-in to Windows Server. Simply put, WSS provides simple document management capabilities and workflow.

     

    Windows Presentation Foundation (WPF)

    Windows Presentation Foundation attempts to bridge the gap between the immersive user experience typically found in the gaming and entertainment industry and the static and hard-to-use world of business. WPF uses XAML extensively to allow you to develop the next generation of interfaces without becoming a graphic designer yourself.

    I would encourage you to see a demonstration of a WPF application to understand what I mean by the next-generation user interface. You can, for example, view fifteen of the most precious books present at the British Library (http://www.bl.uk/ttp2/ttp1.html ) including Mozart and DaVanci hand-written notebooks. This reader is a WPF based application hosted in a Internet Explorer browser session and is referred to as an XBAP, the technology meant to replace ActiveX in the browser functionality-wise. The key differentiator for WPF is not the end product, a wonderfully rich interface, but actually how easy it is to develop and maintain the application code.

    From an architectural perspective, WPF maintains a very clear separation between the graphic element and business logic. A designer will use the Expression product line and XAML to build the view, while the developer will use Visual Studio and write code using VB.NET or C#.

    Another technology that has received a lot of attention lately is WPF Everywhere, (WPF/E), which is now officially called SilverLight. Please note that SilverLight is not part of the NET 3.0 framework. SilverLight is a cross-browser, cross-platform plug-in with its own runtime for delivering the next generation of Microsoft .NET-based media experiences and rich interactive applications for the Web. You can find out more information about SilverLight and view the demonstrations at http://www.microsoft.com/silverlight.

     

    Windows Card Spaces (WCS)

    In today's world, everyone carries a number of self asserted and third party issued identities. Examples of these identities include driving licences, credit card, cinema card and others. We have control over the information we use to prove our identity to the requesting party. Windows Card Spaces extends the same concept of user control to the digital world. WCS creates an identity meta-system that can significantly improve the way enterprises manage identities within their organization and between different organizations. To understand the potential, it has been praised by one of Microsoft's prominent critics as "one of the most significant contribution to computer security since cryptology.

    In the digital world, identity can be expressed as subject (who), identity claims and security token (digital representation of subject and claims). WCS uses the concept of self-asserted and managed identities, a self asserted digital identity card could be used for signing up with a service like Hotmail whereas a managed identity could be a credit card issued by a bank. The following picture illustrates the protocol that is used to exchange information between the various entities. Please note that in this case the Identity provider could use Kerberos, X509 or a custom mechanism. Similarly the relaying party could use SAML or send the security token using HTTPS post.

    WCS provides an overarching framework for various implementations of identity management technologies to work together. At Java One (which is the one of largest Java conferences in the world), Sun and Microsoft did a joint keynote demonstrating interoperability mechanisms based on WS-* standards. I have posted the link to the demonstration and the toolkit at my blog mentioned at the end of this article.

     

    Conclusion

    The .NET 3.0 Framework opens up a new world of possibilities for both architects and developers. It is intended to make it significantly easier for you to develop, integrate and maintain application based systems. Microsoft plans to continue this same philosophy of reducing complexity and infrastructure plumbing while concurrently increasing interoperability and standards support for the future version of the .NET framework. For a complete list of support standards and detailed resources on each of the topics described in this article visit http://blogs.msdn.com/mohammadakif and click on the .NET 3.0 category for more details.

     

    July 04

    Talking about Inside String Concatenation

     

    Quote

    Inside String Concatenation

    In this post we will discuss about how the concatenation happens when you call string.concat() and how the concatenation happens when you call Stringbuilder.Append().

    Here I have analysed it based on the Rotor .Net V2.0 code (some may not apply to .Net 1.1).

    Generally, it is of the opinion that for any 2-4 strings use String.Concat() and for more than 4 strings use stringbuilder.Append(). The only difference that the string builder brings in is that it reduces the number of string allocations during the append operation , thereby reducing the GC effort.

    How does a string concat work:-

    If two strings are passed as arguments, it will find out the length of the resultant string, allocate memory for it and then copy these strings one by one.

    If more than 4 strings are passed, it will consider it as an array of strings to be concatenated, spin through the array elements to find out the length of the resultant string. Then it allocates the memory for the resultant string and copies the strings one by one into that memory location.

    For the C# code below:-

    string s1="hello";
    string s2="world";
    string s3=" My";
    string s4=" Program";

    string result = s1+s2+s3+s4;

    it generates the IL code as

    IL_0001: ldstr "hello"

    IL_0006: stloc.0

    IL_0007: ldstr "world"

    IL_000c: stloc.1

    IL_000d: ldstr " My"

    IL_0012: stloc.2

    IL_0013: ldstr " Program"

    IL_0018: stloc.3

    IL_0019: ldloc.0

    IL_001a: ldloc.1

    IL_001b: ldloc.2

    IL_001c: ldloc.3

    IL_001d: call string [mscorlib]System.String::Concat(string,

    string,

    string,

    string)


    Now when the concatenation changes to

    string result = s1+s2+s3+s4+s1+s2;

    The IL code results in a call to the overload method of concat.

    call string [mscorlib]System.String::Concat(string[])

    This is a fastest way of concatenating strings. And thisworks perfectly fine for small number of strings. Then when do we go for stringBuilder.?

    You should go for Stringbuilder when you are not sure of how many concatenations are going to happen. i.e., when the string concatenation is going to happen in a loop.

    String Concatenation:-

    String.Concat(string,string)

    1. The inputs are string_A, string_B;

    2. Total length of the result string = Length(string_A)+ length(String_b);

    3. Call Fast allocate string. What it does is take in the length and allocates memory in the heap and returns a string which is there in that memory.

    4. Then it calls the FillStringChecked function. It takes 3 parameters.

    1. The end result string

    2. Destination position

    3. Source string

    5. First string A is put in to the result. Then String b is copied into this result from the position length(StringA)

    6. This happens in the following way

    String.Cs

    fixed(char *pDest = &dest.m_firstChar)

    fixed (char *pSrc = &src.m_firstChar) {

    wstrcpy(pDest + destPos, pSrc, length);

    }

    pDest contains the address of the first character of the string ‘dest’.

    pSrc contains the address of the first character of the string ‘src’.

    1. Here fixed key word is used so that , garbage collector does not move the string object when it is half way through the concat operation. This is called pinning and this can be used when the method is marked unsafe.

    String Builder:-

    String builder class represents a mutable string. It is convenient for situations in which it is desirable to modify a string, perhaps by removing, replacing or inserting characters without creating a new string subsequent to each modification.

    What happens when you call the constructor of String Builder:-

    stringBuilder strbConcatenation = new stringBuilder(string);

    It allocates a memory space of 16 characters by default. However you can initialize the capacity of the string. The max capacity that can be allocated is 2147483647. ( this is nothing but Int32.MaxValue)

    Now if the passed on string length is greater than the capacity then the capacity =capacity * 2. This ensures that there is a predicted growth rate. Then the Memory of that capacity is allocated. Then the input string is copied into the start of the new allocated memory and returns the reference to the memory space.

    Now what happens when you call StringBuilder.Append(value) :-

    Stringbuilder maintains the reference to the allocated memory space. Now it will find out if the value can be appended in place in the same memory space. If it can be allocated in the same memory space, then the wstrcpy happens.

    What if the string builder does not have enough space to accommodate the newly concatenated string?.

    In that case, it has to allocate a new memory space, copy the old string and also the new string. All this happens in the fixed regions of memory or pinned memory. This is the reason, that providing an optimal capacity when instantiating the string builder, reduces the number of new allocations. This will dramatically improve the performance as the number of garbage collections will be less.

    This is more explicit from the SSCLI code

    if (NeedsAllocation(currentString,requiredLength)) {

    // here it allocates more memory and gets a new string.

    String newString = GetNewString(currentString,requiredLength);

    newString.AppendInPlace(value,currentLength);

    ReplaceString(tid,newString);

    } else {

    // the append is carried out in place.

    currentString.AppendInPlace(value,currentLength);

    ReplaceString(tid,currentString);

    }

    Conclusion:-

    1. String builder gives an edge in the performance by the way that it is not going to make more Allocations often and deallocations.

    2. String concat is good for small string because the way it concats is pretty much faster when compared to string builder except for the memory allocation overhead and the time required for that memory allocation.


    S. Sundararajan

    Devauthority | InfyBlogs


    Part Time MBA vs Full Time MBA

    Finally i manage time to blog about comparison between MBA programmes
     
    A Part time MBA[PTMBA] programme generally is between 14-18 months while a full time resedential MBA[FTMBA] program is for 23
    months.
    In 23 months,you have 3 months Industrial Training that makes it come down to 20 months.
     
    So Actually we are comparing ~16 months PTMBA vs ~20 months FTMBA [Assuming no vacations in FTMBA,obviously in PTMBA its zero]
    [CLASSES]     
    If we see one week of 20 months of full time MBA program it will drill down to-->
    2 days theory classes for 3 hrs on an average.
    5 days for either preperaing and presenting case studies
    assuming FTMBA works for 7 days a week

    Now in my PTMBA in a week have-->
    2 days theory classes for 3hrs[might not apply for all PTMBA].
    Every week one case study is assigned.[Now here count may vary for FTMBA,they may have 1 or more than 1 case study per week]
     
    [PROJECT]
    Also One Project has to be submitted on monthly basis,same for FTMBA too.
     
    [INTERACTION WITH FACULTY]
    Also since mine PTMBA is a sattelite based program,we have an oppurtunity to interact with the Faculty either through chat
    messages,mailers,live interactions on Microphone.Here each and every student can put his veiws and Faculty can comment on any
    or no messages but the student has always a chance to put his points before faculty.Even Faculty can ask any questions to any
    student.Compare this to a FTMBA programme,where Faculty takes only specific queries from specific group of students and ask
    questions to specific students.Other Students are just mute spectators.
     
    [ATTENDANCE]
    You can't make a Proxy for other students in PTMBA since attendance is taken online while its a usual behaviour in a FTMBA.
     
    [INDUSTRIAL EXPEREINCE]
    Most of the PTMBA students are either working or have a prior work exp,thats the pre-requisite for the MBA school providing
    PTMBA.So he is already having the tough industry experince,no need of any 3 month vacations in the name of Industial Training
     as FTMBA people gives.We very well know only 20% of student actually learn something out of Industrial training, others have
    a galla time.Compared this to PTMBA student,he is daily facing hardships and new challenges in his current work and at same
    time managing time for his MBA dream to come true.
     
    [PRESENTATIONS]
    FTMBA student do lot of presentations before Faculty in their programme,numbers can cross 100...who knows,prepearing
    themselves for the Corporate world.They work on real time case studies and their solutions which no one will ever
    implement.Compare them to a PTMBA student who gives at least 1 presentaion per week in any form before their
    clients,boss,team etc presenting real time diffculties and solutions which shall or shall not be actually implemented in
    their company.These people are only the one who give smart solutions by their presentaions in their company which
    diffrentiates their company from others.
     
    [EXAMS]
    Online Exams are conducted every semester in PTMBA programmes.In FTMBA its not online.And grading system is also same
    too.Diffrence lies in the no of hours an PTMBA student get and FTMBA get.You can vey well imagine for PTMBA student how
    diffcult is to manage hours for exam preparation out of his working hours and sleeping hours
     
    [COST]
    No here comes the cost factor.If we see a normal FTMBA programme costs 4 to 5 lakhs p.a. but the PTMBA programme cost nearlly
    half of the FTMBA programme costs or even less.
     
    But at same time i feel these arguments will be void if you are doing an FTMBA from top B-schools like IIMs,ISB,XLRI.
    BTW I am doing my PTMBA from XLRI.

    Now after reading this blog you tell me which is a better programme a PTMBA or a FTMBA? After completing the programme who
    get the actual experince and learning? Please add your comments in the blog if you feel like.
    July 03

    Visual Studio Multi-Targeting

     

    One of the most visible deficiencies in Visual Studio is that each version is tied to a specific version of the CLR. For example, it is impossible to create anything but .NET 2.0 applications using Visual Studio 2005. Visual Studio 2008 partially addresses this issue with what Microsoft calls multi-targeting.

    In .NET 1.0 through 3.5, only one version of the CLR can be loaded in a process. Since Visual Studio is partially built using the .NET framework, it can only load the version it was shipped with. This in turn makes it nearly impossible to work with applications that need to target other versions.

    Visual Studio 2008 does not actually fix the issue. Instead, it is able to side step it because .NET 3.0 and 3.5 are really just libraries on top of the 2.0 runtime.

    Since this is not a complete fix, you still have to use VS 2002/2003 to build .NET 1.0 and 1.1 applications respectively. On the plus side, at least the project file is not changing and VS 2005 users can work alongside VS 2008 users.

    Talking about Creating sites with default templates using STSADM.EXE

     Quote

    Creating sites with default templates using STSADM.EXE
    Another quickie that I thought I would pass along. Thanks to Shane Young for telling me that it would be something I should consider blogging.
     
    Here is the problem. When you are creating a site with STSADM.EXE using the -createsite option you only need 3 parameters, ownerlogin, owneremail, and url. No problem right? Well what if you want to use one of the other parameters ownername, lcid, sitetemplate, title, description, or quota? As long as you know the options these should be no problem either, but what if you don't? That is where I suddenly drew a blank. I wanted to create a site using a command like this:
     
    stsadm.exe –o createsite –url http:///sites/helpdesk -ownerlogin -owneremail someone@example.com
     
    The only catch is that I wanted to make sure I create a team site. No problem, that is exactly what the -sitetemplate parameter is for, so my new command line becomes:
     
    stsadm.exe –o createsite –url http:///sites/helpdesk -ownerlogin -owneremail someone@example.com -sitetemplate teamsite?? No that's not it. Teamsite.stp? Nope.
     
    So where can you find the name of the default site templates? Maybe if I you use the stsadm -o enumtemplates command? Good try, but it only shows templates that have been added to the global site template catalog. The answer is... you just have to know. I'm sure there is somewhere you can look using SharePoint Designer, or looking in the database tables, etc. to find the name of a particular template, but there is no command or file that will give you a simple list in SharePoint. So I am just going to give you all of the ones I know.(another round of thanks to Mads Nissen of http://weblogs.asp.net/mnissen )
     
    Team Site, STS#0
    Blank Site, STS#1
    Document Workspace, STS#2
    Basic Meeting Workspace, MPS#0
    Blank Meeting Workspace, MPS#1
    Decision Meeting Workspace, MPS#2
    Social Meeting Workspace, MPS#3
    Multipage Meeting Workspace, MPS#4
    Business Activity Services Team Site, BAS#0
    SharePoint Portal Server Site, SPS#0
    SharePoint Portal Server Personal Space, SPSPERS#0
    SharePoint Portal Server My Site, SPSMSITE#0
    Contents area Template, SPSTOC#0
    Topic area template, SPSTOPIC#0
    News area template, SPSNEWS#0
    News Home area template, SPSNHOME#0
    Site Directory area template, SPSSITES#0
    SharePoint Portal Server BucketWeb Template, SPSBWEB#0
    Community area template, SPSCOMMU#0
     
    So my command line would look like this:
     
    stsadm.exe –o createsite –url http:///sites/helpdesk -ownerlogin -owneremail someone@example.com -sitetemplate STS#0
     
    Obviously this isn't a complete list, but it is a start, and it answered my question, hopefully it answered yours. Oh, by the way  if you've read through this whole thing in hopes that I may give a list of all of the LCID values, you're in luck I do have a magic URL for that, http://www.microsoft.com/globaldev/reference/lcid-all.mspx .
     
    The email is Stephen[the long tailed A we call “at”]sharepoint911.com, the job is waiting for you to need me.
     
    Stephen - SharePoint Help
     
     
     

    Introducing sod, a new search engine I created

     
    Hey,
     
    I am writing to tell you about sod by Shashwat Chandra, a new search engine I created that's powered by Live Search!
    To try it click on http://search.live.com:80/macros/shashonlinesearch/sod/, or copy and paste the link into your browser.
    You can also find more search engines created by other users at the Live Gallery, at http://gallery.live.com/macros/.
     
    Again its in line with the "Microsoft Way"
     
    Cheers!!
     
    Shash
     
    [sod:Shash Oreinted Devlopment]