MVP SharePoint Chat, Office 365, SharePoint 2010, SharePoint MVP, SharePoint Online, SharePoint Products and Technologies

MVP SharePoint Chat – Wednesday May 25th at 9am PDT

When: 9 AM PDT, 25th May 2011 (PDT? Convert to your time zone here)

Where: Online | Enter Chat Room

Do you have tough technical questions regarding SharePoint for which you’re seeking answers? Do you want to tap into the deep knowledge of the talented Microsoft Most Valuable Professionals? The SharePoint MVPs are the same people you see in the technical community as authors, speakers, user group leaders and answerers in the MSDN and TechNet forums. By popular demand, we have brought these experts together as a collective group to answer your questions live. So please join us and bring on the questions! This chat will cover WSS 3.0, MOSS, SharePoint Foundation 2010 and the SharePoint Server 2010. Topics include setup and administration, design, development and general question.

Microsoft Cloud, Office 365, Office 365 Grid, SharePoint 2010 Products & Technologies, SharePoint Online

How to fix SharePoint Online (403) Forbidden Error while downloading files using Client Object Model

Recently I was working on a project that requires to programmatically access and download files from SharePoint Online (part of Office 365) document library. Currently remote authentication (SP Managed Client OM / SP Web Services) is bit challenging to deal with as discussed here but a decent workaround (for now?) is available on MSDN. The first thing you will notice is that authentication is more powerful and more complex because SharePoint Online (so as SharePoint Foundation 2010 | SharePoint Server 2010) embrace Claims Based Authentication. The MSDN sample code seems to work fine so I went ahead and use it as a starting point.

**I used Word 2010 to create and publish this post and somehow images quality gets deteriorated during publishing process. If you want to read this post with high quality images its available as pdf here

Issue: 

Everything went smooth (authentication + accessing list items) till I actually try to download a file from a document library. I was using File.OpenBinraryDirect method (see code snippet below) and got The remote server returned an error: (403) Forbidden exception.

As I investigate this issue by looking into the exception details I found out that basically it’s complaining about the fact that before opening files in this location I must select the option to login automatically.

This gives me the clue that there is something missing at a basic level. I went ahead and open up a browser and browse to the SharePoint online site from which I am trying to download the file. I use a tool to monitor the request from the browser and eureka I see User-Agent header with a valid value (as expected) which was never set in the code.

The code from the MSDN does not set the UserAgent property of the WebRequest so it remains null. Normally when you are using browser it’s automatically set up for you but in this case you have to do it yourself though code. So you fix this part and you are good to go.

 
 

Fix:  

Locate the method GetAuthenticatedContext (inside class ClaimsClientContext within ClaimsAuth project). And add following line of code before you initialize cookie container. You are setting up UserAgent property for the WebRequest to a valid user agent. I have used following value for user agent but you can try different but valid value and it may work too (but I didn’t tried it yet).

e.WebRequestExecutor.WebRequest.UserAgent = “Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)”;

 
 

 
 

That’s it! You should now able to download the files without any issues.

**On a side note although above solutions works I have a feeling that there is more to it because X-MSDAVEST_Error: 917656 is an Authentication level error and related to WebDav protocol more info here. I may investigate it further when time permits and share my finding in this blog post.

Exchange Online, Microsoft Cloud, Office 365, Office 365 Grid, SharePoint Online, SharePoint User Group

Office 365 Session @ Microsoft NYC

As Office 365 goes into public beta, it’s time to dig deeper into the features of Office 365. I am conducing a session on Office 365 with demo of its services @ Microsoft NYC on 27th April 2010 from 6:00 PM – 8:00 PM. Registration is free (if you don’t like to register via website and still want to attend, arrive bit early so you can be registered onsite). I am planning to cover following topics

  • Office 365 Overview
  • Office 365 Walkthrough (Demo)
    • SharePoint Online
    • Exchange Online
    • Lync Online
    • Office Web Applications
  • Case Study & QA

As a good gesture of good will every attendee will receive a free copy of Enhanced Productivity with SharePoint Online & Exchange Online, a case study I wrote which explains how organizations can leverage Office 365 to enhance their productivity.

 

Exchange Online, Microsoft Cloud, Office 365, SharePoint Online

Office 365 is now in Public Beta!

Office 365 finally goes into public beta today! Many congrats to Office 365 team J

Visit www.office365.com and apply now to secure your spot in beta program. I was working with Office 365 since last November, just after it was launched as a private beta and it’s been an awesome experience. Things like support service quality and overall stability of services were among the key highlights of private beta and I am quite positive it will remain the same way throughout the life cycle of Office 365.

I have done my own share of work on Office 365. I was involved in a POC of Office 365 and just finished a week back and now planning to help other organizations to adopt Office 365. As a matter of fact I recently wrote an article for MSDN MVP blog focusing on how organization can utilize SharePoint Online and Exchange Online to gain better productivity, article is suppose to be publish soon. I will share the link as soon as it goes live.

If you just started on Office 365 and looking for helpful content read my earlier blog post here.

Microsoft Cloud, Office 365, Office 365 Grid, SharePoint 2010 Products & Technologies, SharePoint Online

Exploring Asset Library in SharePoint 2010 (Online & On-Premise)

SharePoint 2010 (both Online & On-Premise) is equipped with new type of Library called Asset Library. Asset library provides place to store your and manage your digital assets and provide enrich interface to view them, another powerful feature is to perform navigation and filtering based on meta data This post demonstrates how to create an asset library, inspect ways how it represents digital items visually, and then how to enable navigation and filtering based on meta data. In order to perform following steps, you must have access to SharePoint 2010 along with at least single SharePoint site collection available to you. One of the easiest ways to start working on SharePoint 2010 is to download Information Worker Demonstration and Evaluation Virtual Machine (RTM) (beware of download size which is couple of GB’s)

  1. Navigate to SharePoint site and click Site Actions à View All Site Content. On the All Site Content Page click Create

  2. Select Asset Library, from the Installed Template and name it My Assets. Click Create.

    This is shown in figure below. Note that, if you don’t have Silverlight 3.0 installed on your machine you will see a different page to create various Lists and Libraries, from there you can select Asset Library.

     

     

  3. Click Add new item link and select, on the Upload Document dialog click Upload Multiple Files link as show in figure below and upload three images. You can simply drag and drop files. It’s preferred that you choose images with small sizes for example less than 1 MB.

     

  4. Once the upload process is complete you should see similar view as shown in following figure. Off course your images will be different. Now hover your mouse over an image and you will see that image in a larger dialog box, with more details, this is shown in figure below.

  5. If you want to see the image in a full window, just click View Item link, the image will be open in full view but use the same browser window. To void this and open the image in new tab press CTRL key and then click View Item link, this will make IE 7 or above open the item in separate tab. This is shown in figure below.

     

  6. Using the same steps as mentioned in step 3 add at least single video and audio file to My Assets Library. The Asset Library supports WMV, WMA and MP3 format for video and audio. If you try to upload other formats you will receive warning as shown in figure below and file(s) will not be uploaded.

     

     

  7. Notice that for audio and video thumbnails shows different icons , as shown in figure below.

  8. Hover you mouse on a video or an audio file and you will see the dialog similar to one that appears for image. Following figure shows the dialog for a video file. Notice you have link with title Play.

     

  9. Click on the Play link, you will see a video player as shown in figure below. The video will start playing automatically. This video player uses Silverlight and it must be installed locally on your machine.

     

     

    Modifying The Default View

     

  10. If you notice, the information dialog you get when you hover on any file in step 4 and 7 the dialog lacks two key attributes, file type and file size. This is especially important as media files are usually available is various formats and you may want to know the size and type of the file before downloading it.

     

  11. To modify the view, click on the Library Tab and select Modify View from Manage View groups. This is shown in figure below.

     

     

     

  12. On the Edit View Page, select the Display checkbox for File Size and File Type (File extension) columns as shown below. Click OK to save your changes.

     

  13. From the Asset Library, hover on any file and you will see File Size and File Type information inside the dialog, following figure shows this for a video and image file.

Meta Data Driven navigation

Let’s take look into another interesting feature of doing navigation on your digital assets based on Meta data. Imagine your Asset Library with several hundred items or even more, finding anything even when you put them into folders will be daunting tasks. With SharePoint 2010 Meta data driven navigation, the filtering will be done based on Meta data tags, but as Meta data can be hierarchical the navigation is natural and provide users most intuitive way seek the items. However this should never be considered as a replacement of doing categorization by using folders. Also note that meta data driven navigation can be applied to other type of libraries and lists too, event to custom lists!

 

  1. Let’s enable the meta data driven navigation on My Assets library that you created earlier. From the Library Tab, select Library Settings located in Settings group , as shown in figure below

     

     

  2. On Document Library Settings page, select Meta data navigation settings link located under the General Settings section as shown in figure below.    

     

  3. From Configure
    Navigation Hierarchies section, select Content Type from Available Hierarchy Fields list box as shown in figure below.

     

     

  4. Click Add > button, this will move the Content Type field to Select Hierarchy Fields list box, as shown in figure below.

     

     

  5. On the Configure Key Filters section, select Content Type and Date Picture Taken fields from the Available Key Filter Fields as shown in figure below (If you want you can choose other fields but for this tip these two will be sufficient)

  6. Click the Add> button, both of these fields will be moved to Selected key Filter Fields, as shown in figure below. Finally click OK to save your changes.

     

     

  7. Browse to the My Asset library, notice a hierarchical menu on the quick launch as shown in figure below, this enables you to perform navigation on items based on fields in the content type.

     

  8. Expand the Content Type node by clicking on the small arrow as sown below.

  9. Now click on any of the value, for example Image. Notice when you make this selection, the view on the right is filtered based on this value, following two figures shows the view when selection is done for the values of Image and Video respectively.

  10. Finally lets quickly take a look at Key filtering option present just underneath the navigation we seen earlier, this is shown in figure below.

  11. From the Content Type drop down select Image and from Date Picture
    Taken calendar select date when one of the images were originally take (note that your uploaded date and picture taken date will differ). Both of these selections are shown in figure below. Finally click on Apply button. The library view will filter any images that are not taken on the date you had specified.

     

     

    To sum up Asset Library is an excellent way to store your digit assets including images, audio and videos. Combine with other powerful collaboration and content management features of SharePoint 2010 you can now use SharePoint in your organization in much more productive ways than ever before.

     

     

Exchange Online, Microsoft Cloud, Microsoft Lync Online, Microsoft Office, Microsoft Office Web Apps, Office 365, Office 365 Grid, SharePoint Online

Microsoft Office 365 Resources

[Updated: 04/25/2011]

Office 365 (vNext of BPOS) is currently in public beta but there are already decent amount of resources available containing tons of information on it. Following is the list of some of the resources on Office 365, off course links will grow as Office 365 move further in its release cycle.

Community

Office 365 Community Home

Forums

Office 365 Community Official Forums (All services)

Office 365 Transition Forum – TechNet

Blogs & Wikis

Microsoft Office 365 Official Blog

Office 365 Technical Official Blog

Office 365 Official Wiki Page

TechNet

SharePoint Online Planning & Administration

MSDN

Exchange Online Development Center

SharePoint Online Standard Developer Guide

SharePoint Online – An Overview for Developers

Getting Started with Microsoft Exchange Online

Learning (Conferences + Trainings + Events)

Office 365 YouTube Channel

Office 365 Developer Training Course

Office 365 Developer Training Kit

Office 365 Webcasts (Recordings + Upcoming)

Office 365 Technical Training for Partners

Microsoft Lync Online – Focus on Conferencing

Microsoft & GITCA “24 Hours in Cloud”

Microsoft World Wide Events (Office 365)

SharePoint Development in the Cloud with SharePoint Online (SharePoint 2010 FireStarter Event)

Social

Office 365 – Official Facebook Page

Microsoft Office Web Apps – Facebook Page

Office365 – Official Twitter Page

Office 365 – Official LinkedIn Group

Office 365 Enterprise – LinkedIn Group

Windows Azure & Office 365 – LinkedIn Group

Miscellaneous

Microsoft BPOS to Office 365 Transition Center

Office 365 Plans (Pricing & Availability)

Office 365 Show Case Video Channel

Exchange Online, Microsoft Cloud, Office 365, Office 365 Grid

Office 365 – Quick Overview of Exchange Online

Microsoft Office 365 which is currently in private beta phase is a next version of Microsoft BPOS offering containing SharePoint Online, Exchange Online, Lync Online and all of them in the in the cloud available as a service. Also Office Professional Plus is available which provides enhanced productivity while working with various online offerings. Following is a brief overview of Exchange Online with focus on mailbox capacity, audit logging, ability to perform legal hold on mails and new and improved administration console in Exchange Online. Please note that the details are subject to change as Office 365 become generally available.


In today’s world emailing is one of the most essential features for any organization and to keep it secure, highly available and easy to use is considered as one of the most essential requirement. Exchange Online offers various mail box sizes which are mainly dependent on subscription type. At the time of writing in Office 365 beta, following plans are available.


With Exchange Online you can also put a cap on a maximum size of a mail box that comes with the plan and hence reducing the mailbox storage for users. It’s common for organizations to request this reduction in mailbox sizes as quantity and size of mails become overwhelming. In order to achieve this you have to configure what is known as “Capacity Alerts” for user mail boxes, essentially these are notifications send to users as their mailboxes reaches the maximum sizes. There are three levels of notifications as shown below and each putting higher constrain on mail usage and penalizing user by limiting certain mail functionality until they decrease their mail box sizes to desired size.


Exchange Online uses the following default values for sending notifications and it is based on mail box type which is essentially tied to subscription plan. So depend on your requirements you can simply use Remote Power Shell which is available for Exchange Online to decrease these values to an amount that suites you. Read full article here

GITCA, INETA, Microsoft Cloud, Microsoft Community Events, Office 365, SharePoint Online, SharePoint User Group

My “Office 365- SharePoint Online” session at GITCA “24 Hours in the Cloud” Event

[Update 15th April 2011:- This event is re-scheduled to take place on 1st June 2011]

It’s been really a busy year for me so far, I really like indulging into speaking especially when it comes to user groups and communities. GITCA (The Global IT Community Association) on June 1st 2011 will be conducting a 24 hour virtual event “24 hours in the Cloud” focusing on cloud computing. There will be various sessions ranging from Windows Azure to Office 365 (vNext of BPOS). As Office 365 is currently in private beta it’s a great opportunity for many of you to get a closer look into what’s coming up in next from Microsoft.

I am also presenting in this event, my session is “Office 365 – SharePoint Online Overview”. I will be covering the basics of SharePoint Online and dividing my allocated sixty minutes session time into multiple demos with discussion on various features and functionalities of SharePoint Online. I will also touch base on key considerations while making a shift from On-Premise to Online version of SharePoint. It’s a virtual event and all the speakers including me will be available via twitter (mine is @razibinrais) to answer your questions. I will be sharing my session resources (slide deck + session video) after the session right here on this blog post, so stay tuned for that.

 
 

So join in and learn about Microsoft Cloud!

Office 365, Office 365 Grid, SharePoint Online

Microsoft Boosts SharePoint Online with Office 365 Rollout

Couple of month’s back I wrote a brief article on SharePoint Online which is part of Office 365 offering (VNext of BPOS). Following is an excerpt from it and link to the full article.

Microsoft Office 365, which is currently in beta, is the next wave of Microsoft’s online offering containing SharePoint Online, Exchange Online, Lync Online and all of them in the cloud. Office Professional Plus is also available; it provides enhanced productivity while working with various online tools. The following is a quick overview of the productivity and storage availability in the SharePoint Online offering. The details are subject to change as Office 365 become generally available.

If you’re wondering which version of SharePoint is available in Office 365, the good news is its SharePoint Server 2010 but with a few restrictions and limitations. Some of these limitations are due to the fact that currently Office 365 is in beta, but a few of them will likely remain, even after the general availability of Office 365. This makes sense as few features and functionalities of SharePoint Server 2010 will not be feasible for the multitenant approach, which is the hallmark of Microsoft SharePoint Online. As SharePoint online will be made generally available the differences and limitations will be made available by Microsoft. Read Full Article

SharePoint 2010 Products & Technologies

SharePoint 2010: Redirecting User to a Custom Page from Event Receiver

Event receivers in SharePoint allow great flexibility to meet various user requirements, and with each version of SharePoint there are improvements to enhance their usability. One of these added abilities is to redirect user to a custom page (essentially a SharePoint Application Page) while cancelling the event from an event receiver. Let’s consider this scenario: an HR department wants to place a new policy which requires all the users to only upload documents into a document library from 9 a.m. to 5 p.m. Moreover, as this is a new policy, there should be a page that displays the details of the new policy, whenever a user upload is cancelled. The following diagram shows the flow.


Now, a “Item Adding” event receiver will take care of the first part of the requirement, but for the second part there is no OTB support to achieve this in SharePoint 2007. However, SharePoint 2010 provides an excellent way to do this with little bit of an effort. The following steps show the detail of how to achieve this.

First, create a new Visual Studio 2010 Solution and expand “SharePoint 2010” from “Installed Template” and select project type “Event Receiver.” Give a desired name to the solution and project. My previous article covers the event receiver project creation and some required configuration in detail, if you need more help on this topic please refer to it. Also make sure that your project’s target platform is “x64” and target framework is “.NET Framework 3.5” this is a requirement for all SharePoint 2010 projects.

“SharePoint Customization Wizard” will appear. In “type of Event Receiver” select “List Item Events.” From “event source” drop down select “Document Library”. Also select the checkbox for “An item is being added” from the list of available events. See the figure below.


After the project is created, create a page that will be displayed when a document upload is declined. For this, add a layouts folder to the project. You can do it by right clicking on the project and select “SharePoint “Layouts Mapped Folder;” see the figure below.


This will create a layouts folder, actually a subfolder with the same name as project. This layout folder basically corresponds to SharePoint 2010 “Layouts” folder inside the “14” hive (e.g. <DRIVE _LETTER>:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14, where DRIVE_LETTER represents a system drive where SharePoint 2010 is installed and in most cases it’s a C drive)

Right click this subfolder inside the “Layouts” folder, and select “Add, New Item.” This will open a new dialog, select “Application Page,” and use “HRDocumentUplaodMessage.aspx” as a name.


Click “Add.” This will add this application page to the layouts folder. Add the following markup to it as shown below.


In order to add the logic to cancel the document upload, and to display the custom page, add the following code fragment to the “Item Added” event handler.


Replace “[SubfolderName]” with the actual name of the folder created inside “layouts” directory in the previous step by Visual Studio. This is by default set to the same name as of the project.

The code inside the “Item Added” event receiver first make a check that current hour is between 9 am and 5 pm by using “DateTime.Now.Hour” which is in 24 hours format. The value “17” in 24 hour format equates to 5 p.m.

Next, the property “Status” is used. It’s actually of type SPEventRecieverStatus, which in this case sets to “CancelWithRedirectUrl. ” This ensures that event will be canceled and the user will be redirected to a specific URL. The URL is defined and set by another property “RedirectUrl” which takes a relative path to a page which must resides inside “layouts” folder within 14 hive.

Once all of this is done, press F5. This will build and deploy the solution and open up a new browser window with a SharePoint 2010 site.

In order to perform a actual test, make sure that current time on development machine is between 9am to 5pm (you may want to temporary change the current time of your development machine for this test and then revert back to original time later), otherwise logic in the event handler to display custom page will be not executed due to the time interval check .Finally browse to site (if it’s not already opened), and then open any document library and try to upload a document, the custom page should be displayed as shown below. Close the dialog page, and view the document library, notice that the document was not added to the document library. Alternatively when you perform the same upload procedure between 5:01 PM to 8:59 AM your document will be upload successfully.