Welcome to MSDN Blogs Sign in | Join | Help

Chris Johnson

All about Chris Johnson, SharePoint Products & Technologies & Other Stuff.
Bill’s last day

Today is BillG’s last day full time at Microsoft.  I just finished watching a live web cast of Bill’s last “town hall meeting”.  These are meetings where the execs of the company talk about the business and how we are doing etc… Today’s was obviously dedicated to Bill.

I have a sneaking suspicion that I don’t fully realize what a monumental day today is.  I suspect in 10, 20 or 30 years time I will look back and realize that today was the day that really defines Bill’s legacy. 

As big is the role that Bill has played in defining the computer industry (the biggest),  I feel that it will pale in comparison to the work he will now focus on full time.

He has always had world changing visions and dreams.  At the beginning of Microsoft it was to put a computer on every desk.  Now it is all about solving huge humanitarian issues like AIDS and world poverty.  Everyone has dreams to do great things … Bill actually does things to achieve them … no matter how big and world changing.

As much as many people despise Bill (many I think due to his success), he has changed the world once and there is no one else better equipped to change it a second time.  Bill 2.0

I know it sounds cheesy , but I joined Microsoft almost 6 years ago to be a part of something that changes the world.  Before Microsoft I had never felt the feeling you get from knowing literally millions of people are using software you directly had input in, it is something quite unique. 

Software is unique in that really you are only limited by what you can think up.  That is the magic of software… and Bill is taking that mantra of anything is possible to the next level.  I applaud his commitment and focus to these issues and really hope he changes world all over again … one more time.

Not many people get to change the whole world once, but to have the opportunity to do it twice? … Historic.

image

UPDATED: Building a simple ASP.Net page based SharePoint application in Visual Studio with the Visual Studio Extensions for WSS 1.2 with Visual Studio 2008

I have had a lot of feedback from people via email and comments that they really like the blog post I did about ASP.Net applications in SharePoint.

However,  there were a few “bugs” with that post, so I have decided to redo it with those fixed. 

This post builds the same example but with:

Here goes….

We will use Visual Studio 2008 & the Visual Studio 2008 Extensions, Version 1.2 to build a very simple 2 page ASP.Net page based application and deploy & run it in SharePoint.

For this you will need:

  • WSS or MOSS installed
  • Visual Studio 2008
  • VSeWSS 1.2

For help with installing WSS see: Install Windows SharePoint Services 3.0 on a stand-alone computer

Before getting started:

Make sure you can browse to your SharePoint site on http://localhost

E.g:
image

1. Create the project

Start Visual Studio

Create a new VSeWSS project (File->New->Project)

Under Visual C# in the left pane click “SharePoint

In the right pane choose the "Empty" project template.

Name it "DataEntryApp".

image

Click OK.  This will create a new VSeWSS blank project for us

Your Solution Explorer should now look like this:

image

Now we need to add some references to your project.

Right click on “References” and choose “Add Reference”.

Select & Add:

  • System
  • System.Data
  • System.Web
  • System.Xml

Your Solution Explorer should now look like this:

image

Now you have created the skeleton of the project we are ready to move on and start creating the pages & code that make up the solution.

2. Create ASP.Net pages

This is the part where we will create the ASPX pages.  To do this we will a Module to our solution.  Modules allow you to deploy files to various locations in a SharePoint site in which the your Feature is activated.  We are going to add two files to the Module.  The first will allow someone to enter some text and click a button to submit it.  The next will show that text that the user typed.

Right click the project and choose Add -> New Item. Make sure you have “SharePoint” selected in the left pane & select “Module” from the right pane

Call it "DataEntryApp.aspx"

image

Your Solution Explorer should now look like this:

image

Rename the sample.txt file to “DataEntryApp.aspx”.

Open the Module.xml file and change the following line:

image 
to
image

Add another Module called “DataDisplayApp.aspx

Rename the sample.txt file to “DataDisplayApp.aspx”.

Open the Module.xml file and change the following line:

image 
to
image

Your Solution Explorer should now look like this:

image

The next thing we need to do is add a couple of C# files that will have the code that sits behind our ASPX pages.  These will house the logic behind the submit button and the display form.

Right click your project and choose Add –> New Item.

Choose Visual C# in the left pane and Class in the right pane.

Name your file "DataEntryApp.cs".

image

Click Add.

Right click your project and choose Add –> New Item.

Choose Visual C# in the left pane and Class in the right pane.

Name your file "DataDisplayApp.cs".

image

Click Add.

Your Solution Explorer should now look like this:

image

We are now ready to start fleshing out the content of the pages and the code.

Open up "DataEntryApp.aspx" and add the following:

<%@ Page Language="C#"
    MasterPageFile="~masterurl/default.master"
    CodeBehind="DataEntryApp.cs"
    Inherits="DataEntryApp.DataEntryApp"
    Title="Data Entry Page"
     %>

<asp:Content ID="Content5" ContentPlaceHolderID="PlaceHolderMain" runat="server">

    <div>
        <asp:TextBox ID="EntryText" runat="server"></asp:TextBox>
        <asp:Button ID="SubmitButton" runat="server" Text="Button" />
    </div>
</asp:Content>

Open up "DataEntryApp.cs" and add the following code:

using System;
using System.Web;
using System.Web.UI.WebControls;

namespace DataEntryApp
{
    public partial class DataEntryApp : System.Web.UI.Page
    {

        protected TextBox EntryText;
        protected Button SubmitButton;

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Page_Init()
        {
            SubmitButton.Click += new EventHandler(SubmitButton_Click);
        }

        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("DataDisplayApp.aspx?TextToShow=" + EntryText.Text);
        }
    }
}

Open up "DataDisplayApp.aspx" and add the following:

<%@ Page Language="C#"
    MasterPageFile="~masterurl/default.master"
    CodeBehind="DataDisplay.cs"
    Inherits="DataEntryApp.DataDisplayApp" 
    Title="Data Display Page" %>

<asp:Content ID="Content5" ContentPlaceHolderID="PlaceHolderMain" runat="server">

    <div>
        <asp:Label ID="TextToShow" runat="server" Text="Label"></asp:Label>
    </div>
</asp:Content>

Open up "DataDisplayApp.cs" and add the following code:

using System;
using System.Web;
using System.Web.UI.WebControls;

namespace DataEntryApp
{
    public partial class DataDisplayApp : System.Web.UI.Page
    {
        protected Label TextToShow;

        protected void Page_Load(object sender, EventArgs e)
        {
            TextToShow.Text = (string)Request["TextToShow"];
        }
    }
}

3. Build & Deploy

We are now ready to build and deploy the solution to SharePoint.  Couple of things before we do that however.

Open up the "WSP View" panel.  If you don’t see this you can find it under View -> Other Windows -> WSP View or CTRL+W, I

It should look like this when you expand the DataEntryApp top level item.

image

The WSP View shows you how your solution is going to be packaged into the WSP.  It allows you to drag and drop your Features around to get the model you want.  It also allows you to open the XML files and tweak with them if you want to.

Open the manifest.xml file.

Change the following:

image

to:

<Assemblies>
  <Assembly Location="DataEntryApp.dll" DeploymentTarget="WebApplication">
    <SafeControls>
      <SafeControl Assembly="DataEntryApp" Namespace="DataEntryApp" Safe="True" TypeName="*" />
    </SafeControls>
  </Assembly>
</Assemblies>

Now we are ready to build the solution

Build -> Build DataEntryApp

image

This will compile your projects code. 

We also need to package the solution into a WSP and deploy it to SharePoint.  Fortunately, VSeWSS does this for us so we don’t need to do any of this by hand like we had to in the past with scripts and nasty batch files.

Build –> Deploy DataEntryApp

image

If your deployment was successful you should see "Deploy succeeded" in the lower left of the Visual Studio window.

image

4. Try it out

Navigate to http://localhost/DataEntryApp.aspx

You should see a page like the one below. Enter some text in the textbox e.g. Hello World

image

Click "Button” & you should be taken to a page that displays the text you entered.

image

I hope this illustrates how simple it is to start creating a ASPX page based application in SharePoint.

If you have suggestions for future topics you would like me to post about on Development with SharePoint please comment.

Thanks,

-Chris.

VSeWSS v1.2 is available! - VS 2008 support!

Hi Everyone,

I just posted the announcement on the SharePoint team blog here: http://blogs.msdn.com/sharepoint/archive/2008/06/04/announcing-the-vsewss-version-1-2.aspx

This will address the number one ask from our developers ... Visual Studio 2008 support!

Happy SharePoint development.

-Chris.

Become a SharePoint Developer -www.MSSharePointDeveloper.com

SharePoint is taking off in ways we only could have imagined a few years ago.  Along with that comes a demand for developers to help implement and customize it for customers.  We are seeing a huge need for people with these skills in the market.

If you were ever thinking about becoming a SharePoint developer, now is a great time to do it.

To help you with that process MS has put together a great resource for helping you get started ... http://www.mssharepointdeveloper.com

It has a bunch of getting started material, hosted hands on labs you can take, whitepapers and more.

If you are new to development or a veteran ASP.Net developer and want to get started with SharePoint development this is the place to start.

image

Shuttle docking, New Zealand & XP

If there is one thing I love the Internet for its watching stuff happening in space.  I regularly tune in to Nasa TV when the shuttle is up to watch the goings on.

As I write this the shuttle is preparing to dock with ISS.  Its cool being able to watch this.

Along with realtime video footage you get shots of some animations of where the shuttle and ISS are at, like the one below.

Couple of things caught my eye a few mins ago ... 1) they were over home (New Zealand) & 2) the app showing all this in mission control is running on XP (nice to see it helping to run these missions).

image

WSSv3 on Vista

Yesterday Bamboo Solutions released a tool that allows you to install WSSv3 on Vista.  Developing on Windows Server has been a pain point for developers for quite some time & this workaround helps address that.

However,  I want to stress that this is not supported by Microsoft.  We have not tested WSS on Vista and thus make no commitment to supporting this.  However, I imagine that this will not bother many people and we will end up seeing this being a popular option.

We have known about this pain point for quite some time & I totally understand the pain everyone feels because of it.  I spent a lot of time in the field doing development on SharePoint and would have killed to not have to do that in a VPC / separate machine.  There are many reasons we hear about why people want to do this:

- They don't have a separate machine to install SharePoint on.
- Their organization does not allow Server installations on any workstations or VPCs.
- Their PC is not powerful enough to run a SharePoint virtual machine.

The list goes on ... but the 3 above are by far the most common.

To fully support another OM platform for our product is a big big deal.  It is a surprising amount of work to make sure everything works & we can certify that it does.  It is not simply a case of removing the OS block in our installer and letting the world have at it.  We must ensure that things work and that people wont loose data because of it.  Maybe some time in the future we will look at this, but for now we don't have any plans.

With the advent of Vista SP1 it was only a matter of time before someone did this.  Vista SP1 IIS is almost identical to IIS in Windows Server 2008.  IIS on Vista has some limitations such as a max request throughput count of 7 (or thereabouts).

Happy SharePoint development...

Thanks,

-Chris.

Update 6/9/08: I wanted to add a clarification to this post. You should always ensure that you are properly licensed for the software that you use. For Windows SharePoint Services 3.0 and other Microsoft software you should review the end user license agreement that is required before using that software.

Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions User Guide, Version 1.1

Big title for a big user guide! :)  This is a great step forward for people starting out with SharePoint development, or for people looking at starting with the VS extensions for SharePoint.

Anyone looking to build things like Webparts, Site templates, List temlates, Event handlers etc... should be looking at the extensions.  You can be up and running building a web part with Visual Studio in 5 mins and that will include all the WSP packaging too!

Right now the extensions are only for VS 2005, however by the end of June we should have the updated version for you that allows for VS 2008.  Stay tuned.

"This is the User Guide, Samples and Walkthroughs for the tools for developing custom SharePoint applications with the Visual Studio 2005 extensions for Windows SharePoint Services 3.0, version 1.1 (VSeWSS 1.1). The user guide has sections:

  • Starting out in SharePoint Development
  • Walkthrough of the VSeWSS User Interface including the WSP View
  • The Team Site Project
  • The Blank Site Project
  • The List Definition Project
  • The Web Part Project
  • The Workflow Projects
  • Project Item Templates
  • Best Practices with VSeWSS
  • Changes from 1.0 to 1.1"

http://www.microsoft.com/downloads/details.aspx?FamilyId=A8A4E775-074D-4451-BE39-459921F79787&displaylang=en

Download the extensions here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=3e1dcccd-1cca-433a-bb4d-97b96bf7ab63&displaylang=en

Loving the new Zune update

Finally managed to get around to updating my Zune software to the new update.  Great to see TV shows in there like Battlestar Galactica and The Office.

image

I really like the Zune Card integration too.  Feeling more social already :)  It is cool to see what your fiends are listening to and be able to listen to them and/or download.  Very cool.  I always find it hard to find new music I like so it is nice to see what others are listening to.

Awesome to see that Auto playlists are back too! (i really missed them)

image

Loving the new Live Maps features...

I have used Live Maps for a long time now ... but they just keep adding awesome features!

http://virtualearth.spaces.live.com/blog/cns!2BBC66E99FDCDB98!14129.entry

Summary:

- Safari and IE8 compat
- Export your collections
- very cool new 3D improvements (see below)
- Labels in birds eye
- Party Maps
- Map cruncher integration
- Subscribe to a map and get notifications on people adding POI in those areas etc...?
- Hi-Def tour movies
- Traffic enhancements

image

SharePoint protocol documentation released...

We have just spent a great deal of time head down writing documentation on all sorts of SharePoint protocols.  They are split into two groups Front End and Back End.  Front end protocols are all the ones that typically talk to a front end web server and the back end ones are mostly how the front end server talks to other servers such as SQL Server.

So if you ever wondered what how a particular SharePoint protocol worked ... now you can read all about it.

Grab them here:  SharePoint Products and Technologies Protocols

SharedView is very cool.

Every once in a while I am blown away by something.  Not because it is the latest and greatest, but because it does what it does in such a simple and easy to use way... this is one of those things.

SharedView is a very nifty little remote application sharing tool.  I was shown it yesterday when someone I was working with in New Zealand wanted to share an application with me.

There are quite a few options out there for this scenario ... however what struck me was how simple it was to set up and get running!  Not only that but I was behind a corporate firewall and i imagine the chap I was sharing with was too.  Its clever about doing things over port 80 if it cant do it other ways.  Very nice.

1. Install the client (small download 3.5Mb)

2. Start the client

3. Sign in with your Windows Live ID

4. Start a sharing session.

All you have to do is email your counterparts a URL they click on to join the session.

It was so simple I am moving my parent's (who live in New Zealand) remote helpdesk (i.e. ME!) to this.  If I think my parents could do it ... it must mean it is an easy to use app.

Very impressed.

image

Who's the kiwi?

Saw this chap ask Steve B a question at Mix ... he sounded like a kiwi ... I mean he used "Wicked" and a bunch of other kiwi'isms.

Great question too! :)

image

http://visitmix.com/blogs/News/Watch-Steve-Ballmer-and-Guy-Kawasaki-Live/

Floor cleaning robots...

We moved into our new house last week and it is a lot bigger than the last. That means lots of vacuum cleaning.  So becoming more accustomed to being lazy in my old age ... there was only one thing for it... a Roomba & a Scooba.  Floor cleaning robots from www.irobot.com.

One for carpet, another that washes floors!

Check out the video I took this morning of the little guy washing the floors...

Very clever little things.

What do Mix 08, Silverlight, the Beatles & New Zealand all have in common?...

At Mix08 today Hard Rock demo'ed their new web based Silverlight 2.0 application that allows a user to browse (in amazing detail) their catalogue of rock history.  (http://memorabilia.hardrock.com/)

If you zoom into the middle left of the bigger image you will find a note from the Beatles to their security manager for one of their tours.

image

It is written on a piece of paper from the hotel (Hotel St George) they stayed at when they played Wellington in New Zealand during their 1964 tour.  Anyone from Wellington will know of the Hotel St George ... its an iconic old building in the center of Wellington ... and now a university hostel.

Here is a clipping of a bit of the note.

image

 

This bit cracked me up:

image

The note is hilarious and refers to the Vietnam war amongst other things.

According to my mother she was also one of the females screaming outside the hotel during their stay :)

Very cool use of technology & cross platform too!  With Silverlight coming to mobile phones shortly (Noika are on board) I cant stop thinking about the all the amazing possibilities for mobile apps.

-Chris.

It almost made me cry too.... kinda...

Scoble recently had a wee cry about a new Microsoft Research project called World Wide Telescope that he saw prior to it being announced. 

See here: http://scobleizer.com/2008/02/27/what-made-me-cry-microsofts-world-wide-telescope/

Well, today I got a chance to check it out at our TechFest (where Research show off all the stuff they do) ... and I have to say it is one very cool application.  Mind blowing ... and for the right person ... is likely to make them very happy ... and possibly cry (if they were alone and didn't want to lose face).  I kinda like space and astronomy ... so it was very interesting indeed.

You can check it out here: http://www.worldwidetelescope.org/

-Chris.

PS: you cant download it .. yet ... but soon you will be able to.

More Posts Next page »
Page view tracker