In standard Windows, you can double click the system menu for any window to close the window fast. However with the new Office 2007, there isn't a visible system menu anymore. Instead, Office 2007 uses custom drawn window with the system menu replaced with a huge Office logo button on the top left.

At first I thought the Office button was its own beast and so I would go Office > Close to close the window. However, yesterday I got tired of how long this 2 step process takes and decided to try double clicking the button to see what happens. Lo and behold, my window closed!

So there you have it, double click the Office Logo button to close your Office 2007 application in one swoop.

 

Whenever an application asks you to save a file somewhere, you get a window that looks something like this in Vista:

 

Notice the Favorite Links on the left hand side. This is similar to the Places Bar in the save dialog in Windows 2000/XP:

 

In Windows 2000/XP, it was difficult to customize this list of shortcuts. You would have to hack some registry settings or do it programmatically. Luckily in Vista, they made it much easier to customize this list.

All you have to do is add a shortcut to the C:\Users\[username]\Links folder!

 

I download files frequently, so i usually put them in a Downloads folder. So to make it easier to save files, I added a shortcut to the Downloads folder. Now whenever I need to save a downloaded file, I can click on my new shortcut!

 

This also customizes the Favorite Links in Windows Explorer as well. So when you browse for files on your computer, the shortcut will also appear there!

 

 

In the first part of this article, I discussed how to use the simple Blocked file types feature to provide some basic security protection. Although this feature makes it very simple to provide some security, in the long run it does not provide a complete solution to protecting your servers. In this post, I will focus on SharePoint's second line of defense: built in Antivirus support.

Setup

If you look in Operations, Security Configuration, you can find the Antivirus feature.

 

If you check the Scan options here without actually installing an antivirus program, SharePoint will do nothing. This is a very bad design. Instead of gladly accepting the changes, SharePoint should let the user know that no antivirus application is installed and that these options will not do anything. An unsuspecting SharePoint admin who does not know this behavior will get a false sense of security, leading to big problems down the road.

So what SharePoint actually provides is not built in antivirus scanning, but the support to plugin your own antivirus software. Luckily for us, Microsoft recently released a beta version of the Forefront product line for SharePoint called Forefront Security for SharePoint. You might recognize the Forefront name associated with Exchange server. Now there's a version for SharePoint. This software will not only allow us to scan for viruses using multiple scanning systems, but also scan for malware!

So to actually enable antivirus scanning on your SharePoint server, the first thing you will need to do is install Forefront for SharePoint (or any other antivirus program that supports SharePoint). As you can see, Forefront's setup is really simple:

 

Once you install Forefront, the next thing you want to do is make sure it is configured properly. Use the Forefront Server Security Administrator console to configure Forefront:

 

As you can see, Forefront provides many options so it may seem daunting at first. Still it is a good idea that you review all the options to make sure you didn't miss anything.

And finally, don't forget the last step: once you've installed your antivirus scanning program, in this case Forefront, make sure to enable the scan options in SharePoint to enable scanning.

That's all you'll need to do to setup your server for antivirus protection! Can't get any simpler than this!

 

Scanning

Now let's say you want to manually scan your SharePoint installation. In the Security Administrator console, just go to the Operate section and click on the Quick Scan option. Select the sites you want to scan and hit the Start button.

 

So on Monday, Bob from Sales gets a "contract" document from a potential customer. Being the awesome team player, Bob immediately uploads the file to SharePoint to get feedback from his other team members. Uh-oh... looks like there's something wrong with the file. SharePoint shows this page when a virus is detected with an uploaded file:

 

Note that I did not really upload a virus onto our SharePoint server. My virus is just a "test" virus.

While the benefits of installing an antivirus solution into SharePoint is clear, what tradeoffs exist with having antivirus enabled? After installing Forefront, I noticed the following behavior with SharePoint:

  • Forefront takes a significant chunk of memory on the server.
  • Downloading files will takes longer.

Hopefully some of these issues is because Forefront is still in beta. Whether these tradeoffs are acceptable or not depends on your organization and your security needs. Personally I feel the need for security and protection against a virus aftermath far outweighs these tradeoffs.

So that's a quick walkthrough of antivirus support with SharePoint, more specifically the Microsoft Forefront product. As you can see, adding antivirus support into SharePoint is fairly simple, and takes security on your server to a whole new level. Combining Blocked file types along with antivirus support provides a comprehensive security protection plan for your SharePoint server to protect against those miscreants out there.

 

Everyone can agree that SharePoint is a great platform to facilitate collaboration amongst team members. One of the main benefits of collaborating using SharePoint is working on documents together with your team. The workflow for collaborating on documents is something like this:
  1. Create the document and edit initial draft.
  2. Upload to SharePoint document library.
  3. Send email to colleagues on document location.
  4. Reviewers provide feedback and update the document as needed.

All this is great, but in the world that we live in, security is an important issue to consider, even amongst your team mates. Of course we all trust the people we work with, but sometimes there are just bad apples out there.

In the steps mentioned above, step 2 is where trouble can come in. Once a bad file is uploaded onto SharePoint, unknowing colleagues that download the document will catch the cold and spread the disease. This becomes an even bigger problem if SharePoint is configured for extranet access where people outside of the network without the same security restrictions can upload files.

So ignoring my dramatic example, what facilities does SharePoint provide to help prevent such security breaches? The good news is that SharePoint has 2 built in features that will help with this:

  • Blocked file types
  • Antivirus

These are 2 broad features, that I will split the discussion of into 2 posts: this post will discuss the Blocked file types while my next post will describe the Antivirus support.

Both of these are configured through the Operations tab in Central Administration.

 

If you click the Blocked file types link, this will bring you to the configuration page where you can edit the list of file types not allowed on your SharePoint server.

 

So what does Blocked file types do? Blocked file types is a simple method of allowing only certain file types to be uploaded onto SharePoint. While this doesn't completely prevent files with viruses from being uploaded, it makes it less likely that a user will unknowingly click on such files and infect his own machine. For example, EXE files are by default a part of the blocked file list and cannot be uploaded directly. SharePoint responds to EXE uploads with the following message:

 

If an EXE file named "2006 Budget.exe" was uploaded onto SharePoint, the company financial officer may not notice the EXE and accidentally click on the file, thus executing the rogue application causing havok on his machine.

However, a malicious user could simple rename the file "2006 Budget.exe.xls", which would bypass SharePoint's file extension check and allow the file to be uploaded. Although the file uploaded is actually an EXE, the file extension is what determines how a file is executed. So instead of running the EXE directly, Excel will attempt to open the file and thankfully fail since it is not a recognized format.

 

Still, having an EXE on your server is not something IT will like. Who knows, the next day, someone may find an exploit within SharePoint that lets any process to run. When that day comes, you don't want to be around!

So as you can see, Blocked file types allows for a simple way to mitigate some the risk of uploading rogue files. As I mentioned, even though the risk is somewhat less, rogue files can still be uploaded onto the server. If some other server-side security hole is found, the rogue file on the server can potentially cause problems on the server, leading to even more security problems and potentially loss of data. That is how the other security feature of SharePoint comes into play which I will elaborate more on in the second part of this post.

 

A question came up last week in what permissions does the account that SharePoint uses to connect to SQL need. Unfortunatey I couldn't find the answer to this after doing some internet searches so I just decided to give it a try and see.

After installing MOSS 2007, setup will bring up the SharePoint Products and Technologies Configuration Wizard. Essentially this wizard creates the Central Administration site so you can setup the rest of your MOSS installation.

Obviously the first security check is to make sure your user account running setup has permissions on the database server to create new databases. The wizard to create the Central Administration site will be running in your user account context to create the database so you have to at least have permissions to create a new database. Your user account should also have permissions to create a new IIS site, but since this post is about the database, I'll leave that topic for a future post.

Second user account you have to consider is the user account you specified in the wizard that SharePoint uses to connect to the database. SharePoint will be using this account not only to read and write to existing databases, it will also use this account to create new databases when you create a new SharePoint web application. Therefore a simple datareader or datawriter role is not enough.

Turns out the wizard will take care of adding the user you specified into SQL Server and then assigning the necessary server role. In my test install, it looks like SharePoint requires the dbcreator and the securityadmin server role for the user account.

Down to the security for the specific database, the user account is granted db_owner permissions.

Another note on picking the user account for SharePoint to use to access the database, if you are doing a multi-server installation of SharePoint, make sure to use a domain account. You could also create a shadow account, but that is not a recommended way of installation.

with 6 Comments

I'm running Outlook 2007 Beta 2 Technical Refresh on my desktop. Just now I got a reminder for a meeting, so as usual, I set Outlook to remind me 5 minutes before the meeting starts. I wasn't ready for Outlook's response:

 

Followed by this:

 

Well OK then Outlook. How about I just dismiss the reminder? Nope:

 

Please Outlook! I'm begging you! 

with 7 Comments

Does your SharePoint My Site show your domain username instead of your full name? We noticed this behavior during our test installation of Microsoft Office SharePoint Server 2007 Beta 2 Technical Refresh. After tesing out different theories of why this was happening, we realized that the reason for this is because the identity of the application pool for the SharePoint site was using a local machine account instead of a domain account. Since the account was a local machine account, it doesn't have permissions to look up your user account information in the domain Active Directory... makes sense.

So the solution to this problem is to change the identity of the application pool. In order to do this, you will need to go to your SharePoint Central Administration page. Click the Service accounts option under the Security Configuration section.

 

In the Service Accounts page, change the Credential Management radio button to Web application pool. In the drop down, select Windows SharePoint Services Web Application. In the Application pool drop down, select the application pool you want to change the identity of.

 

Now the bottom controls should be enabled to allow you to change the identity of the application pool.

 

Once you're done entering in the user account and click OK, SharePoint will alert you to run IISRESET in order for the changes to take effect.

 

Once you run IISRESET /noforce, your app pool should now be running under the new identity. If you are in doubt, check Task Manager on the server and you should see the w3wp.exe process running with the new identity.

 

Also a warning, don't change the application pool user account through IIS Manager. If you do so, SharePoint's configuration will not be in sync with the app pool's identity and may also cause your web site to fail to load. I got this warning message in Event Viewer:

The identity of application pool 'SharePoint - 80' is invalid, so the World Wide Web Publishing Service can not create a worker process to serve the application pool. Therefore, the application pool has been disabled.

followed by this error message:

A failure was encountered while launching the process serving application pool 'SharePoint - 80'. The application pool has been disabled.

Just a heads up to everyone thinking about installing Office 2007 Beta 2 Technical Refresh (B2TR), the download is a patch and not a full install. This mean you must have Office 2007 Beta 2 installed before patching to B2TR.

Our local guinea pig, Adrian, (just kidding ) uninstalled Office 2007 before installing B2TR and he encountered this error dialog:

This blog post on the SharePoint team blog announced this particular update process, but it wasn't clear from the post whether this happens for all Office 2007 Beta 2 products or just SharePoint. I just wish the download link for B2TR was clearer about this.

I've always found it difficult to remember where all the folders SharePoint uses are and what each folder is used for. So here's my attempt to consolidate this information in one post for easy reference. This post assumes default folder locations. Obviously if you customized anything, then you're on your own.

 

WSS/SharePoint Server Program Folder

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12

C:\Program Files\Microsoft Office Servers\12.0 (not sure about this)

This is where most of the program files for SharePoint live.

 

WSS/SharePoint Binaries

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

This contains the executable binaries used with SharePoint. For example, stsadm.exe and the WSS Timer service, owstimer.exe, is located here.

 

WSS/SharePoint Server Assemblies, ASPX, ASMX

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI

Contains most of the ASPX (ASP.NET Web Forms) and ASMX (ASP.NET Web Services) files of SharePoint. Also if you are writing code that uses the SharePoint assemblies (ie. Microsoft.SharePoint.dll, Microsoft.SharePoint.Server.dll, ...), then the assemblies you need are located in this folder.

 

SharePoint Logs

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS

SharePoint told you to check the logs? This is where you can find the raw log files.

 

SharePoint Site Features

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES

Looks like this is where all the SharePoint Features metadata is stored.

 

Site Layout Template

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS

This is the folder where the virtualized _layouts path for each site URL is located. Add additional files in here to have it be available to all sites.

 

SharePoint Setup Cache

C:\Program Files\Common Files\Microsoft Shared\SERVER12\Server Setup Controller

Looks like this is where SharePoint Setup stores the setup configuration. If you have Office installed as well, then this folder is also used for them.

 

Web Application Virtual Directories

C:\Inetpub\wwwroot\wss\VirtualDirectories

The folder where your SharePoint web applications point to.

 

Web Application web.config

C:\Inetpub\wwwroot\wss\VirtualDirectories\[web application]\web.config

Need to customize the web.config for a particular web application? This is the web.config that you want to edit. Replace [web application] to your web application first of course.

 

Install Web Parts per Web Application in here

C:\Inetpub\wwwroot\wss\VirtualDirectories\[web application]\_app_bin

Additional assemblies (ie. custom web parts) are installed here on a per web application basis. You can also install Web Parts to the GAC as well to be accessible in all web applications on the server.

 

This post compliments my post on SharePoint 2007's registry locations.

If anyone knows of any other interesting folder locations, let me know so I can add them here.

The new Start Menu in Vista features a power button next to the Search bar. What do you think will happen when you click the power button? Since it's the power button, you would expect it to shut down the computer right? Well too bad that's not the default behavior. Instead, by default the power button is configured to go on standby when you click the power button. Um.. is it just me or does that just not make sense?

I realize Microsoft's goal is to make computing more like a home appliance: shutdown really means standby so you can start up your computer immediately (just like you startup your TV immediately). Personally I use my hardware buttons to make my computer go into Standby, and then use the Start Menu's power button to shut down Windows. So as you can probably guess, I hate how the power button doesn't shutdown my computer anymore. Plus also old habits die hard.

So if you want to change this, you'll have to do the following.

First you'll need to go to the Power Options. This is easier said than done. If you are using the categorized Control Panel, you can get to it by going:

Control Panel > Hardware and Sound > Change battery settings

and no, Change what the power buttons do does not work. That changes what happens with your physical power buttons, not the Start menu power button.

If you have the Classic View control panel, go this path:

Control Panel > Power Options

Next follow this path, which is the same for both Control Panel styles:

Change plan settings under Balanced > Change advanced power settings > expand Power buttons and lid > expand Start menu power button

and from here you can finally change this configuration. Yes, that is a total of 7 clicks just to change the power button configuration! If you didn't follow those steps, take a look at this series of screenshots:







Is it just me or did Microsoft make this REALLY complex to change? I had to dig around for 5 minutes before I finally found this!

And to make matters worse, remember earlier we selected the Balance power plan? Well these settings are per plan. That means if you change your plan, the Power button gets reset to Standby again! You'll have to individually configure each Power plan to make the power button be the same for all plans. Why can't we have a "Override all power plan" option? What a pain!

One last thing to notice, check out the first Start menu, and then this Start menu:

See anything different? The new Start menu now shows the power button as red instead of the original yellowish color. This is the visual cue that the power button now means Shutdown (red) instead of Standby (yellow). Personally I would prefer if the tooltip would just immediately popped up when the mouse hovers over the button and simplify the message to "Shutdown" instead of "Closes all open programs, shuts down Windows, and then turns off your computer" or "Standby" instead of "Keeps your session in memory and puts the computer in a low-power state so that you can quickly resume working." Geez what a mouthfull!

 

I just found an interesting bug in Firefox v1.5.0.6 when running in Vista RC1.

If you delete all your bookmarks in your Bookmark Toolbar, the display/browser area of Firefox goes crazy and twitches up and down. Only when you add something back into the Bookmark Toolbar does it stop twitching. Check out this animated gif of this behavior:

I know it's hard to see, but the twitching motion just keeps going and is very fast. The twitching happens to all Firefox windows with the Bookmark toolbar visible. I don't think anything bad happens, it just gets annoying after the first 5 seconds of finding it funny.

The 2 ways I found to fix this is to:

  1. Add something back into your Bookmarks Toolbar .. or ...
  2. Remove the Bookmarks Toolbar.

I guess it's bugs like these why the Mozilla team has accepted Microsoft's invitation to help make sure Firefox works on Vista. Other than this weird twitching, I haven't noticed any other problems running Firefox on Vista.

Another in my series of Vista posts. Ever found it annoying when you rename a file in Windows Explorer the default selection is the entire file: filename and extension? Like this:

I just found out Vista took a page from the GNOME book and finally changed this behavior. Vista now does the same thing as GNOME: selects the file name without the file extension!

Of course the same thing happens when you create a new file as well.

 

Great stuff!

with 9 Comments

Wondering where SharePoint 2007 lives in the registry? Probably not, but here you go anyways.

Windows SharePoint Services (WSS) 3.0 is:

HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\

Microsoft Office SharePoint Server (MOSS) 2007 is:

HKLM\SOFTWARE\Microsoft\Office Server\12.0\

The usual warnings of the registry apply. You edit the registry at your own risk. I will not be held responsible for any actions you take with your registry settings!

Warnings aside, it's pretty interesting to see what goes on under the covers!

with 2 Comments

I recently had to move a site collection from one MOSS 2007 Beta 2 server to a VPC for archiving purposes. Even though SharePoint now has an easy way to backup/restore through Central Admin, I found the easiest way to get everything working with control over the process was through the command line admin tool provided by SharePoint: stsadm.exe.

Before running these commands, make sure the SharePoint bin directory is in your path. The SharePoint bin directory is by default located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN.

To back up a site collection, run this command:

stsadm -o backup -url <url> -filename <filename>

where <url> is the url of your site collection and <filename> is the file you want to backup to.

To restore the site collection, run this command:

stsadm -o restore -url <url> -filename <filename> -overwrite

where <url> is the url you want to restore the backup into and <filename> is the backup file.

The -overwrite flag is used to overwrite the existing site if it already exists. However be careful that you don't overwrite an existing working site. You can always run the restore first without the -overwrite flag to determine if you need the overwrite flag. The command will let you know if an existing site is already located at the url you specified. During my testing, I restored a site in the wrong place with the overwrite flag completely killing the original site. Thankfully I backed up everything before I made any changes.

One thing to watch out for when you restore onto a different server is the security. During my first attempt, my user account was not admin of the site collection. Backup went without any problems, but restoring would fail midstream. Turns out the restore process restored the original security permissions to the site. Once authorization kicked in, my account failed the security check causing the entire restore process to fail with a half restored site. If this happens to you, edit the existing site so that you have the needed permissions to perform the backup/restore, then backup/restore again.

Another tip when using the stsadm command is to make sure you review exactly what data is being backed up. Remember the command backs up only the site collection, so anything outside of the site collection scope is not included. Typical data outside of the site collection that still may effect your site include:

  • Application settings in Central Admin
  • Shared Services settings (search scopes, audiences, excel services, ...)
  • Sub site collections

The last bullet is important to watch out for as I later found out that my original backup didn't include any sub site collections. Turns out personal sites (My Site for each user account) are sub site collections of the main site collection. If you just backup the main site collection for personal sites, this does not include any data of the sub site collections. You will have to backup those individually.

Here's what a window looks like in Vista when it's Not Responding:

Here's what the window looks like when it is running properly:

Pretty neat effect indicating a broken window, unlike XP's half drawn window. What would be even better, is if it actually drew a crack as if it really IS a broken window!

I noticed with the crashing version of the window is there actually is a menu and window title associated with the window. Why does Vista hide this leaving just empty space in the normal running Explorer?

with 5 Comments

Being the nerd that I am, instead of spending Labor Day weekend grilling hot dogs, I spent my weekend installing Vista RC1 on my laptop (IBM/Lenovo Thinkpad T60 2623-D7U).

Similar to Scott's experience, my installation went smooth as well. Aero worked out of the box. I was able to get a WEI score of 4.0 (sorry Scott, but my laptop pwned yours ). I also couldn't get audio to work out of the box.

And for those who don't have a chance to try out the new build yet, here's a visual walkthrough of the installation on my laptop.

Choose your language:


Let's do it!


Usual enter your key. Unlike XP, this is the 3rd dialog in Vista!


Do you agree?


Custom installation!


Select your parition.


Installing...


Reboot... please wait.


More installing...


Your name and picture.


What is the name of your computer?


Secure computing, Microsoft's way!


Select your time zone and your time


You're welcome!


More waiting and more installing...


Yay! Finally at the login screen!


The anticipation builds...


Woohoo! Done!


 

After installing Windows XP for the past 5 years, the Vista setup visually seems light years ahead. Contrary to XP's NT-like setup process (DOS phase, copy files, then Windows phase), Vista has a complete GUI setup experience. Unfortunately the much touted image setup process didn't improve much on the time it takes to install. It took me 40 minutes from the first picture I took above up to when I finally was able to use my computer. A little shorter than XP's installation time, but not by much.

One thing I noticed with Vista's setup that I found very annoying is the lack of any status indicator. Everything is abstracted with generic messages like "Installing features" or "Please wait a moment while Windows prepares to start for the first time..." with the dots going on and on. Instead of endless dots (or endless rotations of an animated circle), I would much prefer to see which files are being copied or at least a progress bar to show how much is left of the install. How about a time estimate like XP's setup?

While I understand Microsoft is trying to make everything more user friendly, I doubt most home users would be performing Windows setup anyways. I know from personal experience, most friends/family call me up if they have any trouble with their computer and I usually end up reinstalling Windows for them if needed. Therefore, why make setup so abstract like this? Give us some status! At least it gives us something to look at while we sit around for 40 minutes. I sure hope RTM will not be this abstract.

Well that's it for setup. Hope you enjoyed this visual walkthrough!

with 5 Comments

One of the more useful features in the next SharePoint is the ability to take data with you offline. So many times in the past I had to meet with a client in their office so the day before I would download all my documents stored in SharePoint one by one. What a pain! Now with MOSS 2007, I can do it all in one click!

Extranet access is one possible way to avoid the need to download local copies, but you still have the problem of needing an internet connection. Being at the client site, sometimes IT security makes it a big pain to get internet access (ie. have to get permission, need to authorize the machine, dynamic or static ip, WEP/WPA key, ...). There are so many other things you have to worry about, why deal with another issue?

So how do you do it? Very easy! Just go to the document library you want to access offline, click the Actions menu and click Connect to Outlook:

Outlook then will ask you whether you want to connect to the list or not. The first time I tried this I wasn't prompted with the dialog, while the second time I saw this screen:

Once you confirm OK, Outlook will create a new SharePoint Lists folder and download the documents to that folder.



What happens when you update your document library with new documents? Outlook will detect the new documents once you refresh the folder, but will not automatically download them.

You can selectively download individual files you want or hit the Send/Receive button to download all the documents. Unfortunately Send/Receive button did not work reliably for me: sometimes it would work, other times nothing would happen. Hopefully this is just a Beta 2 bug.

So what can be linked for offline Outlook access? A quick review of all the lists and documents on my personal site, I found these linkable to Outlook:

  • Calendars
  • Contacts
  • Data Connection Libraries
  • Discussions
  • Document Libraries
  • Form Libraries
  • Picture Libraries
  • Project Tasks
  • Tasks
  • Wiki Pages

These items can also be linked for offline access, but they go through Access instead of Outlook:

  • Announcements
  • Issue Tracking
  • Links
  • Lists
  • Surveys

That's quite a list of data you can suck on your laptop before a client meeting!

 

with 4 Comments

There are plenty of guides out there detailing how to create a new Windows SharePoint Services v3 web part, so I won't write another one here. Those walkthroughs are great, but sometimes I just want a quick outline of the steps needed to get things done. So while creating my own web part, I kept track of the steps and created my own simple outline. Here it for your use:

  1. Create the Web Part
    1. Create the DLL project in VS2005.
    2. Add Reference to System.Web.dll.
    3. Create a new Class file, inherit from System.Web.UI.WebControl.WebParts.
    4. Override the Render method and use writer to output the content of the web part.
    5. Strong name the assembly if installing to GAC.
    6. Compile.
  2. Deploy Web Part (updated 11/2/06 with B2TR)
    1. For strong named assemblies, follow these steps:
      1. Copy your assemblies to the C:\Inetpub\wwwroot\wss\VirtualDirectories\[site directory guid]\bin folder or install to the GAC. Note assemblies in the \bin folder have less priviledges than those in the GAC. Test your web part to make sure there aren't any security problems.
      2. Modify the site's web.config and add a <SafeControl> entry. Should look something like:
        <SafeControl Assembly="[Web_Part_Assembly_Name], Version=[Version_Number], Culture=neutral, PublicKeyToken=[Public_Key]" Namespace="[Namespace]" TypeName="[Class_Name]" Safe="True" />
    2. For non-strong named assemblies, follow these steps: 
      1. Copy your assemblies to C:\Inetpub\wwwroot\wss\VirtualDirectories\[site directory guid]\bin folder.
      2. Modify the site's web.config and add a <SafeControl> entry. Should look something like:
        <SafeControl Assembly="[Web_Part_Assembly_Name]" Namespace="[Namespace]" TypeName="[Class_Name]" Safe="True" />
  3. Configure the Web Part in SharePoint
    1. Go to Site Settings, Galleries, Web Parts, click New.
    2. Select your web part and click Populate Gallery button. Make sure the web part now shows up in the web parts gallery. If the web part doesn't show up in the list of New Web Parts, may need to iisreset.
  4. Edit a page and add your web part in from the Gallery.

Note that these steps are for WSS v3 Beta 2. These steps may change at RTM. I'll try to keep this up to date if things change.

For more detailed walkthroughs of how to create ASP.NET 2.0 style web parts for WSS v3, here are some resources/links:

with 5 Comments

Lately, I've been playing around quite a bit with the next version of SharePoint coming out with Office 2007 so I thought I'd share some thoughts/comments on my experience.

First of all, note the name change yet again:

  • Version 1: SharePoint Team Services
  • Version 2: Windows Sharepoint Services (WSS) Version 2 and SharePoint Portal Server (SPS) 2003
  • Version 3: Windows Sharepoint Services (WSS) Version 3 and Microsoft Office Sharepoint Server (MOSS) 2007

While I understand the reasoning behind the name change, cmon guys.. stick with a name already!

There has been a ton of architectural changes between 2003 and 2007. Here are some highlights:

  • Now built on top of ASP.NET 2.0 and leveraging many of the new features such as Web Parts and Master Pages.
  • Sharepoint truly acts as an ASP.NET web application, no more ISAPI handlers. Instead Sharepoint uses ASP.NET HttpHandlers.
  • Flexible authentication! Building on top of the provider model of ASP.NET 2.0, Sharepoint now supports pluggable authentication providers!

Some more exciting changes from the admin perspective:

  • Everything is now a site. No more weird distinction between sites and portals.
  • Built in recycle bin. Now the user can undelete their own files without having to call you up to restore from backup!
  • 3-tier administrative interface. At first this was confusing to me, but after reading about it some more... now it makes sense.

 And finally some changes from the user's perspective:

  • Much better My Site with support for blogs!
  • Nearly everything supports RSS feeds.
  • Any list can be opened up in Outlook, which creates a locally cached copy of the list.
  • Tabbed interface, drop down menus, Ajax data retrieval.

I really can't emphasize how many new features they've packed into the new Sharepoint. My list of features here are just some of the more interesting changes I've learned these past few days. I can easily see tons of books written for this release filling up an entire bookshelf at the bookstore.

I love most of the changes Microsoft made to Sharepoint, but unfortunately tons of new features come at a price: confusing UI. Version 2 was really confusing. In version 3, things are a bit easier with some of the UI improvements, but I still find myself hunting down the location for a setting or trying to remember where I configured an option. I hope the road to RTM includes some more time to review the user experience and to improve on some of the more confusing aspects (just looking at the Admin screen and all those links gives me a headache!). Otherwise, I am really excited about the new SharepPoint and can't wait to see it released!

 

with 6 Comments

Microsoft released the Windows Live Writer last Friday. After my disappointment with Word 2007's blog addin, I decided to give Live Writer a try. Will the impressive feature list win me over? Keep reading to find out!

I won't go over the features as the homepage does a good job describing each of them. Instead I'll just share my experience in setting up the client and then writing and publishing this post from the client to Vertigo Blogs (Community Server 1.1), assuming it works ;).

Installation and Setup

After installing the application, I was prompted with the usual account setup screen:

Since I'm not posting to Live Spaces, click Next.

I'm posting to Vertigo Blogs, so Another weblog service.

Now you have to enter in your blog information. This screen tries to scan your blog for the correct xmlrpc location, but if it can't find it, the next screen shows up.

The usual select a blog screen. Surprisingly Microsoft has provided an extensive list of blog engines here: Windows Live Spaces, Wordpress.com, TypePad, Blogger, LiveJournal, Movable Type, WordPress (custom), Radio Userland, Community Server, dasBlog, Custom (Metaweblog API), Custom (Movable Type API). Not only is this list impressive, but this dialog goes a step further to make entering the data easier. Instead of selecting a drop down and then forcing you to hunt down the xmlrpc location, this dialog goes the extra mile and provides the standard xmlrpc location for the blog engine you selected. So all you have to do is replace the server name! Very cool!

If your account is associated with multiple blogs, select one here:

A few more dialogs later, you're finally done and staring at a blank window ready to post!

 

Writing your Blog

So now it's time to write your blog.

Preferences

As with all applications, the first thing I do is see what options I can configure. Here's Live Writer's Preferences:

The HTML templates are a nice feature, but too bad we can't create custom templates. Plugins look interesting. I wonder what kind of plugins there will be. And of course we have our Ping Servers. Have to let everyone know when you create a new post!

Pictures

Of course, arguably the most important task of any blog post is adding images. I posted my frustration with Word 2007's support for this, how does Live Writer handle this?

According to the product page, Live Writer supports the newMediaObject method in the MetaWeblog API or FTP. It's great to finally see some standard support.

Once you add an image into your post, the right side bar changes to Image Properties with 3 tabs of extensive options:

Great stuff... unfortunately once again Community Server ruins everything and causes this error message:

Here's the dialog to setup a FTP server:

I'll test this out later with other blog servers.

Editing Draft Posts

If you're like me, publishing to draft and then editing, tweaking your post is an important part of the blog workflow. Live Writer supports this very well with my testing. Opening up an existing post is a simple task of clicking Open, selecting your blog account, and then selecting the post you want to edit:

Unfortunately, can you guess it by now?... Community Server fails once again when trying to republish as a draft back up to the server:

Publishing

One of my complaints with Word 2007 blogging is not having the ability to edit the meta data of the post. I'm glad to mention here that Live Writer doesn't suffer from this same flaw. At the bottom of the page is a Properties bar. When double clicked on, it opens up to allow editing of the post meta data.

One awkwardness I noticed is when you "Save Draft" locally, Live Writer saves it for you. You cannot select a file to save as. For those who blog on different computers, you will have to Publish as Draft up on your blog instead of using the local draft. I would like to see the ability to let the user save to a particular file to make it more portable. People who might want to run Live Writer on a memory stick (if that's supported) and blog on different computers will find this feature annoying.

Other than that, I found everything else worked as expected. Spell check works as advertised, but there is no live spell checking (red squiglies underneath spelling errors as in Word).

Once you're done with your post, hit the big Publish button and you're done!

Reactions & Comparisons

Comparisons to Word 2007's blogging addin is inevitable. After going through my first post with Live Writer, I believe Live Writer clearly wins hands down over Word 2007. How is Live Writer better? Many reasons:

  • Does not have the bloat of being part of Word 2007.
  • Simple, non-cluttered, easy to use UI.
  • Everything works as advertised (not counting server limitations).
  • HTML view of your post.
  • Huge support for many blog engines and the great UX of adding a supported blog.

Since Word is Microsoft's flagship application, I'm sure the Word team is not taking this defeat lying down. Who knows, Live Writer could just be a stripped down version of the final Word blog addin.

Even though Live Writer is in beta, I had no problems nor crashes and everything works great. I definitely recommend anyone who blogs to give it a try, especially since it is free! This is a very easy to use application that is arguably the best out there. Good job Microsoft and I can't wait for the final release!

Edit 8/15/2006

Similar to my post on Word 2007 blogging, I also tested out Live Writer with my WordPress-based personal blog. Read all about it here!

As most people know, Microsoft Word 2007 supports embedded blogging. Unfortunately it doesn't work with Vertigo blogs (CS 1.1) so I had to actually copy/paste this post from Word to CS' post editor.

Too bad it didn't work, as my initial impression with Word blogging is that it is really easy to use. The good news is it actually uploads clean HTML, none of the gunk HTML that Word is so well known for in past versions.

Advantages

  • Spell checking: I initially misspelled Word as Wrod and it fixed the spelling automatically for me. Even the previous "Wrod" has the well known red squiggly underneath it.
  • Posting as Published or Draft.
  • Having the nice large Style selector in the ribbon or the task bar on the right is really convenient.
  • Saving posts locally as an ongoing work.

Disadvantages

  • Does not support categories.
  • Image support is flaky. It only supports FTP and HTTP (WebDAV). If you select FTP, images are uploaded to your specified FTP site and the embedded image urls point to the FTP location. Also if you update a post with an image, Word will upload the same pictures again and abandon the old pictures. For those who like to edit their posts frequently, like myself, this will get annoying really fast.
  • No HTML view. I can understand how HTML view might not be suited for an environment such as Word, but since I couldn't post this directly from Word to my Vertigo blog, there is no way for me to cut and paste this content while keeping all the formatting.
  • Does not allow editing post metadata. What I mean is the post date, an excerpt, comments customization, etc. When you use Word to create a post, you are trusting Word will set these values correctly.
  • And to follow up on the previous point, my experience with Word 2007 Beta 2 blogging support shows that it has trouble with dates and times. I've tried it on different blog servers and each exhibits some weird problem. The date could be off by a few hours, or up to a few years! The problem could be related to this post, so I won't blame Word completely on this issue.

So as you can see, using Word as blogging client is a mixed bag. While it does have a nice UI and makes the simple things really easy (ie. posting only text), it also has faults that make blogging much more complicated than need be. To me, Word blogging support still feels like a hack added in at the last minute. However, I can definitely see the potential here, so if the Word team can iron out some of these bugs and add some more flexibility, Word can definitely become the next killer app for bloggers!

How is it a hack? Well take a look at this error message:

Besides the spelling and grammar mistakes, it looks like someone took the lazy way out in catching errors. The only way to diagnose the source of this problem is to use a http proxy to take a look at the xml being passed between your desktop and the server.

As for not working with Vertigo blogs? Well it's Community Server's problem, not Word's blogging problem. I have successfully tried Word blogging on many other blogging engines, including CS 2.0 which works, so I know it's not Word's problem.

*Edit*

Here's my experience with Word 2007 support with WordPress.

with 8 Comments
Here's an interesting post I stumbled upon made by Michael Kaplan:

http://blogs.msdn.com/michkap/archive/2006/06/14/631016.aspx

After seeing his post, I decided to try it out. Here's screenshots of Notepad before and after:

Before:


After:


Interesting. What I did was create the file using Windows Explorer (Right Click, New, Text Document) and then dragged/dropped the file onto Notepad, added the magic text, saved the file, then closed Notepad. Next I reopened Notepad and then dragged/dropped the file back into Notepad. The After screenshot above is what Notepad displayed the second time.

With the Windows XP version of Notepad, Microsoft included an Encoding drop down box in the Save As dialog.


Wondering if this was the problem, I recreated the file with the magic text, but this time using Notepad's Encoding specifically set to ANSI. Nope, no good. The Open dialog showed the file with Unicode Encoding and once again the file opened up with the asian text.





As Michael Kaplan explained in his blog, this is just another case of a problem with the IsTextUnicode API. Because given an input string, we don't know what kind of text it is, we need to call such methods in order to determine the string format. Since the standard char[]* string doesn't have any space to include metadata (ie. the type of encoding the characters use), methods such as IsTextUnicode can only "intelligently" (see the documentation for the API) scan the contents and determine whether the string is Unicode or not. As you can see with these screenshots, the method isn't always right, causing the characters to be interpreted as Unicode and thus displaying the asian characters rather than the western alphabet characters.

Now, if you explicitly save the text as Unicode (ie. UTF-8), Notepad injects the BOM characters in the beginning of the file to indicate that the file is Unicode. In this case, there is no confusion over what type of encoding the file is using and thus opens up properly in Notepad. Here's what the files look like in hex:

ANSI file:


Unicode file:


Notice the 0xFFEE characters in front of the Unicode file to indicate the UTF-16 encoding. This also means that the file is stored in little-endian format.

Curious as to what other programs may be affected, here's some more screenshots of other programs.

A favorite amongst many is Notepad2:

Before:


After:


Oops, looks like Notepad2 also has this problem. Another editor I like to use is PSPad:

Before:


After:


Looks like PSPad escapes unscathed.

Luckily Visual Studio doesn't have this problem:

Before:


After:


Nor does Word Beta 2:

Before:


After:



with 0 Comments

Working in Visual Studio 2005 as usual... then all of a sudden... oops, what's this?

The always helpful empty tab with No Icon.

 

* Edit 1/19/2006, 2:33 pm *

I believe this is a bug in the TFS Beta 3 Refresh client. I now get an error about a source control plugin not being installed properly error message. I've never seen this problem before until installing the client recently.

 

And also, to get rid of the empty tab: expand the tab, right click the header, and select hide.

 

with 1 Comments

Quick tip, if you have to change your system clock for whatever reason, you can have your Windows clock resync to the correct time by using this command:

w32tm /resync

Since our computers are on a domain, the default behavior is to sync with the domain controller. If you have a personal Windows desktop, the default configuration is to sync with time.windows.com. Of course the w32tm command can do much more than resync your desktop time, but for our purpose, it is simple and works great!

 

 

with 0 Comments

Recently I was tasked to share/branch a complex source tree in Visual SourceSafe 6.0 to do some changes with our project. For some reason, I found it very hard to do and I kept getting this error:

What the heck does "A project cannot be shared under a descendant" mean? After some testing, it turns out the reason for this error is because VSS attempts to add the folder you specified to itself. That is why this is a recursive error: you are adding a folder to the folder you are recursively scanning. I tried specifying a path (ie. $/ProjectA-Copied), but it refuses to recognize the full path and keeps wanting to add to itself ($/ProjectA/ProjectA-Copied). For the life of me, I just couldn't get VSS to share to another location.

After asking around some people, Paul (thanks!) told me that the problem is when you select Share on a project (aka folder) in VSS Explorer, you are selecting the destination project, not the source. Boy... great user experience isn't it?

Armed with this key piece of knowledge, I created my destination project, selected Share on the destination project, in the share dialog selected the source project, and finally was able to successfully share that source project to the destination project.

Also if you are branching after sharing and you have a project with lots of files, I recommend you use the Branch after share check box:

If you share without branching in one step, then you will have to manually go into the destination project and branch all the files individually. Nope, you cannot branch on the project level!

And finally, yes we're using Visual SourceSafe, yes I know it sucks, and finally (what I'm most happy about) yes we will be moving to Team Foundation Server and Visual Studio Team Suite!

 

Here's a quick tip: when you launch Visual Studio 2005, the first thing you will see is the Start Page. On the Start Page you can find a list of Recent Projects, some Getting Started links, some VS Headlines, and the biggest part of the page is the RSS news feed. By default, this shows you MSDN SQL articles:

As much as I love SQL, I prefer to look at something else. To configure the location of the RSS feed, go to Tools > Options > Environment > Startup, then configure the feed location in the text box as shown below:

Of course after entering in our favorite feed, you should now see the news section replaced with the new feed:

 

Since Visual Studio 2005 just came out, most projects we do are in the transition phase: should we go with the proven Visual Studio .NET 2003 with .NET 1.1, or should we go with the latest and greatest Visual Studio 2005 with .NET 2.0? As you can probably guess, this really depends on our requirements and our clients.

Personally, I work on multiple projects and therefore need to use both the old Visual Studio .NET 2003 and the new Visual Studio 2005. In order to start the applications faster, I placed both shortcut icons on my desktop so I won't have to dig through the Start Menu in order to find my application. However, putting both icons on your desktop creates a new problem: which icon corresponds to which application?

As you can see, text for the icons on your desktop are truncated if the text is longer than 2 lines. Since Microsoft Visual Studio is itself way too long, you never get to see the year of the label. Since the year is the only way to determine which version of Visual Studio this shortcut corresponds to, you're stuck. And of course, the icon is exactly the same so you can't tell based on the icon which is which.

So this is a simple problem with a simple solution: just rename the text.  

It would have been nice if Microsoft realized this problem and done something out of the box (maybe create a new icon, or rename the default shortcut's long text), but i can bet this is a low priority item even if they did notice this.

Fortunately this must have been a noticeable bug that SOMEONE noticed during the Visual Studio 2005 development cycle. If you take a look at the 16x16 based icon, someone made the VS 2005 icon look noticeably darker:

Since at 16x16, text is rarely showing, the icon is the only way to distinguish between each other. So it looks like someone up at Microsoft noticed this scenario and made the changes to the icon. In the image above, the VS icon on the left is for 2003, while the VS icon on the right is for 2005.

Also for fun, here's a zoomed in version of the 32x32 and the 16x16 icons. As you can see, the large icon does not have any clear differences, while the smaller one is very clear to distinguish which is which.

So if the person up at Microsoft who made the change to the small icon ever reads this, I want to thank you for pushing for this change. Now push for the icon change for the 32x32 version!

 

with 2 Comments

Yep, I don't think there's any official announcement, but I have been noticing this more and more as I work with Visual Studio 2005.

2005 of Visual Studio is now just Visual Studio, no .NET!

Everyone clear on the new name now?

 

with 2 Comments

For anyone working with Visual Studio Team System, it looks like there is now a GotDotNet workspace project for a Project Server connector. You can find the connector project here:

http://workspaces.gotdotnet.com/projectservervsts

Just like the WSS adapter for BizTalk 2004 last year, this seems to be the new Microsoft trend: put code out as open source that is not fully tested and implemented for RTM. Eventually this code gets rolled into the next version of the product it was meant to be originally in. This is exactly what happened to the WSS adapter for BizTalk 2004: it is now part of BizTalk 2006 and now fully supported. Yay!

I think this is a good way for Microsoft to handle the situation. We get access to features that we would otherwise have to wait 2 years to come out. Sure the initial code may be buggy and there is no support, but then that is always the issue we deal with when using open source right? At least we have access to the source code so we can diagnose the problem ourselves rather than wait and pay for a support incident.

Credit for the gotdotnet workspace news goes to: http://blogs.msdn.com/federaldev/archive/2005/10/13/480577.aspx

 

with 0 Comments

While I was testing out more of VS.NET 2005's features, I noticed this:

Finally there's word wrapping in the Output Window! Now with wrapping:

... but everyone's code is perfect right? No one ever has any build errors?

 

 

with 0 Comments

I'm sure we're all familiar with what the Windows XP installation process is like by now... but how well do you know the Vista installation process? I wrote up a quick article combining all the screenshots I took while installing Vista Beta 1 on a VPC image.

You can find the article here.

 

Here are some of my favorite tools I use for development besides VS:


Emeditor Notepad replacement.
FxCop Test for best practices.
NUnit Unit testing .NET code.
Subversion Local source control (similar to CVS).
NDoc API documentation generator.
Reflector .NET Inspect .NET assemblies and decompile .NET IL code.
tcpTrace Proxy to capture TCP traffic.

What do you use?

with 5 Comments