Monday, April 30, 2007

EventHandling and Delegates

I found a few good links on eventhandling and delegates:

http://www.developerfusion.co.uk/show/2137/3/

WebSnapr - Website Thumbnails For Your Site

WebSnapr - Website Thumbnails For Your Site

Useful tool for taking snapshots of a website. Check it out.

Saturday, April 28, 2007

Understanding ASP.NET View State

Understanding ASP.NET View State

I did not have a good understanding about ViewState until, I read the above article. It was other thing that I did not get a chance to use ViewState.
I always thought that viewstate restores the textbox, checkbox and other server controls(which implement IPostBackHandlerInterface) values across postback.
But actually, the LoadPostData event restores the values of the controls across PostBacks. ViewState is used to persist changed information across postbacks.
For ex:
A page contains three controls :
label - text= "Message",
button -text/id="ChangeMessage"
button -text/id="NoChange".

The ChangeMessage button changes the value of the label in its click event to "NewMessage".
The NoChange button does not do anything.

With ViewState Enabled, if you click the ChangeMessage button and then NoChange button, the label will be displaying NewMessage.
But with ViewState disabled, you will see that the label will be just Message instead of NewMessage.

The ASP.NET HTTP Runtime

The ASP.NET HTTP Runtime

An excellent article if you want to know the internals of ASP.NET and IIS. This article answers the following questions:

How are requests passed from IIS to the worker process?
What happens after the worker process takes over the request?
What happens on the file system when a request is made?

This is one of the few articles which gives a complete life cycle of a request. Hats off to Dino Esposito for writing a great article.

Thursday, April 26, 2007

Wednesday, April 25, 2007

AppPool recycle

Instead of restarting the IIS using IISReset, which would recycle all the AppPools on the server, you can just recycle the required AppPool using the following command:

%windir%\system32\cscript.exe c:\windows\system32\iisapp.vbs /a "[App Pool Name]" /r

You can create a shortcut for the above and add it to your toolbar

Sunday, April 22, 2007

Implementing technologies...

The past few days have been a roller coaster ride for me. I have been learning quite a few new things in the recent past. My organization has been going through a complete makeover and thanks to the IT director, we are given the latest tools and technologies to play around with. My organization has been the foremost in implementing VISTA across the whole company and we have implemented the first phase MOSS 2007.
Every day for the past few months have been great for me. There has not been a single day when I did not learn something new. Thanks to my fellow developers, it has been a great learning experience for me. I started out learning Analysis Services, Integration and reporting services. Now I have been working on SharePoint development.
Every time I jump into a new technology with a determination to learn its internals, I end up just learning the required stuff and moving ahead. Sometimes it feels as if I am able to retain anything I have learnt. But I guess, this is how it works and should work.

Tuesday, April 17, 2007

Page Processing Model

Page Processing Model
I was looking for this particular page processing model for the last few days. Finally got sometime to find one:
The following list gives a step-by-step breakdown of how ASP.NET 2.0 and Windows SharePoint Services 3.0 interact to render pages in a SharePoint site:


  • The browser requests a Web page from Microsoft Internet Information Services (IIS).
  • IIS passes the request to ASP.NET 2.0.
  • An HttpApplication pipeline is created for the request.
  • ASP.NET 2.0 fetches the page via the Windows SharePoint Services 3.03 file provider.
  • ASP.NET passes the URL to the file provider, and the file provider fetches the page and returns the page stream. The Windows SharePoint Services file provider implements caching and reduces round-trips to the database.
  • ASP.NET loads a Page class, parses the page stream, and finds a reference to the page layout upon which the page is based.
  • The ASP.NET engine compiles the page stream and stores it in memory.
  • ASP.NET queries the Windows SharePoint Services file provider for the page layout.
  • ASP.NET loads the stream for the page layout associated with the current page.
  • ASP.NET compiles the page layout and stores it in memory. ASP.NET can free this memory later if the system needs memory.
  • ASP.NET determines the master page for the site and fetches the master page via the Windows SharePoint Services file provider.
  • ASP.NET compiles the master page and writes to the disk so you never have to recompile the master page unless you modify it.
  • The page layout runs each control on the page in the context of the page that was requested.
  • ASP.NET updates the necessary caches.
  • IIS returns the page to the browser.

  • The next time the page is requested by the same user or by a different user who has the same permissions to see the page as the first user, page processing is much more efficient:

  • The browser requests a Web page from IIS.
  • IIS passes the request to ASP.NET 2.0.
  • An HTTPApplication pipeline is created for the request and hits the HandleRequest.
  • ASP.NET uses all the internal caches.
  • ASP.NET renders the HTML for the controls.
  • IIS returns the page to the browser.

    Reference: MSDN article
  • How to identify your SQL Server version and edition

    How to identify your SQL Server version and edition

    I was trying to integrate reporting services with Sharepoint 2007 and the following error showed up while configuring reporting services:
    Unable to connect to the Report Server WMI provider

    Since Sql Server 2005 with SP2 is a requirement for the integration, I wanted to find out the version of sql server i was running. The following query helped to do the above:

    SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

    Monday, April 16, 2007

    Jerry's Blogs: October, 2006

    Jerry's Blogs: October, 2006:
    "SharePoint Version 2007 Page Life Cycle
    User request the SharePoint Page using http
    ASP.NET calls the WSS File provider
    WSS file provider returns the page from File or Database
    Page is parsed by SafeMode parsor if required
    Returned page is complied by ASP.NE T Compiler
    WSS File provider collects the page layout class and complies it
    ASP.NET engine adds SharePoint Context Data to the site meta data and retreives the associated master page.
    Master page got compiled and responded back to the user."

    SharePoint Inspector

    SharePoint Inspector

    Just found this tool. Thought about blogging it....

    Tuesday, April 10, 2007

    How to determine the Password for IUSR account

    Click on the Image to get a better view
    Below are the commands for accessing the password's for the respective accounts


    Monday, April 9, 2007

    Sharepoint Error - Duplicate Site Id

    Few days back, I restored the content database from the production server to the development machine and lot of errors started throwing up like :


    Running the following command fixed the problem:
    stsadm -o sync -DeleteOldDatabases 0

    Source PageURL : http://www.sharepointblogs.com/dwise/

    Working for The Man | Tux Deluxe

    Working for The Man Tux Deluxe

    An excellent link, I just found on Slashdot. A must see for budding programmers .

    Sunday, April 8, 2007

    Windows Shortcuts

    Here are a few cmd prompt shortcuts ,I learned past few days

    • iisreset - to reset whole iis
    • inetsrv
    • inetmgr - iis manager
    • eventvwr - event viewer(my debugging usually starts here .... :))
    • perfmon - performance manager