Maryann's profileItems in a sandboxPhotosBlogLists Tools Help

Blog


    October 09

    Getting started with SharePoint Object Model

    If you are working on the SharePoint Object model, look through this msdn link which explains the architecture of the object model.
     
     
    For those who are familiar with the sharepoint blocks, the images below give an overview of the architecture.
     
              Windows SharePoint Services server architecture

     

     In the above diagram, in point 8, each SPSite site collection has an architecture as shown below:

    Using Workflow Info in Custom Activity

    Hey folks,
     
    Found this really good link that shows how to get useful information such as the workflow which is executing now, the list on which the workflow is attached, its history list, the item on which this workflow was triggered, etc.
     
    The table below was taken from Phil Allen's article.
     

    Property Name

    Value it is set to

    .Net type

    __ActivationProperties

    __initProps, the SPWorkflowActivationProperties that was passed in via OnWorkflowActivated

    Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties

    __ListId

    __list, the name of the SPList the workflow is executing on.  This is typically a string datatype which contains the text of a System.Guid.

    System.String

    __ListItem

    __item, the integer value of the list item in the list that the workflow is running on.

    System.Int32

    __Context

    __context, the object that contains many helper methods and objects for use as part of workflow actions

    Microsoft.SharePoint.WorkflowActions.WorkflowContext

     
    You can get the workflow details from the SPWorkflowActivationProperties object.
     
    SPWorkflow currentWorkflow = __ActivationProperties.Workflow;
     
     
     
    October 01

    En Garde!

    Found these links on script exploits that can be made in webpages.
     
     
     
    Quoting from the 1st link:
     
    "The primary defense against scripting exploits is to never trust information coming from a user. Assume that any data posted to your application from a browser can contain malicious script.

    Similarly, any time that you write a string into a page, you should assume that the string could contain malicious script (unless you programmatically created the string yourself)."

    Basic Security Practices For Web Applications

    http://msdn2.microsoft.com/en-us/library/zdh19h94(VS.80).aspx

    August 13

    Me Simpsonized!

    Have you ever wondered what I would look like as a character on The Simpsons?  Never? Not even once?
    D'oh!  Well, anyway, I would look like this:
     
    You can get yourself sympsonized at http://simpsonizeme.com/
     
    April 30

    Debugging custom workflows in Sharepoint 2007

    To debug a workflow in Visual Studio .Net 2007, you have to attach the debugger to the w3wp.exe process. However, when there has been workflow activity in this process before attaching the debugger to it, the Visual Studio IDE crashes and closes.
     
    One way to get this working without Visual Studio IDE crashing is:
    1. Reset IIS
    2. Navigate to a SharePoint site (refresh the page so that w3wp process is initiated again)
    3. Attach the debugger
    4. Start the workflow.
     
    April 13

    Spin your screen in Windows XP

    Did you know? Some graphic card adapters let you spin your screen in Windows XP. PCs with NVIDIA graphic adapters have hotkeys assigned to rotate your screen.
    Ctrl + Alt + Left Arrow Key    --> Rotate 90 degrees
    Ctrl + Alt + Down Arrow Key --> Rotate 180 degrees
    Ctrl + Alt + Right Arrow Key  --> Rotate 270 degrees
    Ctrl + Alt + Up Arrow Key     --> Brings the screen back to normal
     
    You can enable/disable/add/remove the hotkeys from your computer's 'Display Properties'.
    1. Right click your desktop and select 'Properties'. The 'Display Properties' window opens up.
    2. Navigate to the settings tab.
    3. Click the 'Advanced' button. A window with your graphics and monitor settings comes up.
    4. Navigate to your media acceleration driver tab.
    5. Click 'Graphic Properties'.
    6. Navigate to 'Hot Keys' tab.
     
    Some graphic card softwares provide an icon in your System Tray for easy navigation.
     
    Not many folks know about this functionality. I myself got to know by chance while trying out Winamp hotkeys.
    Its a nice prank to play on unsuspecting folks... Rotate their screens and watch their expressions...
     
    Enjoy!
    April 03

    Using an Infopath 2007 form in Document Information Panel of Word 2007

    I wanted to add some extra metadata to my Word document and found that Office 2007 supports such an addition. All you need to do is create an Infopath form with the controls that you require and add the form to the Document Information Panel of Word.
    Usually the methods on the internet tell you how to use forms published in a shared folder or a sharepoint library. I couldn't find any sites that told me how to use my form without requiring a server or the intranet to host my form. I knew it was possible but did not find much on it. I finally got it working and thought of penning it down. So here it is...
    You can use the form by registering the form on the target machine.
    The following steps should be taken:

    InfoPath 2007
    1. Create an InfoPath form as per requirements.
    2. Save the InfoPath form.
    3. Click File -> Publish.
    4. A wizard opens up with 4 radio buttons. Select 'As an installable form template'.
    5. Follow the instructions by the wizard. At the end of the wizard, an .msi installer will be created for your form.
    6. Go to File -> Properties and copy the 'ID' field. (The form ID is a unique name used to identify the forms created with this form template)
    7. Run the installer and install the form on your local disk.
    Note: Full trust or digital certificates are not required unless you want to access or manipulate some resources on the disk.

    Word 2007
    1. Open a new Word 2007 document.
    2. Open the 'Developer' tab in the ribbon and click on 'Document Panel'.
    3. A dialog opens up. Paste the ID that you got in the 5th step on the InfoPath form in the textbox under 'Specify a custom template (URL, UNC, or URN)'.
    4. Click OK.
    5. Your InfoPath form will appear in the Document Information Panel.


    Some links I found on this topic: http://office.microsoft.com/en-us/infopath/HA102019671033.aspx
    http://office.microsoft.com/en-us/infopath/HA101488191033.aspx#4
    http://msdn2.microsoft.com/en-us/library/bb251025.aspx
    February 20

    Adding Javascript Events to MenuItem in ASP.NET 2.0

    In one of my projects, I needed to create a menu with some special visual effects.
     
    I created a Menu menu control and bound it to a sitemap containing a list of the menu items I wanted to display. I created the visual effects using Javascript. Next I needed to add some code to the onmouseover event of each menu item so that they would use the visual effects I  had created. I looked in all the places I thought it would be but could not find any ways to do so.
    I couldn't add it to the sitemap nor could I add it to the menu item on the MenuItemDataBound event of the Menu control.
     
    After some googling, I found a fix to the issue. I created a StaticItemTemplate for the Menu control and added a label with the onmouseover event in it.
     
    Something like this:
    <
    asp:Menu ID="menuNavigation" runat="server" DataSourceID="SiteMapDataSource1" Width="100%">
       <StaticItemTemplate>
           <div onmouseover="ShowPreview('<%# Eval( "Text" ) %>')" onmouseout="ShowDefaultPreview()">
              <%
    # Eval( "Text" ) %>
           </div>
        </StaticItemTemplate>
    </asp:Menu>
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
     
    Voila! Problem solved!
     
    I got the idea from the following site: http://forums.asp.net/thread/1283910.aspx 
     
    Another fix that I found:
     
    The ASP.NET Quickstart Tutorials are a great place for examples on using ASP.NET 2.0. Check it out if you are interested.
    February 16

    Scripting for Full Text Search

    A nice link I found for scripting the Full Text Search of Sql Server 2005.
     
    January 19

    Job blues

    I want to break free
    I want to break free
    I want to break free from your lies
    Youre so self satisfied I dont need you
    Ive got to break free
    God knows God knows I want to break free
    January 12

    Life

    Life is like a 100 foot bungee jump with a 120 foot cord.
     
     
    January 04

    Ajax - (Asynchronous JavaScript and XML)

    Ajax (Asynchronous Javascript and XML) is a wonderful new technology that lets a developer create interactive web pages. Remember how irritating it was when a webpage kept reloading each time you select an option from a dropdown! Well this problem can be solved using AJAX. AJAX lets you refresh only the section of the page that needs to be changed, leaving the rest of the page undisturbed. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user requests a change.

    December 27

    Tis the season to be jolly... Christmas time

    It's the most wonderful time of the year
    With the kids jingle belling
    And everyone telling you "Be of good cheer"
    It's the most wonderful time of the year
    It's the hap-happiest season of all
    With those holiday greetings and gay happy meetings
    When friends come to call
    It's the hap- happiest season of all.....

    Christmas time always makes me sing..... Its the spirit that accompanies this season....
    Putting up the star, decorating the house, making sweets, going for midnight mass, singing carols.... its so much fun!!
    Makes me wanna sing...
     
    Have yourself a merry little Christmas,
    Let your heart be light
    From now on,
    our troubles will be out of sight....
     
    So
     
    Deck the halls with boughs of holly
    Fa la la, la la la
    Tis the season to be jolly
    Fa la la, la la la....

    October 26

    Just a thought in an idle mind! (Holidays)

    Well... As the title of this blog entry says, what you are going to read now is just a thought in an idle mind... It was Diwali time... I had got 2 days off from work... Monday and Tuesday... So that makes a nice 4-day long weekend... It was during one of the "lazing around sessions" on this weekend that it struck me that I needed to apply for leave for Christmas in advance... That led to a chain of thoughts... "Why isn't Xmas day a holiday at work? What about Good Friday and Easter time? I have to take leave during that time too... And how come we never have a holiday for Eid? (It was Eid on Wednesday) Come to think of it, we never have a holiday for minority festivals... And now, I have so many holidays for Diwali when I could do without them... Not that i don't like holidays... I love them... it would be great if we had holidays like that at Christmas and Easter time too!!! Then I could save my leaves for a vacation... But unfortunately its not in my hands..." So I shrugged and went to see if my mom had made anything interesting to eat!
    October 16

    Moosik in my life (cont.)

    All you music lovers... check out this site... http://www.radioblogclub.com
    Streams songs really fast... Quality is quite good too...
    October 05

    I'm alive!

    Guess who's back
    Back again
    Well i'm back
    With nothing to say!
     
    September 08

    Trips and Treks: Esselworld rocks!

    Ehaaa essel world... :)
     
    August 30

    Moosik in my Life!

    Music!!! What would I do without music! I just can't imagine! I spend almost 10 hours a day listening to music and the rest of the time listening to the music in my head. Its such a big influence that every situation I am in brings the lyrics of some song to my head. There's a song to reflect your every mood. You get songs that make you wanna dance, some that make you happy, some that express hope, some that express love, some that express sadness, some that cheer you up when your down. This list could go on and on. You get them in all genres - pop, rock, blues, jazz, country.
    These days I'm hung up on 3 doors down, maroon 5 and flipsyde. Some days I like listening to Linkin Park and Limp Bizkit. Some days just feel like listening to oldies. Lobo, Harry Belafonte, Billy Joel.
    Its amazing how sound can be so appealing to the senses!
    Moral of the story - I love music!
    August 29

    Trips n Treks

    I love outings. They are so much fun. Give you a real break. I was bitten by the vacation bug when I was a baby . The family trips to Goa (every summer) and to a hillstation (every Diwali holidays to either Lonavla or Panchgani) were awesome. Until I joined engineering college. Then the time the rest of the family and me got vacations began to differ. And I stopped going with them. But somehow I landed up with these awesome friends who loved trips as much as I did. So we made it a point to go for one every year. We went to Alibag, Murud and Palghar (twice. It was convenient to go to Palghar since one of my friends had a bungalow there) while I was still in college. All 3 places were awesome. They had one thing in common. One thing I enjoy - beaches . And now that I've started working, I have my office crowd to go for trips too. Had gone with my team (Team Microsoft ) to Girivan Resorts (there's a photo in my album for now, will upload some more later) and Dapoli (close to Ratnagiri). Had a great time. Then there's this group that I hang out with during my lunch and snack breaks in office. We were in training together. Went trekking to Sinhgad and Lohagad. And went to see waterfalls at Satara and Mulshi. Saw hundreds of windmills when we went to Satara. Awesome sight. Also went to Thosegar falls. Had a breathtaking view. Went go-karting at Manas Resorts (Pune) after seeing the waterfalls at Mulshi. Good fun. I haven't lost touch with my college group too. My buddies. We went to Matheran recently. Again had a rocking time visiting all the points. Anyway, the moral of the story is vacations rock! Ciao!