Archives

Archives / 2008 / October
  • XPS support in Windows 7

    Tags: XPS, Windows 7

    The buzz about XPS has unfortunately faded away during the last year, probably due to the discussions about the Open Xml formats. XPS is still here and will eventually submitted to ISO and proposed as a standard.

    Windows 7 has of course support for XPS. When you install Windows 7 (note build 6801) you get the Microsoft XPS Document Writer printer which is used to print anything into an XPS document.

    Microsoft XSP Document Writer in Windows 7

    So you can create your XPS documents from any application with printer support. In combination with the updated Wordpad application in Windows 7 that supports both ODF and the Open Xml formats (post build 6801) you have a great interoperability experience.

    Now that you have created an XPS document you of course need to read them. On previous versions of Windows you needed to install a separate application, XPS Viewer EP, to get a good viewer experience but Windows 7 contains an XPS Viewer out of the box.

    Windows 7 XPS Viewer

    The viewer is basically the same viewer that can be downloaded for previous Windows versions (it is in fact the same viewer and .exe file) but has a much more Windows Vista/7 like interface.

    It’s hard to say what the features will be like in the final version but this version has support for signing documents (only available if you opened an XPS using Internet Explorer on Vista) and managing your accounts. Can’t try it out fully since I have trouble creating my signing accounts.

    To sum it up; with Windows 7 you have a complete solution to read, create and sign your XPS documents.

    Technorati tags: ,

  • PDC 2008: Reflections

    Tags: Business, Internet and the Web, WinFX, PDC 08, Windows Azure, Live Mesh, Oslo

    Now sitting here at LAX and reflecting over what we have experienced during the PDC 2008 the last few days. We learned a lot about technical stuff and what’s growing up in Redmond, but I think the most important stuff is what’s happening to the software business in large. With Windows Azure as the first large scale service host and with the number of online services that Microsoft will release in the upcoming years we have a real challenge to adapt to these new business models. Not only Microsoft is running this way, just look at Amazon and others, but Microsoft have such an effect on a large number of users.

    We are going to see how our business models will be changed in a few years, and it is time to start thinking about this now. Ok, now you say; I know SOA, I can make web services…but it’s not all about that it’s just the technology that will be used. But it’s fine as long as you know the technology you’re right on track. Several of the PDC sessions was about how to architect solutions for the cloud, which is somewhat different than having your services on premise. If you haven’t watched them I urge you to do so.

    Another thing that was really evident at the PDC was that the imperative programming paradigm will and can be replaced with more declarative programming and functional programming. This will be painful for a lot of developers, including me. Same here, you better get to start adapting to this. You have no-code XAML workflows, F# and last but not least Oslo to start with. Of course we will have standard old imperative languages for a long time to come, but you should know when to use other approaches, and knowing about this will be a competitive advantage for you.

    This is what I have been thinking about since PDC ended and i know I don’t cover it all here, but it’s just to give you a hint of where the winds are blowing…

    Now I have to kill a few hours here at LAX before a long flight home to my beloved family. See ya around.

  • Windows 7 - first impressions

    Tags: PDC 08, Windows 7

    I have now done some initial testing and evaluation of the 6801 build of Windows 7, which we got at PDC 2008. First of all I was a bit disappointed that we did not get the updated UI that were shown during the keynote, instead we got a previous build that does not have that much changes in the UI.

    It boots pretty quick on my Virtual PC, yes I run it there – a little to early to switch out my main OS, and it has a nicer loading screen than Vista.

    Windows 7 Starting

    Windows 7 notification areaFirst you notice that the notification area has got some changes; by default only the volume, network and Solution Center icons are present, you can configure it to show all icons by default if you want to. When you hover them you get a smaller and less graphical tooltip than on Vista and a small highlight of the icon. The area to the right of the clock shows the desktop if you click it, on later builds it will show your desktop with the current windows transparent (shown at the keynote).

    The Sidebar is now changed so it is not a side bar anymore, you can place your Gadgets all over the screen. Funny, they even took this one out of the Vista beta for a while…

    The Start Button

    The Start Button glows a little more in this build than in Vista when hovered, but the version we saw at the PDC keynote looked a little bit more different. But, the interesting stuff is what happens when you right-click it! Now think how you normally starts Windows Explorer with the mouse – I bet that you do not go into the Start menu and select the Explorer program but instead you right click the Start button and selects Explore or Explore All Users and then you find yourself in Explorer and navigates back to the drive root from the Start Menu folder. No more in Windows 7! When you right click you just select Open Windows Explorer and voila – just as hitting Win-E! Nice!

    Right-click on Windows 7 Start menu

    The Windows 7 Control Panel

    The Control Panel has changed a lot, it looks like they have worked most of the items over all in some nice and smooth transitional effects.

    Windows 7 Resource MonitorThe Resource Monitor have been updated heavily and are now a really interesting tool for monitoring your PC. You can easily select which processes or services to monitor. When checking out the processes you can filter out which to watch and inspect which modules and handles they have. Same filtering works for network and disc – you can see how much network or disc a specific process uses. When monitoring the network you can even see which ports and protocols a certain process uses and if the firewall blocks it or not. Good job, this will be useful!

    Some new control panel stuff:

    • Clear Type Tuner is there by default
    • Biometric devices
    • Default location and Location and other sensors – used for location awareness
    • Pen and Touch instead of Pen and Input Devices
    • Credential Manager – Manage your Windows and certificate based credentials

    Windows 7 Disk Defragmenter The Windows 7 Disk Defragmenter

    The Disk Defragmenter now includes an Analyze function so you can analyze your discs, and you can more easily see when you last defragmented your disks. And you can even see how your defragmentation is doing – couldn’t I do that in Windows XP? The scheduling also includes which disks to defragment during a scheduled defragmentation.

    There are of course more cool stuff, such as the usage of the Ribbon controls in Paint and Wordpad and the new calculator etc…

    Technorati tags:

  • PDC 2008: Day 4, wrapping it up

    Tags: Microsoft, SharePoint, Visual Studio, Microsoft Office, Office Open XML, PDC 08

    So the last day of PDC 2008 is over. The brain has been cooked for a few days…

    This very day did not have any keynote and I kicked off with a session on the Visual Studio Extensions for SharePoint. I have note used this add-in since the first releases of it since I didn’t like it that much but had instead relied on manual packaging and deployment as well as STSDev. But after this I might think about moving over and try it out once again. During the session a basic site was built with some lists, event handlers and a Silverlight application using the new Charting controls.

    Then I headed over to listen on the work on the Open Xml Formats SDK. Some nice demos of how you can merge, edit and create documents without using the Office clients. Some demos on how to integrate it to SharePoint was included. Version 1 is now available and based on the ECMA OOXML standard and version 2 will be available when Office 14 hits the street.

    Next I sat down and tried out some more of Azure and Quadrant. The Quadrant tool is amazingly interesting and at the same time confusing – I wonder what it eventually will end in…

    I ended the day with an introduction to F#. Really good session and Luca Bolognese explained it well by creating a real-world solution using F#. The syntax is really weird for me who is a natural-born-imperative-programmer, but I can see the usage for it and I hope that I can try it out in a project sometime. F# is currently available as a CTP but will RTM during 2009, and my guess that it will be installed with Visual Studio 2010.

    PDC 2008 was a great experience and it will return to LA next year. I have had the fortune to meet some really smart people from Microsoft and from other companies. I will return home with a head full of new stuff that I need to dig into deeper and a bag full of merchandise. Now I just can’t wait to start working with all of this exciting stuff.

    One thing I missed though was any “official” news on the Office 14 clients and SharePoint 14 platform.

    Having one more day here in LA I will try to get some hours out in the sunlight instead of sitting inside and being a geek.

    That’s all folks.

  • SharePoint Fantastic 40 upgraded

    Tags: SharePoint

    The Fantastic 40, the set of application templates, for Windows SharePoint Services 3.0 has  been updated with new language support. Among the new supported languages are Swedish, Danish, Portuguese and some more. Some of the DLL’s have also been updated (haven’t checked what).

    You can download them from here:

    Windows SharePoint Services 3.0 Application Template: Application Template Core

    Windows SharePoint Services 3.0 Application Templates: All Templates

    Windows SharePoint Services 3.0 Application Templates: All Server Admin Templates

    Technorati tags: , ,

  • PDC 2008: Day 3, the picture is getting clearer

    Tags: .NET, SharePoint, Internet and the Web, Office Open XML, PDC 08, Windows 7

    Day three is officially over, I’m pretty tired today after staying up to late yesterday and playing around with the “goods”. I installed Windows 7 and tried it for a while, but to my disappointment I found out that the nice stuff that were shown on the keynote was missing in my release…

    This morning started with the last keynote of PDC 2008 and it was Microsoft Research that should be in the spotlight. An hour and a half was filled with stuff such as environment and healthcare studies done by MSR, important, but hey – you have an audience of 6.000 programmers/geeks here… The last 20-30 minutes was cool though, they showed up a kids-programming-language called Boku (not only for kids, for me too!) and Second Light an evolution of Surface, where you can project a secondary image onto a surface that is above, yup not in touch with, the surface. Really cool!

    First session I attended after the keynote was about how to architect services for the Live Framework – It’s all about using HttpWebRequest and RESTful services. If you know about these you can work with the Mesh and Azure. Now I’m just waiting for my activation codes for Azure and that Live Mesh will support non-English regional settings..

    I took a quick lunch so I could do one of the hands-on-labs with Microsoft Surface. Easy lab, but I spent some time extra and played with it. All is based on WPF and XAML and it’s really easy. Finishing the lab allowed me to claim the SDK for Surface, which otherwise is quite expensive, so I will have it within a few days. All that then remains is someone to hand me $12.500 so I can replace my living room table at home with a brand new Surface machine!

    Then it was time for some more of the Oslo stuff and this time the Quadrant application. Quadrant is the program to use when you are visualizing the repository you have described using the M-language. It’s one heck of a tool which you can turn inside out and more, but the question still remains – how will this really be useful? I’m sure that Don Box and his crew had a lot of fun making these tools and languages, but at this “pre-alpha” stage of Oslo, I have hard to tell how to apply this to my daily work.

    To ease things up I went to a talk about Oomph, an incubator project from Microsoft that tries to take advantage of the Microformats such as hCalendar and hCard. The session was a little to light-weight but shows the intention from Microsoft to take advantage of existing standards.

    Last session of the day was a long awaited talk from Miguel de Icaza on the Mono project, an open source version of .NET that runs on Linux, Max and Windows machines. Miguel made some really nice demos and it was neat to see how far Mono has come. I did participate in the first release of Mono with some contributions. Mono has some really nice features, such as the C#5(?) compiler as a service, and some sweet JIT optimizations that makes Mono worthy as a game framework. The Mono project also implements a Linux version of Silverlight, version 1.0 will ship any day now and version 2 will be at beta for Mix 2009.

    The Mono talk, Oomph talk, Windows 7 Wordpad with ODF/OpenXml support and a bunch of different framework released under the MS-PL open source license really makes me see a Microsoft in change.

    Before finishing the day off I walked around and talked to various experts in the Meet the Experts reception at the convention center. Tried to get some more information on Office “14”, but in vain…

    During this day the picture of Windows Azure is getting clearer, but the picture of Oslo is still quite blurry. I still have hard to find out to what Oslo is really about but I think I’m getting there – I have to try it some more.

  • PDC 2008: Day 2 with Windows 7 and Office Live

    Tags: Microsoft Office, Office Open XML, PDC 08, Windows 7

    Day two is official over. I’m just back from the attendee party at Universal Studios.

    Keynotes

    This Tuesday started with a couple of keynotes. I was fortunate and arrived just as they opened the keynote hall and got myself a seat in the front row.

    Me as a keynote frontrower

    After Ray Ozzies intro Steven Sinofsky took over and showed Windows 7 for the first time in public. You can read about the demos on almost every blog, but here are the stuff that caught my attention:

    • New and improved taskbar
      • better grouping/sorting of programs
      • applications are shown as icons, instead of text and icons, with spacing that adapts to the number of icons
      • you can pin applications to the taskbar, so they are shown there even if they are currently not running which makes the Quick Launch redundant
      • Jump Lists; for example shows the MRU list of Office applications
      • Improved Notification Area (formerly known and stilled referred to, in the keynote as System Tray) defaults to not showing the icons
      • the square to the right of the Notification Area is the Show Desktop function
    • Docking of windows
    • Wordpad supports both ODF and OpenXml
    • Booting directly off a VHD – isn’t that heaven for us developers!
    • Home networking that works…I’m not sure until I see try it
    • Ok, there is touch capabilities and they look neat, but it will take some time until I get my hands on hardware that is capable of this
    Windows 7 touch capabilities

    Visual Studio 2010 was also shown and it will be completely based on WPF and contains some really neat new features. How about having several web.configs! One for debug, one for staging and one for production! It’s there…

    Windows Live wave 3 is coming and is now a service on top of Windows Azure. The APIs looks slick and is based on standard REST protocols.

    Then it was Office time. I sure had hopes to see something from the Office “14” server products. Nope. Instead we were shown the Office “14” clients and Office “14” online sharing documents between the client, web and mobile devices. Office Online will really be something and Google Apps have to watch their back! The demo were they co-worked on a OneNote “14” document from the OneNote client, the OneNote online client and a cell phone was awesome – this is how I want to use OneNote!

    After a break Don Box and Chris Anderson hit the stage and made a really nice show (not rehearsed according to Don at a later session). They really showed how easy it was to work with Windows Azure using shipped bits and protocols, such as WCF and REST. Of course there were no PowerPoints but just Visual Studio and the command prompt.

    Keynote with Don Box and Chris Anderson

    Sessions

    After a lunch, with a nice guy from Microsoft Excellent Engineering, and after picked up the hard drive with the goods, I went to the session on Microsoft Velocity. Velocity is a distributed cache that really can easy your work with caching on large farms. The cache is easy to install and manage and really easy to program with. It has built-in support for redundancy and fail-over and scales unlimited. Velocity is currently at CTP2 and will be shipped during mid 2009 as a standalone product to ASP.NET.

    Next session was on the “M” language, a part of the Oslo project. I have not really understood the full capabilities with “M”, but to sum it up you can use M to model your domain languages. “M” is a language to describe types, values and constraints. It contains a compiler which can generate T-SQL from your “M”-code and then you can run the T-SQL and create a database with the types and constraints you specified and fill it with the specified values.

    Last session for this day was on how to architect services for Windows Azure. This was a pure PowerPoint session which described how to design and what to think of when you create applications/services for Windows Azure. All of this Windows Azure seems to be clearer for every day, can’t wait to get home and try it out some more. It feels almost to easy to build, configure and manage the services you build. You can just with a click scale out your application. If your application fails on one node, Windows Azure will try to restart the service or node and if that fails it allocates a new node for you. Why can’t I stop thinking about Skynet!

    Then back to the hotel and a quick change before I took a bus to the Universal Studios, where I met up with some nice Swedes and went for a few rides.

    That’s it for today. Now I have to continue my Windows 7 installation. Stay tuned for more “commercials”...

    Technorati tags: , , , ,

  • PDC 2008: Day 1 and Windows Azure

    Tags: .NET, C#, SharePoint, PDC 08

    Back at the hotel and watching some Monday Night Football (which I could do that in Sweden!). Here is a summary and some reflections on my day.

    Woke up early and walked down to LA Convention Center and got me some breakfast (tomorrow I’ll eat at the hotel). I tried to get to the keynote hall as early as possible for some good seating. I ended up in 6th row and had a good overview of the stage and the huge screens. As this is my first PDC and first conference of this magnitude I’m really impressed with the size and organization of it all.

    Ray Ozzie, Microsoft Chief Architect, hit the stage and did after an introduction introduce Windows Azure – Microsoft’s new cloud server and offering. Windows Azure and the Windows Azure Platform is Microsoft’s way of hosting your services in the cloud. Microsoft will also have a set of services ready; such as Exchange Online, SharePoint Online, Dynamics CRM Online etc. Windows Azure pricing will be based on subscriptions and SLA’s and competitive.

    Windows Azure

    I think the Windows Azure Platform can be really interesting. The thing that really made me interested was that you can federate your Active Directory (and/or your customers) and use that as authentication on your services in the cloud. I really like what Patrik Löwendahl calls it (article in Swedish): “Outsourcing 2.0”.

    After the keynote I went to a session on which I had big expectations: SharePoint Online extending your service. This session was about the SharePoint Online service hosted on Windows Azure. Small summary: SharePoint is hosted by Microsoft and you pay per user! The session and the content was really bad – from several perspectives. First of all we in the audience, several SharePoint MVPs were there, expected more stuff for developers than just SharePoint Designer editing. The only way to add code that makes something real is to host it in a Silverlight application. And then the presenter had a rough mission presenting this non-interesting material for a demanding crowd, especially since this session was an Advanced session! I’ll try to ignore I was there…

    Then I headed over the the Big Room and got stuck when Chris Anderson made a spontaneous demo of the new M-language. It looked really cool when he on-the-fly showed the small crowd how to create a schema from a text and then validate your input and create structured data. Got a book with the draft specification of the language and I will browse it through until tomorrow when Chris and Don Box will have their keynote. After this I tried on some Hands-On Labs with the Windows Azure federated authentication – sweet!

    Chris Anderson demonstrating M

    Then I, and a lot of people, headed over to listen to Anders Hejlsberg (Anders was really the one who made me interested in programming with Turbo Pascal in the 80’s) talk about the future of C#. Anders presented some new stuff that will be in C# 4.0 such as the dynamic keyword, which will combine the features of dynamic languages with C#. Anders made some really nice demos of this, and he actually copied some JavaScript code and pasted it in the C# file, compiled it (just a few small changes) and run it. His demos did receive more applauses than Rays keynote this morning. Some other nice stuff Anders presented was optional and named parameters. He also gave us some hints on what will happen after C# 4.0 – “Eval” in C#! This is what I really look forward to, but that’s long down the road…

    I had hard then deciding which session to attend and I finally selected ASP.NET MVC. Really good session with really good presenters. I like lean and neat HTML code and the MVC model. I hope to get to do some nice projects with this in the future. Unfortunately I’m very bound to SharePoint now so that will likely not happen so soon, if not SharePoint “14” will use this…say no more!?!

    Verne Troyer at PDC 2008

    Last session for today became WF 4.0 – first look which was about the new stuff in Workflow Foundation. Good session and good speakers here too. Tools, persistence and performance was the mantra for this session. WF sounds so cool in English – dub-F, can’t really say that at home in Swedish…

    Then it was freebie time with food and beer in the sponsor area. I now have a set of t-shirts to wear when painting the house. Some interesting sponsors and some interesting give-aways. Did have some time to play with Surface a little more, if I win on lottery I'll order one right away!

    More keynotes tomorrow, more focused on the client side, the bits is distributed and then there is the attendee party at Universal Studios…

  • PDC 2008: Pre-Con: Performance By Design

    Tags: PDC 08

    I have arrived at my first PDC and it’s an awesome experience. The conference is huge and I arrived here for the registration and breakfast and met up with some nice guys.

    LA Convention Center

    I fetched my bags of goods which contained mostly magazines and a bunch of sponsor commercials. We’ll have to wait until Tuesday until the real bits (the hard-drive stuffed with goods) are released and revealed. The keynote on Tuesday morning will really be interesting.

    As Pre-Con session I choose the Performance by Design, an area which I keep close. Nothing revolutionary was really revealed during this session, which took the whole day and a little more. I really like this enthusiasm that the presenters (Rico Mariano, Vance Morrison and Mark Friedman) had, they really made this, on the paper, boring session great. The mantra from the day was Measure, Measure, Measure.

    Most of the stuff I was aware of, except for some nice tools that now is slipping out of Redmond. But even if you are aware of all this you need to practice it, which they gave some nice examples of; what, when and how to measure.

    Here are some of the presented tools:

    I always snapped up a few interesting spots for the upcoming .NET 4.0 framework:

    • Image verification will will be optional – no longer need to GAC every assembly?
    • Next framework version will contain “profiling in the field” – instrument your application for field profiling
    • Even better thread pool thanks to the parallelism

    The day ended up with a nice SharePint at the Biltmore hotel, where I met some really nice SharePoint MVPs and developers. I had some fun when using Microsoft Surface when getting the directions to the hotel.

    Microsoft Surface

  • PDC 2008: On my way

    Tags: SharePoint, PDC 08

    Sitting here in Zürich waiting for the delayed flight to Los Angeles and PDC 2008.

    This PDC is my first and I really look forward to it. I will suck in as much as I possibly can during the next few days. I have a couple of things on my agenda that I want to accomplish:

    • Go through all of the Office Systems and SharePoint sessions to find out what’s going on
    • Meet with the SharePoint MVPs, Product team and other cool SharePointers
    • Listen and learn from the Experts
    • Understand the Microsoft cloud vision even better, especially how do these services fit in a larger enterprise (I have not understood this yet)
    • And of course be one of the first to try out all this new stuff!

    I will be staying at the Westin Bonaventure hotel and drop me a line if you would like to meet and have a pint or two.

  • Office System 2007 Service Pack 2 announced

    Tags: SharePoint, Microsoft Office, XPS, Office Open XML, PDC 08

    I gladly received the news that the Office team announced Service Pack 2 for Microsoft Office 2007. Not only for the clients but also for the server products (read SharePoint).

    First of all it’s the support for the different file formats that I long for (ODF for example) and then there is the Outlook performance – both of these are addressed! XPS and PDF will be supported from scratch – no need to install a free plugin (just as it was in the Office 2007 betas).

    Unfortunately we will not se support for the ISO ratified OOXML format (IS29500) until Office “14” – wonder if we get some news at PDC 2008 about that?

    Technorati tags: , , , , , ,

  • The simplest form of SharePoint application, part 2

    Tags: SharePoint

    Yesterday I did a short post on how to make a really simple SharePoint application with a .aspx page inside a document library and some coding with SharePoint Designer. I ended the post with giving a hint that you can also place the code in an assembly. To aid you in your self studies, here comes the solution…

    Make an assembly

    Class LibraryFirst of all we need to make an assembly to host our code behind. Start Visual Studio and create a Class Library project. Add a reference to Microsoft.SharePoint.dll and System.Web. The Microsoft.SharePoint.dll can be found under c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI (who came up with the idea to place this stuff here by default?).

    Create a class called HelloWorldPage and make it inherit from Microsoft.SharePoint.WebPartPages.WebPartPage. Now add an asp:Label control to your class and then write the code for the Page_Load, just as in the previous post.

    Your code should look like this:

    namespace HelloWorld2 {
        public class HelloWorld2Page : Microsoft.SharePoint.WebPartPages.WebPartPage {
            protected Label label1;
            void Page_Load(object sender, EventArgs e) {
                label1.Text = "Hello world";
            }
        }
    }

    Before finalizing this assembly we need to sign it – SharePoint does not really like unsigned code, and it also allows you to install it into the GAC.

    Signing

    Create the application page

    Just as in the previous sample we need to create a .aspx page in the document library. Create a new Basic Page in your library and call it HelloWorld2.aspx. Then open it up in SharePoint Designer and remove the WebPartZone, just as we previously did. Then add the asp:Label control like this:

    Code...

    Make magic happen

    Now the fun begins. Change the @Page directive attribute Inherits to your own class and assembly.

    Inherits="HelloWorld2.HelloWorld2Page,HelloWorld2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a425d507c93d43c0" 

    It should look something like above. First you have the full name to your class, then you have the assembly strong name. You can find the strong name by looking at your DLL using Red Gate’s Reflector.

    Reflector

    Save your page.

    Copy your DLL to the SharePoint site bin directory and load your application page in the browser. You can also register your assembly in the GAC, but using the bin directory method is easier when developing.

    SafeControl!

    You will most probably see an error message like this:

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: The base type 'HelloWorld2.HelloWorld2Page' is not allowed for this page. The type is not registered as safe.

    To fix this you have to mark your DLL as Safe in the web.config, like this under the SafeControls element:

    SafeControl

    Reload again. Tada…

    Hello World

    From here I hope you can continue on your own and make some really neat stuff with SharePoint.

  • The simplest form of SharePoint application

    Tags: SharePoint

    Recent discussions in the SharePoint forums led me to write this article on how to create the simplest form of SharePoint applications without using Visual Studio and only SharePoint Designer.

    Just follow these simple steps to create your own Hello World application in a .aspx hosted in a SharePoint document library.

    Create the document library

    First of all we need somewhere to host our applications; create a new Document Library, I called it Applications, and set the default template to either Basic Page or Web Part Page. This sample uses the Basic Page as template.

    Default template

    Create the application page

    Now we need a .aspx page to host our small Hello World. Create it by creating a new Basic Page in the document library you just created.

    Hello World

    This will give you a simple page in which you can write in some rich content. Do that if you like, we will soon remove it…

    Open SharePoint Designer

    Now fire up SharePoint Designer and open up your site. In the folder list you will find your document library (Applications) and your application page (HelloWorld.aspx).

    The folder list

    Now open up HelloWorld.aspx and view the source. Remove the WebPartZone in the ContentPlaceHolder called PlaceHolderMain, so it looks like this.

    WebPartZone removed

    Create a standard asp:Label control in the table cell.

    <table cellpadding="4" cellspacing="0" border="0" width="100%">
      <tr valign="top">
        <td width="100%">
          lgt;asp:Label runat="server" ID="label1"/>
        </td>
      </tr>
    </table>

    Now we have a control and we need to fill it with something. Here we do it in the Page_Load by writing some C# script code like this:

    <script runat="server"> void Page_load(object sender, EventArgs e)
     {
     label1.Text = "Hello world";
    }
    </script>

    I placed this code inside the PlaceHolderMain place holder.

    Save the file and view it in the browser.

    Most certainly you will see an error like this:

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Code blocks are not allowed in this file. Source Error:

    This is resolved by changing the web.config. Under PageParserPaths add a new PageParserPath element which points to you Applications library like this:

    <PageParserPath VirtualPath="/lt/Applications/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />

    Reload your browser and you will see your Hello World text.

    Hello World

    This was the simplest form of application page for SharePoint and you can of course make it even more advanced. If you want your code placed in a code behind file, just inherit from the Microsoft.SharePoint.WebPartPages.WebPartPage class and create your own code behind.

    Warning: Due to criticism on me posting this sample I have to provide a warning. The intention of this post is only to show that you can use code blocks in your SharePoint application and not to show you that it is the best way. By enabling code blocks in a library you open up for "evil" code to be uploaded to your SharePoint site and you might jeopardize security and stability of your SharePoint installation. For a more secure and reliable scenario look at this follow up post.

  • SharePoint licensing on internet facing sites

    Tags: SharePoint

    Emma Healy of Emma Explains Microsoft Licensing in Detail has written a post on how to calculate what Microsoft Office SharePoint Server 2007 license you should use for your public facing/extranet MOSS site.

    The post has a flow chart to aid you in your decision to choose a MOSS for Internet Sites license (expensive!) or CALS (less expensive). To sum it up you should use the MOSS FIS if you have more than 435 users when using MOSS Standard or more than 242 users when using MOSS Enterprise.

    Note; if you are making a web site with MOSS for an unknown amount of (anonymous) users, your only way is to go for the MOSS FIS license.

    I only whish that there was some license in between for small businesses or a version of MOSS with only the publishing features.

  • Custom List Columns and List Content Types

    Tags: SharePoint

    When using Lists with Content Types enabled and you have your custom columns there are some things to remember, such as the custom columns are not part of the list content type items until you configure it so.

    For example; when you add a custom column to your list you have to option to add your column to all content types.

    Add to all content types Used in

    As you can see from the image above to the right, the Test column is present in two content types and Test2 in none.

    If you at a later stage decide to add a new content type, your custom columns will not be added to the content type.

    You have to manually configure the content type of the list, not the site content type definition, and add the column. Modify the list content type from the list settings and choose Add from existing site or list columns.

    Add from existing site or list columns

    Technorati tags: ,

  • How to say goodbye to your file server

    Tags: Business, SharePoint

    Files Everyone, every company, small or large has some kind of file server for storage of documents and other files. The file server are in many cases the heart of the operations. Some have several file servers and some have even more. Almost every file server looks the same; some kind of shared folder with subfolders (in absurdum). Most of these file servers uses file/directory permissions to have control over who are allowed to view or edit the files. Most often this is configured through groups, but far to often permissions are set on user accounts directly.

    This way of having the files “organized” is so stone-age, you will only run into trouble and these are some of the common problems with using a traditional file server:

    • Overview of the permissions is hard
    • Restoring a deleted file requires you to pull out a backup tape
    • Finding a file is time consuming and most often impossible
    • …and so on

    I will try to show you how you can solve most of these problems and move in to a whole new world and experience in document/file management.

    First we start with how you can help your users find the files easier.

    Search

    Information Workers spend about 20-30% of their time searching for documents or recreating missing information. Wow, that’s an awful amount of time. What if I could find my documents easier!

    Improving the search possibilities for your file servers is by far the easiest and fastest way to improve your current file servers. By allowing your users to search for files, you will save them (and your company) time, you will make them happier and you will get one step closer to a more efficient document/file management system.

    Microsoft Search Server 2008 Express, MSSX, is a great piece of software that will allow you to index you file servers in just a few hours, without any cost! All you need to do is to download it, install it and configure it to crawl your file servers.

    MSSX is based on Microsoft Windows SharePoint Services 3.0 and is free of charge (but limited to one index server). It has a simple user interface and an incredible search engine (same as in Microsoft Office SharePoint Server 2007). As soon as you have had it to crawl your files you can create a link from or frame it in your current Intranet or portal and show your co-workers how to use it. They will immediately be able to search for the files they need (with ranking and everything) and you will be the Hero of the day.

    When I have suggested this solution to our clients the first question I have received is – we have tried it and it didn’t work for us since they could find all documents, including the ones they do not have permissions on. This is not true with Microsoft Search Server 2008. Companies who tried this most often used an application built on the Microsoft Index Server which did not have a security control in the search results – but MSS(X) has, so they will only see documents they are allowed to see.

    Once you’re setup you should install filters for PDF files and others so all of your files gets crawled by content.

    All this just takes a couple of hours and does not require and advanced skills and have a huge impact on your file management experience.

    Search Server 2008 has, of course, numerous of optimization options for which you should consult your consultant. Trimming MSSX allows you to even more enhance the search results and gives you the opportunity to help your users find the correct information. But beware, trimming it the wrong way can severely impact the results in a negative way.

    If you do this, you have a really good search application which uses your current file structure and your users does not have to change their behavior and you have not made any changes to your infrastructure. But that’s what I’m going to talk about next time – really trying to help you say goodbye to your file servers.

    Technorati tags: , , ,

  • Windows 7 Notification Area

    Tags: PDC 08, Windows 7

    I noticed some interesting stuff on some “leaked” screenshots from Windows 7 (M3) – there are some changes going on in the lower right corner.

    Windows 7 M3 Notification Area

    I can see a couple of changes that draws my attention.

    “Hidden icons” icon

    The icon you can click on to show the hidden icons in the notification area has changed. Is it more than this? By the looks of the icon my guess is that it is more than just showing the hidden ones.

    The spacing to the right

    The thing that looks most interesting is the space to the right of the Notification Area, to the right of the clock. What is this? Anybody? Does it belong to the Notification Area or is it something new to the Taskbar in general?

    New icons

    New icons for battery, network and audio. Nothing new about this. The graphic elements always changes…

    Icon spacing!

    What really looks annoying is the spacing between the icons! Already today I think there is a waste of space down there between the system icons and the application icons. Now it seems like there will be even more spacing between all of the icons. Hey Windows 7 team, pull your strings together and tighten the icons a bit or at least make it customizable.

    The Engineering Windows 7 blog recently posted an article about the user interface and Taskbar in particular. Not much is said about the Notification Area except that they are trying to make it “less noisy and something more controllable by the end-user”.

    PDC 08 is only a few weeks away and I think I will get my answers then. See ya’ll in Los Angeles.

    Technorati tags: ,

  • In defense of User Account Control

    Tags: Security, Windows Vista

    Everybody has something to say about Windows Vista, good and bad. Most often I hear complaints and especially on the User Account Control. Today the Swedish IDG website had an article about the 10 most annoying things with Vista and how to solve them, and of course one of them was about the poor UAC.

    I must say, and I have been using Vista since before RTM, and only found the UAC annoying during the first few days, when installing the machine. Since then I barely notices it – and if I do, I know why and I can feel more safe using my machine.

    UAC

    Why UAC?

    The User Account Control was not thrown into Vista just to cause warning dialogs whenever you do something that you should be careful about. It is put there to make you aware of that you or an application is making changes to something that may have an effect on your machines configuration and/or security.

    During your initial installation and configuration phase with your Vista machine this may of course be annoying since you are doing a lot of installs and configurations, but during normal usage you should not see it at all. I see the UAC dialog about twice a day on my laptop which I use for developing and this is when I start the necessary services (like SQL Server, which I have set to manual startup) and when I start Visual Studio for doing SharePoint development (I have installed WSS on my Vista). Then once in a while UAC is shown when I install/uninstall some new applications. At home on Media Center I have not seen it in ages.

    I’ll just turn it off

    Most Vista UAC tips and tweaks states that you should turn the UAC off and so did the article I referred to. This is a completely working solution – but I do not think that it is any good solution! Anyone recommending this solution should immediately quit their jobs and do something else.

    We Windows users have had some rough years prior to Vista with viruses, Trojans and worms infecting Windows machines due to bugs in applications and uncareful clicking on mail attachments. Recommend to turn it off will set us back a few years…but it’s up to you.

    Running all programs as administrator is just plain dumb. What other modern operating systems are recommended to run as administrator or root?

    The UAC is designed to be annoying

    Yes it is! If it wasn’t annoying then you wouldn't notice it – and it would not make any sense having it. The UAC is not designed for power users, it is mainly designed for normal Vista users, like my mother for example. I have previously helped her with removing stuff from her machine that she had no idea that she installed. Now with Vista and UAC I have not had the “pleasure” of that.

    As a power user, who often tries new programs, I will be aware of when a program tries to write to the system folders or registry and I can allow or disallow it.

    I think UAC is here to stay. Hopefully Windows 7 may contain some tweaks to make it more responsive, since starting the Task Manager with elevated privileges during a 100% CPU usage really sucks.

AWS Tracker

About Wictor...

Wictor Wilén is a Director and SharePoint Architect working at Connecta AB. Wictor has achieved the Microsoft Certified Architect (MCA) - SharePoint 2010, Microsoft Certified Solutions Master (MCSM) - SharePoint  and Microsoft Certified Master (MCM) - SharePoint 2010 certifications. He has also been awarded Microsoft Most Valuable Professional (MVP) for four consecutive years.

And a word from our sponsors...

SharePoint 2010 Web Parts in Action