Posted by: djjlewis on: 13/08/2011
At my current client, we are going to be using a single SharePoint Document Center site that will contain multiple libraries for published, enterprise documents. The document types will be “logically” different and managed by different publishers, so we want to keep them in separate libraries, but would like to keep them in the context of a single document center site collection in order to better control the governance and storage of these documents.
As a side effect, this means that we will not need the default and very generic “Documents” library, which is what the “Upload a Document” button on the welcome page of the document center is set to upload to by default.
Ideally, I would like to make use of the new “content organiser” in order to route documents to the correct library and folder based on the content type and any metadata field values, but I would like to also keep the nice and easy “Upload a Document” button for quick and easy uploads.
Fortunately the solution to this is very simple:
Edit the welcome page from Site Actions, and then click on the “Upload a Document” button. You will see this is actually just a content editor web part, so from the ribbon, under “Editing Tools” / “Format Text” click the HTML drop-down and then “Edit HTML Source”.
Replace the reference to the “Documents” library with “DropOffLibrary” i.e.:
<div class="ms-uploadbtnlink"><button onclick="javascript:OpenNewFormUrl('DropOffLibrary/Forms/upload.aspx');return false;" type="submit"><nobr><img alt="Upload a Document" src="/_layouts/Images/uploaddoc.png"/> <span>Upload a Document</span></nobr></button> </div>
Save or stop editing the page and your done! The “Upload a Document” button will now default to uploading document to the Drop Off Library!
Posted by: djjlewis on: 17/03/2011
I was consistently getting the message “Feature ‘{guid}’ is not activated at this scope.” when retracting a particular SharePoint 2010 solution developed and deployed via the new(ish) Visual Studio 2010 SharePoint Developer tools.
After a very quick test it seems to be caused when you have a feature that is itself dependent on another hidden.
In this case, when solution is deployed and the first (visible) feature is activated, SharePoint will automatically activate the dependent hidden feature.
However, when retracting the solution, the error reported above is (I believe) caused because Visual Studio will deactivate the first (visible) feature, but then SharePoint kicks in and deactivates the dependent (hidden) and then, when Visual Studio tries to deactivate the dependent feature it has of course already been disabled.
All in all then, nothing to worry about – just slightly annoying that you are forced to see (and worry about) the message!
Posted by: djjlewis on: 18/11/2010
I use the Cisco IP Communicator soft-phone when working from home, and although I am able to run version 7.0.2.0 on Windows 7 x64 (using WoW64) I have had a very annoying issue whereby it will only display the default windows audio device as an option when going through the audio tuning wizard. This means that I have had to set my Plantronics CS60 hands-free usb headset as the default Windows audio device (rather than just the default communications device) which has the knock-on effect of playing all Windows sound through the headset – very annoying!
Luckily, after a quick Google of the issue, I found a post that suggested setting the compatibility mode for the communicator app to Vista SP2. I have since done this and can confirm that the USB headset is no listed as a separate option in the audio wizard dialogs – huzzah!
Posted by: djjlewis on: 10/11/2010
When I recently tried to create a new SharePoint / WSS calendar view on a list that uses calculated columns for the both the start and end dates, I was greeted with the following error message:”Input string was not in a correct format”
After quite a bit of trawling the web (hence this blog post), it seemed to be a known issue in certain version of SharePoint / WSS. This particular server was already at SP2 (12.0.0.6421) so I decided to go ahead and install the latest CU – currently August 2010 (12.0.0.6545).
After installing the CU, rebooting and running through the farm configuration wizard, I recreated the calendar view and this time everything worked perfectly.
Here’s a handy reference to the available SharePoint hotfixes and version numbers.
Posted by: djjlewis on: 07/11/2010
I’ve just replace Windows 7 with Ubuntu 10.10 Netbook Edition on my Asus EEE PC 1001p which I will probably blog more about later. In short, it’s brilliant and everything worked perfectly from the outset – apart from one thing (there has to be one!) and that was I couldn’t get my pre-pay Vodaphone broadband dongle to connect at all.
It was being recognised by Ubuntu and the tell-tale blue led was blinking on the dongle itself to indicate a mobile signal was present. So I went through the add mobile –broadband network wizard, choosing both the “Prepaid” and “TopUp and Go” packages, but the device would simply not connect.
I whipped the SIM out of my work BlackBerry, went through the add mobile connection and this time chose the “Contract” package (as it is) and this time it connected immediately.
My suspicions were now on the APN settings for the “Prepaid” and “TopUp and Go” presets. Prepaid was using “pp.vodafone.co.uk” for the APN and “TopUp and Go” was using “pp.internet”.
Luckily I had another (grown-up) laptop which had the “Vodaphone Mobile Broadband Lite” software installed. I went into “Advanced” mode, clicked the rounded “mast” button in the top-left corner and then “Diagnostics”. Then, on the “Network” tab I could see that the APN was set to “PPBUNDLE.INTERNET”, the user name was “web” and password “???” (which is also “web”).
I went back to the netbook, went through the add network wizard (again choosing “TopUp and Go”), but on the last screen I entered in the values I got off the laptop.
I tried to connect again and voila! straight in…
Posted by: djjlewis on: 06/11/2010
If (like me) you have been tearing your hair out wondering why the User.Identity.Name property always returns an empty / blank string when using <authentication type=”Windows”> in the new ASP.NET MVC 3 Beta then the answer is surprisingly simple:
As detailed in the Known Issues section of the release notes, just add the following line to the <appSettings> section of the web.config:
<add key="autoFormsAuthentication" value="false" />
Also, make sure you have the <authentication> type set to “Windows” as above, and (optionally) if using the built-in Visual Studio web server (aka “Cassini”) you can also check the “NTLM Authentication” option in the Properties / Web tab.
Posted by: djjlewis on: 04/10/2010
I’ve just installed the Team Foundation Server Power Tools September 2010 specifically for the Windows Shell Extensions which gives that TortoiseSVN feel to working with TFS and allows you to see and make changes to your source without firing Visual Studio.
After the installer completed it warned that you will need to log off and on again in order to see the Windows Explorer icon overlays, and that you may even have to reboot on Windows Vista / 7 systems. As I am running Windows 7, and not particularly optimistic given Microsoft’s previous track record when it comes to reboots required, I went for the reboot option. On logging back in, I went straight to a folder containing a local workspace but alas, no overlay icons were being displayed!
I imagined installing the shell extensions would “just work” but in the unlikely event that there was some additional configuration involved I headed to the help files (these can be launched from the start menu, or from the program files\MS TFS Power Tools\Help folder.)
The help file confirmed that these should “just work”, but one tid-bit at the end of the file caught my eye:
It was headed “Limitations” and briefly states that Windows only supports 15 registered icon overlays (four of which are reserved) and that if these are all used, you may not see the icons.
It suggests to run the following command in order to see all of the registered icon overlays:
“reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers”
Sure enough, after running the above command at a command line, I had around twenty registered (including the TFS ones). This was due to having TortoiseSvn, “Groove” (which must really refer to SharePoint WorkSpace as I have Office 2010 installed) and DropBox all of which register their own icon overlays.
At least I now know why they are not displaying. All I need to do now is decide which of the above I can get rid off in order to test the TFS overlays!
Posted by: djjlewis on: 16/08/2010
At work, I have Lenovo ThinkStation running Windows Server 2008 R2 Core along with the Hyper-V role and a number of VMs (primarily for SharePoint 2010 development). After being on holiday for a couple of weeks I started up Hyper-V manager but was greeted with the one of the standard “Cannot connect to the RPC service on computer … Make sure your RPC service is running” messages. No problem, I thought, I’ll just RDP to the host direct and check out what was going on. Having then tried to RDP with my standard user account, I was then greeted with the message “An authentication error has occurred. The Local Security Authority Cannot Be Contacted” which I don’t recall ever having seen before! I then tried to RDP using the local administrator account and it went through fine. Something very strange was going on here!
After a couple of minutes trying and retrying my normal user with no luck, it suddenly struck me that either the user account’s password had expired in the 2 weeks I was away, or I had inadvertently locked the account.
As Server Core is not the easiest thing to manage and easily check these things, I ended up running two different NET USER commands in case it was one or the other. Most user and group operations can be performed from the command line using NET USER or NET GROUP. For a list of all available commands just run NET HELP USER (or GROUP).
The first command simply changes a user accounts password in the event it may have expired. It appears you can set this to the previous password anyway, as this is what I did:
NET USER [username] [password]
The second command will reactivate an account in case it has been disabled:
NET USER [username] /ACTIVE:Yes
Having run the above two commands, I was then able to log back in via RDP and use Hyper-V manager again through my standard user account.
Posted by: djjlewis on: 28/06/2010
OK – I’ve just had one of those arcane issues with an esoteric combination of technologies that threw up nothing on Google – hence this post!
The Scenario
I have a WCF Data Services service with a database back end that is running SQL 2000 in production, but I had taken a backup and was running on my local SQL 2008 R2 Express instance.
I also have an ASP.NET MVC 2 web app that is a client of the data service.
All was well testing on both on my local and staging (also SQL 2000) databases when using the standard http / web request stuff.
I then re-factored the MVC project to use the Data Services Client Library from within the model, so that some text boxes were populated as soon as the page has loaded, rather than populating them from the client-side using JSON as I had before. All was going well until I pushed it out to the staging server which talks to a SQL 2000 instance and all of a sudden I started getting a “Incorrect syntax near the keyword ‘AS’” error message from the data service.
I dusted off SQL Server Profiler and ran it against the staging DB to see the actual SQL query that was being generated by the Data Service and noticed the first line was SELECT TOP (1) FROM… I copied and pasted the query into query analyzer and sure enough, got the same error message that I was receiving from the data services client.
By just removing the brackets from TOP (1) I could get the query to run.
Fortunately for me, I was explictly calling the .FirstOrDefault() method on my linq query from the Data Services client library as I was only expecting one record to come back from the query, so by just removing the call in my code I was able to get the client working again.
It seems SQL 2000 is not compatible with the syntax that is generated by the entity framework for SELECT TOP (X)?
Posted by: djjlewis on: 24/06/2010
I picked up a useful tip over at Stack Overflow today while I was trying to find out how you can install the SMTP server on Windows 7 in order to test some email functionality from an ASP .NET application.
As it turns out you can’t as the SMTP server option is no longer available from Vista onwards. This basically leaves you with two options:
Neat!