|
Matthew Cosier Profile |
|
|
Closing SharePoint 2010 wait dialog with JavaScript
Matthew Cosier There’s one nice feature of the SharePoint 2010 UI framework which lets you display a wait dialog with no close button:
SP.UI.ModalDialog.showWaitScreenWithNoClose('Please wait ...', 'Please wait while we process your request ...', 80, 400);
You may want to run this on client click of a button, which ultimately posts back the page. In my case it was a dialog which did some processing, then ultimately closed.
If you call the above function, and the page posts back, when it [read]. Posted: Tue, Nov 29th '11 |
jQuery document ready not firing with ajax update panels
Matthew Cosier The scenario is:
1. You’ve got an update on a page, and you have some jQuery executing a document.ready event.
2. The event isn’t firing when your update panel posts back asynchronously.
The solution is quite easy, take your original document.ready script and wrap it in a function and place it outside of your update panel (linked js file is fine):
function BindLoadEvents() { $(document).ready(function() { alert(‘fired!’); }); }
The bold text was the body of your origina [read]. Posted: Tue, Oct 25th '11 |
Feature could not be installed because the loading of event receiver assembly X failed:
Matthew Cosier The problem is, when you’re in visual studio debugging a feature receiver, and you have your build actions set to ‘Default’ (ie, not No-Activation), it will deploy the solution, then try and activate your feature (which has your event receiver in it (which probably deploys an SPTimerJob or something similar)). You get the error saying that it cant find your assembly. BS! It’s in the GAC! I can see it, and it’s the right version??
I’ve just been banging [read]. Posted: Thu, Oct 20th '11 |
How to install Windows 8 side by side with Windows 7 the easy way!!
Matthew Cosier I have been trying many different ways to get windows 8 installed… I have been trying to find the least ‘intrusive’ way that I can.
I just wrote an entire write up on how to do this. But wordpress deleted it. Thanks word press for wasting an hour of my time, and hard work.
In order to do this, simply read this.
If you want to boot from a VHD on an external hard drive, read this.
Thanks again, WP. [read]. Posted: Thu, Sep 29th '11 |
Windows 8
Matthew Cosier So if you’re been living under a rock for the last day or so (OK, fair enough, this is pretty fresh news, I don’t blame you). Then you’d know that Windows 8 Developer Preview has been released!
I thought I would take this opportunity to share with you some of the content that I’ve reviewed and gathered with regards to Windows 8, to save you a bit of time trawling through the interwebs.
Before I continue though, you’re probably wondering where to get it:
ThereR [read]. Posted: Wed, Sep 14th '11 |
Binding WPF DataGrid ComboBoxColumn to view model data source
Matthew Cosier In Silverlight, you would generally create a DataContextProxy for this issue. However, in WPF we need to do things slightly differently:
So, to break this down - we are essentially creating a new style for the editing template, and targeting the internal combobox which is created as part of the data grid column.
We then need to set its ItemsSource to our binding expression. We need to do this because the datagrid cells do not form part of the visual tree, therefore we can't apply [read]. Posted: Tue, Sep 6th '11 |
System Interface Mockups
Matthew Cosier Lately, I have been pushed more and more into needing a better way at mocking up systems.
Today, I came across Balsamiq and I have to say, I am very impressed!
This tool makes mocking so simple. Within minutes I was able to mock up a system across a number of screens, and it’s friendly on the eyes for the end-users.
+1 from me. [read]. Posted: Tue, Sep 6th '11 |
Agile Architecture
Matthew Cosier I came across this fantastic article which details how agile fits in with architecture in small to large projects:
http://www.agilemodeling.com/essays/agileArchitecture.htm#Who
Key take-aways:
1. Beware of Ivory Architects/Architectures. People often spend too much time building the perfect architecture instead of proving it, and revising it based on ‘real’ testing.
2. In small teams, assign an Architecture Owner role. Don’t get into a situation where you have one person [read]. Posted: Sun, Aug 21st '11 |
When to use SQL Server Merge Replication VS Sync Services for compact disconnected applications
Matthew Cosier Recently I’ve been asking the question of why I would bother using Sync Services when I could very well just set up merge replication inside SQL Server + SQL Server CE 4.0.
Here’s a great article I found which outlines the reasons why you might want to choose one over the other:
http://blogs.msdn.com/b/sqlservercompact/archive/2009/11/09/merge-replication-vs-sync-services-for-compact.aspx
It’s evident that you would consider using Sync Services when you wanted more flexibility [read]. Posted: Sat, Aug 20th '11 |
How to remotely play songs on your Xbox
Matthew Cosier I’d love to be sitting at my PC right now, and have the ability to swap and change my songs that are playing on my home theatre on my Xbox.
Here’s how:
http://jeffrey-parker.com/blog/fuze/remote-control-xbox-360-music-using-a-cell-phone-or-pc/
Steps:
1. Install TVersity
2. Install Winamp
2. Create an m3u file (described above) which points to your instance of Winamp (port 8000 by default?)
3. Serve the file to your xbox using TVersity (you can probably do this with standard media cen [read]. Posted: Fri, Aug 19th '11 |
Mapping image data types to POCO entities in EF 4.1
Matthew Cosier You might be wondering what type you should make your ‘Image’ data types in your pure POCO classes when you’ve generated a data model from SQL CE or equivalent when using the ‘image’ data type.
Well, I stumbled across this post by Jason: http://jasonfollas.com/blog/archive/2010/02/14/spatial-data-and-the-entity-framework.aspx
If you check the properties of the image property on the generated EF datamodel you’ll notice that it’s set to type ‘Binary [read]. Posted: Tue, Aug 16th '11 |
Generating an EF 4.1 entity model in a WPF application for SQL CE 4.0
Matthew Cosier If you’ve previously installed SQL CE 3.5 in Visual Studio 2010, and you’re in a WPF application, (even a .NET 4.0 class library project), and you try add an EF entity model to generate it off your SQL CE 4.0 database… when you choose your data client, only SQL CE 3.5 is listed, it will never show SQL CE 4.0!! ”Whyyyyyyyy!!!” I hear you scream.
Well, truth is – I have no idea. Bug, I am guessing.
I do have a work around though. Not sure where the source [read]. Posted: Mon, Aug 15th '11 |
SQL Server 2008 CE 4.0 must haves
Matthew Cosier I’ve just recently started developing with SQL Server CE 4.0, and found the out of the box tooling quite bad.
I was ultimately disappointed by the support in management studio, but then recently found out that I was running with SQL CE 3.5 instead of 4.0, it had defaulted the DB creation and connection provider to 3.5.
Since swapping over to 4.0, I discovered that you can’t actually use SQL Server management studio anymore, you need to actually use the tools given to you in Visual St [read]. Posted: Mon, Aug 15th '11 |
Cannot implicitly convert type ‘T’
Matthew Cosier If you’re getting this error, you’re doing things slightly incorrectly.
Chances are you’ve got a generic method, and you’re trying to return your object as the generic type, something like:
T something() { var someObject = CreateSomeObject(); return (T)someObject; }
You’re going to get all types of compiler errors here, as you can’t cast your object directly to T.
The way you fix this, is to simply use this instead:
return (T)(object)someObject;
By casing your [read]. Posted: Tue, Jul 26th '11 |
Exposing your photos perfectly at the beach every time
Matthew Cosier I found this article here with a neat little trick to ensure you always have perfect exposures at the beach (the digital photography kind, not the flashing your privates kind). [read]. Posted: Thu, Jun 2nd '11 |
Visual Studio Version Numbers
Matthew Cosier I found this handy, to figure out what service pack/version I am running. In visual studio, just hit Help -> About, and match it up to these:
Product Name Version Ship Date
----------------------------------------------------------------------------------------
Visual Studio .NET 7.0.?? 02/2002
Visual Studio .NET 2002 Service Pack 1 7.0.??
Visual Studio 2003 7.1.?? 04/2003
Visual Studio 2003 Service Pack 1 7.1.6030 09/13/2006
Visual Studio 2005 8.0.5072.42
Visual Studio 2005 Service Pack 1 [read]. Posted: Wed, May 18th '11 |
How to calculate Time Lapse Photography Interval
Matthew Cosier Hi all,
I found a pretty cool article which talks about timelapse photography, one thing which stuck was how to calculate the interval based on your desired movie length and actual event occurance. Here it is simplified (I hope I got this right!):
(DesiredFramesPerSecond * DesiredVideoLengthInSeconds) / ActualEventLengthInSeconds
So for instance, an event which takes 1 hour (a sunset? whatever…), and you want your video to be shot at 24 frames per second, and you want your end video to [read]. Posted: Wed, May 18th '11 |
3D Modelling bits and bobs
Matthew Cosier Not many of you probably know this about me, but when I was younger I used to do a lot of 3D modelling (generally in the realm of game design and development). I had also spent a fair amount of time writing exporter plugins for software packages such as 3DsMax – it was a real passion of mine for quite a long time.
I used to enjoy modelling human faces, I tried and tried so many times to generate a 3d model of a human face – it was quite difficult, but very rewarding.
Recently I have [read]. Posted: Thu, Feb 24th '11 |
Google AuthSub javascript login going around in circles
Matthew Cosier I’ve just recently encountered a problem where the AuthSub login keeps redirecting back to my page without a valid token, so my code tells it to go back and log in again because there’s no token – which causes an endless looping back and fourth from google.
The reason for it, (at least for me) was that I had a stale token in my cookies in my browser. According to the google documentation the access token become invalid on the server, but it still remains in your cookie collect [read]. Posted: Thu, Jan 13th '11 |
Find all writeable files recursively with good old #dos
Matthew Cosier dir /s /a:-r
Good old dos commands [read]. Posted: Mon, Dec 20th '10 |
WebContext.Current.Authentication.User.Identity.IsAuthenticated is always false, persistent cookies in Silverlight
Matthew Cosier If you’re using the AuthenticationService in Silverlight, you may have run into a problem where the IsAuthenticated property keeps returning false. Even though you’ve specified to use a persistent cookie in the call to Login() on the service.
Further to this, you will notice that the cookie is actually being created…! Well, there’s something else you need to be aware of!
In order for the User property on WebContext.Current.Authentication to be updated with details of [read]. Posted: Thu, Dec 2nd '10 |
@Ayende on RavenDB at Vic.NET
Matthew Cosier Via @DavidBurela
“Last night Ayende (Twitter:@Ayende Website:http://ayende.com/) presented at the Victoria.Net usergroup. He discussed http://RavenDB.net, a NoSQL document database geared towards .Net developers.”
I helped David get his new setup working with his 50mm 1.8 and cannon 550d, the end result is awesome!
http://davidburela.wordpress.com/2010/12/01/community-reportvic-net-november-2010-ayende-ravendb/
Enjoy! [read]. Posted: Tue, Nov 30th '10 |
Getting your QueryString on in Silverlight – Login example
Matthew Cosier When you’re talking about QueryString’s in Silverlight, there are 2 things you could be referring to:
1. The QueryString passed into the hosting page request (ie http://x/a.aspx?b=c)
2. Or a deep linking QueryString (unsure of the technical term here, but hey – it’s still called a QueryString in the object model).
At first, it seemed as though all I had access to in Silverlight was the latter – via the NavigationContext you can retrieve the current QueryString valu [read]. Posted: Sun, Nov 28th '10 |
Cannot load symbols – Silverlight 4 breakpoint debugging issue
Matthew Cosier You’re building a Silverlight application and you make some changes to your code, and F5 it. You have a couple of break points set in your new code. The page loads and executes but none of the breakpoints are hit.
Usually this is because something is our of sync, so you’d fix this generally by:
1. Stop Cassini (if you’re running in it).
2. Perform a rebuild-all (which does a clean as well, fwiw).
3. Delete your ClientBin folder to make sure your XAP’s arent locked [read]. Posted: Sun, Nov 28th '10 |
Loading images from Resource files in Silverlight
Matthew Cosier You need to load an image from a file which you have placed within your silverlight application. The file though, does not nessescarily have to live with your XAP, it can be within a referenced silverlight assembly.
The easiest way to do it is (you probably want to split this up and do some null checking):
StreamResourceInfo resource = Application.GetResourceStream(new Uri(string.Format("{0};component/{1}", assemblyName, relURI), UriKind.Relative));
BitmapImage bmp = new BitmapImage();
b [read]. Posted: Mon, Nov 22nd '10 |
Handy list of Microsoft Server Ports
Matthew Cosier Found this link today, which shows a bunch of different port ranges for Microsoft Server products:
http://support.microsoft.com/kb/832017
Enjoy! [read]. Posted: Thu, Oct 21st '10 |
WCF cant find endpoint with multiplesitebindings enabled for RESTful services
Matthew Cosier So here’s the scenario:
You’re using a single endpoint, with service behaviors and endpoint behaviors to turn your service into a RESTful service. All is well and good, then you need to support 2 versions of your service under 2 different URLs with the same base address, under the same host.
So you first enable multiplesitebindings in your web.config:
You now need to make a couple of changes to your service config definition – you need to add a hosts entry with a base [read]. Posted: Wed, Oct 6th '10 |
Weird question mark character in umbraco when saving content
Matthew Cosier To fix this, it’s simple:
1. On the file system, open up /config/umbracoSettings.config
2. Replace the element with UTF8
3. On the file system, open up /config/tinyMCEConfig.config
4. Replace the element with named
Save the files, the issue will go away. This is also resolved in umbraco versions > 4.0.1 [read]. Posted: Wed, Oct 6th '10 |
Controlling Winamp from my iPhone
Matthew Cosier I decided I wanted to write an application that controlled winamp from my iPhone… well turns out I don’t need to, it’s already been done:
http://www.movingapps.com/download.html
The only problem with it, is that it seems something on my machine was blocking the default port (1120), even after opening the firewall to that port. I changed my port from 1120 to 8686 and it worked first shot. So yeah, if you have problems with it connecting, just change the port
That is all.
M [read]. Posted: Fri, Jul 23rd '10 |
Could not load file or assembly ‘Microsoft.Web.Administration, Version=7.0.0.0′…
Matthew Cosier I kept getting this error when using the new WebMatrix platform to host my web applications.
I did some checking around, and found in the directory of WebMatrix, it’s /config directory had an application configuration file with a binding redirect from 7.0.0.0 to 7.9.* (or something to that nature). This tells me that WebMatrix has a new version of the Microsoft.Web.Administration assemblies that it’s using… so where are they? Well, turns out they live within the WebMatrix i [read]. Posted: Tue, Jul 20th '10 |
Windows Workflow 4 – Cannot create unknown type presentation}Point / presentation}PointCollection
Matthew Cosier So I’ve been using Windows Workflow 4 quite a lot lately, and there’s one very annoying bug (if you can call it a bug) that has been getting on my nerves:
Cannot create unknown type ‘{http://schemas.microsoft.com/winfx/2006/xaml/presentation}Point‘.
or
Cannot create unknown type ‘{http://schemas.microsoft.com/winfx/2006/xaml/presentation}PointCollection
Whenever I try and add a service reference to my workflow.
Essentially, what’s happening here is that your X [read]. Posted: Sun, Jul 18th '10 |
umbraco : Object reference not set to an instance of an object in administration section
Matthew Cosier If when you click on a node within your umbraco administration section and you receive the following:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +106
umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +1057
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +406
System.Web.UI.Control.InitRecursive(Control nami [read]. Posted: Mon, Nov 23rd '09 |
DevExpress ASPxDropDownEdit loses text on postback
Matthew Cosier So I’ve been trying to implement a devexpress multi-select drop down list box, and all is well except whenever you post back to the server – when the server returns the response to the browser, for some reason the text within the combo box gets cleared. I’m not sure if it’s something I am doing incorrectly with the JS, or the set up of the devexpress control but either way – I decided to work around it, here’s the end result (a fully functional multi-select [read]. Posted: Thu, Oct 29th '09 |
Get every second element in an IEnumerable in C#
Matthew Cosier var everySecondElement = myList.Where((p,d) => { return ((d % 2) < 1); }); [read]. Posted: Wed, Oct 21st '09 |
Developed turned manager? Manager in general? READ THIS
Matthew Cosier @mossyblog sent through a link to this article about management techniques, and I found it extremely insightful, and was able to relate to so many different areas and management styles I have seen over the years. This will definitely make me a better manager when the time comes:
http://www.smashingmagazine.com/2009/09/03/professional-team-management-tips-for-creative-folks/
Read the whole thing [read]. Posted: Sat, Sep 5th '09 |
Using the Umbraco runway DropDownNavigation macro in your own masterpage.
Matthew Cosier So you’ve tried taking the DropDownNavigation macro, inserted it into your own masterpage but it doesn’t work. The Menu shows up expanded with no styling or javascript being applied.
The only fix I could come up with for this is to first ensure your tag has a runat=”server” attribute, secondly, include the following script at the bottom of your masterpage/template:
$(function() {
$(’#dropdownNavigation’).droppy({ s [read]. Posted: Mon, Aug 31st '09 |
SharePoint 2010 Client Object Model
Matthew Cosier This came through on twitter via @jthake before:
http://www.chakkaradeep.com/post/2009/08/19/SharePoint-2010-Introducing-the-Client-Object-Model.aspx
I’m really excited about this one – finally we can start using a standardised object model and not have to worry about how weather we are going to use web services, or the local object model. The most powerful/exciting part to all of this (in my opinion) is the ability to talk with the object model directly via your Silverlight ap [read]. Posted: Wed, Aug 19th '09 |
Support SharePoint 2010 with this new Twibbon!
Matthew Cosier Well, I was over at Twibbon.com and thought I’d see if anyone had made a SharePoint 2010 icon, and sure enough William Cornwill had uploaded one (Nice one Will!).
I wasn’t a big fan of the one Will uploaded, so I decided to try create one that didn’t look like a minature dress, or a duck that had just been ran over by a semi-trailor.
http://twibbon.com/join/SharePoint-2010-2
Creating a twibbon was ALOT harder than I first expected – due to the small size of the icon, i [read]. Posted: Wed, Aug 19th '09 |
Report Parameter Missing a Value
Matthew Cosier If you are getting this error when using the SQL Server 2005 Web Forms Report Viewer (ASP.NET) it’s probably because you are using an old version of the report viewer.
Please install the 2005 SP1 version of the Report Viewer Distributable.
http://www.microsoft.com/downloads/details.aspx?familyid=E7D661BA-DC95-4EB3-8916-3E31340DDC2C&displaylang=en
Either that, of your call to rv.ServerReport.SetParameters() doesn’t have a valid report parameter. [read]. Posted: Wed, Jun 24th '09 |
Some good JQuery examples
Matthew Cosier http://www.slideshare.net/dbert721/introduction-to-jquery-presentation [read]. Posted: Wed, Jun 17th '09 |
Forms Services – Schema validation failed for some data items in the form
Matthew Cosier If you’re performing data migration, and moving XML nodes around (or generating the form from template.xml or something similar), it will leave xsi:nil=”true” attributes on the nodes.
Then, if you copy these nodes and intend on filling them with information, you need to either remove the xsi:nil attributes, or set them to false. How do you do it? It’s quite simple:
XPathNavigator nilField = DOM.SelectSingleNode(”/my:myFields/my:myNilField“);
if (nilField [read]. Posted: Fri, May 8th '09 |
MOSS & WSS SP2 released
Matthew Cosier MOSS and WSS SP2 has been released. You can find the downloads here:
MOSS Download
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=b7816d90-5fc6-4347-89b0-a80deb27a082
WSS Download:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=79bada82-c13f-44c1-bdc1-d0447337051b [read]. Posted: Tue, Apr 28th '09 |
Programatically creating and assigning a SharePoint task
Matthew Cosier So we had a requirement where we needed to create and assign a SharePoint task to all site collection administrators upon the creation of a new forms based user. Essentially, once a user registers it assigns a new Task to all administrators asking them to assign that user to a group. Those tasks are exposed on the administrators view of the world (a filtered view on their landing page).
Here’s how it’s done. Firstly, you need to hook the CreatedUser event on the CreateUserWiza [read]. Posted: Mon, Apr 27th '09 |
Object reference not set to an instance of an object at asp._layouts_new_aspx.OnLoad(EventArgs e)
Matthew Cosier If you’re getting the above mentioned error, and you’ve enabled forms authentication within SharePoint (I’ll mention SqlMembership here for google’s sake), then you’re getting this error because you havent enabled Client Integration within the authentication providers section of central administration!
Other quirks that you will witness if you do not turn this on include not being able to fill out forms services reports. The ‘New’ button/drop down on y [read]. Posted: Fri, Apr 24th '09 |
InfoPath form template not editable - cant modify tables
Matthew Cosier We had a massively bizzare issue this morning with one of our form templates. We are currently building an InfoPath forms services + workflow solution, and a collegue of mine had copied one of our form templates to start a new form.
We are building the forms within Visual Studio. The form template seemed to be in ‘Read Only’ mode. At least - the default view was. When we right clicked some of the tables everything was grayed out, it wouldnt let us insert new columns. It wou [read]. Posted: Wed, Apr 22nd '09 |
Migrating from Hyper-V to Virtual Server
Matthew Cosier So you’ve just installed all of the hyper-v bits and peices on your VM, and you’ve started it up in hyper-v - it’s upgraded the HAL to the new Uniprocessor HAL, and everything is fine.
Whoops, now you need to run that VM in Virtual Server 2005 R2 SP1.
It’s totally unsupported by Microsoft, BUT YOU CAN DO IT. I just spent the last hour or 2 fiddling around with it, and I finally got it right. Here’s the steps:
1. Take a copy of the VHD file.
2. Create a new VM in [read]. Posted: Fri, Apr 17th '09 |
AvePoint DocAve - 2003 to 2007 migration fails with: Failed to process the browse request, the browse process timed out
Matthew Cosier Whenever trying to expand the agent for the source migration, it kept timing out. We also got the following errors:
–Erroring: id[3439_1234421027821] message[com.avepoint.docave.sp.service.ServiceException: Back end error:Failed to process the browse request, the browse process timed out.]
The second error, more detailed:
Method execution failed: com.avepoint.docave.sp.service.ServiceException: Back end error:Failed to process the browse request, the browse process timed out. at co [read]. Posted: Thu, Feb 12th '09 |
Victorian Bushfires
Matthew Cosier I cannot stress how devistating this whole situation is. If you have a dollar, and you have a heart, click here right now and donate:
https://www.redcross.org.au/Donations/onlineDonations.asp
No questions. Just DO IT. [read]. Posted: Thu, Feb 12th '09 |
The task update was not accepted MOSS Workflow, WCM
Matthew Cosier If you’re getting this error message when trying to approve a task in MOSS - make sure that the user you are logged in as, is explicitly added to the Approvers group. If it’s not, you’ll get this message.
You will still have access to the approval screen for the workflow regardless of whether you are in the approvers group or not. [read]. Posted: Mon, Feb 9th '09 |
Hiding SharePoint WCM content fields in display mode. Make them show in edit mode only.
Matthew Cosier So you’ve got a set of fields that you want to be displayed in edit mode only? Or display mode only? Then you can use this in your layout page:
Or
Thanks Rai! [read]. Posted: Mon, Feb 2nd '09 |
BDC integration with CRM 4.0
Matthew Cosier Uzma has started a blog (well done mate!) and has posted his first blog on BDC integration with CRM 4.0, in particular, the issues with double hop and trust for delegation.
http://sharepointuzma.wordpress.com/2009/01/30/bdc-integration-with-microsoft-crm-dynamics-40/ [read]. Posted: Sat, Jan 31st '09 |
IE8 RC1 Released, I guess it’s time to upgrade
Matthew Cosier So I heard IE8 RC1 is available for download:
http://www.microsoft.com/downloads/details.aspx?FamilyID=8e31391b-91b2-40c4-8643-7b70d1d5628b&displaylang=en
Or the X64 edition, if you’re into that sort of thing:
http://www.microsoft.com/downloads/details.aspx?FamilyId=9ae59654-111a-474a-9999-996a3462d606&displaylang=en
I guess it’s time for me to upgrade [read]. Posted: Mon, Jan 26th '09 |
Using the IE6 Test VM with Hyper-v
Matthew Cosier So, I wanted to use the IE6 VM with hyper-v so I could fix some IE6 related rendering issues. There’s a couple of tricky things I needed to do to get this to work.
1. Host the VM in hyper-v like you would any other VM, by attaching the IE6 Test VHD.
2. To get networking, and other various bits working, you’ll need to install the hyper-v extensions. In order to do this, you’ll need to uninstall the virtual pc extensions that come pre-installed. You’ll notice that you [read]. Posted: Thu, Jan 22nd '09 |
New Oz Azure Mailing List
Matthew Cosier David Burela contacted me today about an idea to set up a new mailing list for Microsoft Azure, called the Oz Azure mailing list.
I pinged Grant an email, he hooked us up with the guys at Codify who manage the mailing lists for Oz Moss/ Oz Silverlight / etc. Roughly 10 minutes later we had a fully functional mailing list for azure online! How’s that for turnaround? And they’re in the states! Unreal!
So go ahead, and point your browser to http://www.codify.com/lists/ozazure [read]. Posted: Mon, Jan 19th '09 |
Regular Expression for validating decimal values
Matthew Cosier ValidationExpression=”^\$?\d{1,3}(\,?\d{3})*(\.\d{2})?$”
It has some obvious limitations, but you can use it as a basis for creating a more flexible expression. [read]. Posted: Thu, Dec 18th '08 |
Hyper-v VM runs extremely slow after snapshot.
Matthew Cosier Unfortunately I don’t have an answer for you as to why this happens - though I can probably make a pretty solid guess, and say that it’s due to it creating an internal differencing disk between the current content, and the snapshot. This means that all disk IO/writes are being queued and written into the diff-disk, causing it to be 10x slower. If you have your VM hosted on the same HDD as your host, it’s probably just killing your disk IO bandwidth/starving the host.
So jus [read]. Posted: Thu, Dec 11th '08 |
How to check if a javascript function is defined.
Matthew Cosier if(’function’ == typeof YourFunctionName) { }
An oldy, but a goody. A lot of people tend to write if(YourFunctionName) { }, but she no worky! [read]. Posted: Fri, Nov 28th '08 |
Custom SharePoint Navigation datasource Part 2 - The links.
Matthew Cosier Just a quick followup post from yesterday, where I wrote about how you can create a custom site map datasource.
Now that you have your navigation menu being generated from your custom datasource, and you are returning a custom navigate URL for each of the items - you might need to execute some client javascript when you click one of those navigation items (I did).
First thing you’ll notice is that it generates the navigation links as href’s (for those where you return anything but nu [read]. Posted: Fri, Nov 28th '08 |
Best coffee in Melbourne
Matthew Cosier I went off caffine for about 6 months, but I’ve been back on it again now for a few days. The best coffee in Melbourne by far is Bambini Barrista:
http://www.thatsmelbourne.com.au/DiningandNightlife/Cafes/LightMeals/Pages/2398.aspx
It’s the smoothest, best tasting coffee I’ve ever had.
Thanks to Bibhakar Saran for showing me this place ages ago. [read]. Posted: Wed, Nov 26th '08 |
Creating a custom SharePoint Navigation DataSource
Matthew Cosier We currently have a requirement to implement a custom navigational structure in our site, which displays a list of custom links (flat), dynamically generated from a stored procedure.
There’s a number of different ways you can do this, and I’ve been down almost every path. I have found the best solution, and I’d like to share it with you because there are some tricky bits that you need to be aware of, in how the navigation menu is produced and rendered.
Firstly, you’ll n [read]. Posted: Tue, Nov 25th '08 |
Ridiculous WSSVse behavior. Access is denied to ‘….SiteElements{Guid}’ when deploying site definition solution.
Matthew Cosier If you get these access denied errors when you try and build/deploy your WSS solution, and it contains a site definition, chances are you are pulling your hair out and screaming at the absolutely ridiculous nature of this error message, and why is it being shown????
The answer lays deep inside your onet.xml file, within the site definition that your solution package is trying to deploy. Can you believe it actually inspects the onet like this? Well it does, and if your onet is wrong, it can [read]. Posted: Tue, Nov 25th '08 |
Cannot Convert ScriptLink to IAttributeAccessor - SharePoint masterpage
Matthew Cosier You’ve customised your sharepoint masterpage in SharePoint designer, and you’ve exported it using file -> export. Or you’ve tried to take a copy of that pesky designer’s masterpage they have built using SP Designer, because you want to include it as part of a redeployable solution package/feature.
DONT USE THE EXPORT FUNCTION IN SHAREPOINT DESIGNER FOR MASTERPAGES
Open the master page in source mode in SP Designer, select the entire contents, and paste it into notepa [read]. Posted: Mon, Nov 24th '08 |
Connect to a SharePoint list via OLE DB
Matthew Cosier How cool is this? Connect to SharePoint through OLDE DB connection string. You can then do things like SELECT * FROM listName; etc. Here’s how:
Read and write
Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=2;RetrieveIds=Yes; DATABASE=http://pp1webofficelivecom.officelive.com/Documents/;LIST={5999B8A0-0C2F-4D4D-9C5A-D7B146E49698};
The keyword “Database” specifies the SharePoint URL
The keyword “List” specifies the GUID value for the desired SharePoint list (list=table [read]. Posted: Wed, Nov 19th '08 |
Switching IIS 6.0 to 64bit mode
Matthew Cosier When you add the application server role on a 64bit windows 2003 server, and IIS is installed, by default IIS runs under 32bit mode.
When you install CRM 4.0 x64, or a 64bit edition of exchange, you will probably recieve an error saying something like IIS is currently in 32bit mode, and the installation will error.
To fix this issue, you need to run the following command to switch the IIS worker process into 64bit mode:
cscript c:\inetpub\adminscripts\adsutil.vbs SET /w3svc/AppPools/Enable32BitA [read]. Posted: Tue, Nov 11th '08 |
MOSS/WSS SP2 on its way
Matthew Cosier You can read further details here. There’s no dates yet, but it’s now time to start thinking about how you’re going to roll this update in.
It’s not as simple as applying some new binaries. They have made changes to the content database schema, which means you’ll need to organise some downtime prior to installing the update. Psconfig needs to be executed to update the schema.
Depending on how many site collections and content databases you have, will depend on [read]. Posted: Fri, Oct 31st '08 |
404’s within CHM file? CHM downloaded from MS seems corrupted? not quite
Matthew Cosier Save the CHM to disk, right click it and choose properties -> click the Unblock button at the bottom of the tab page.
Seems to be a new security feature (or maybe it’s an old one that I haven’t seen before?). Saves you from opening malicious CHM’s downloaded from websites I guess. [read]. Posted: Sun, Oct 26th '08 |
TSQL: Strip Html Function
Matthew Cosier I took the code from here, and made a re-usable function for you (works pretty well!)
CREATE FUNCTION dbo.StripHtml (@html NVARCHAR(MAX))
RETURNS NVARCHAR(MAX)
as
BEGIN
declare @start int, @end int, @length int
– Replace the HTML entity & with the ‘&’ character (this needs to be done first, as
– ‘&’ might be double encoded as ‘&’)
set @start = charindex(’&’, @html)
set @end = @start + 4
set @length = ( [read]. Posted: Wed, Oct 22nd '08 |
MOSS: TaskID not available on CreateTask step in Workflow
Matthew Cosier If you are writing a custom workflow for MOSS using Visual Studio, and your scenario looks similar to:
1. Create a new task for Bob
2. Send an email to Bob with a constructed link back to the Task
Then you’ll need to put in another few steps in between in your workflow.
If you write it like this:
1. Create Task Step
2. Send Email, using the bound TaskID from step 1
I don’t believe this will work. Why? Because the TaskID isnt actually available until the create task step has be [read]. Posted: Fri, Oct 17th '08 |
MOSS: PPS files not being indexed
Matthew Cosier Microsoft support the PPS file extension. They don’t however include it as a default file type inclusion in MOSS.
Content will only be crawled if it’s extension exists in the file-type inclusions list *and* there is an IFilter available for it.
Because it’s actually a PPT, an IFilter does exist for it, which means you only need to include it in the file type inclusion list.
You can read more about this here:
http://technet.microsoft.com/en-us/library/cc179442.aspx
HTH,
Matthew Cosi [read]. Posted: Fri, Oct 17th '08 |
Moving content databases - WSS v3.0
Matthew Cosier http://technet.microsoft.com/en-us/library/cc287899.aspx
HTH [read]. Posted: Fri, Oct 17th '08 |
MOSS: Add to my links URL is incorrect
Matthew Cosier You might notice that when you click your “Add to my links” link on the actions menu, you’ll get a 404 as the link is actually incorrect, it might look something like this:
http://intranet_vti_bin/portalapi.aspx?Cmd=PinToMyPage
Notice how it’s missing the trailing slash? It should really look like this:
http://intranet/_vti_bin/portalapi.aspx?Cmd=PinToMyPage
The reason this happens is due to the PortalUrl property being invalid for your site. The link is actually gene [read]. Posted: Fri, Oct 17th '08 |
Server 2008 or Vista Virtual Machine Stops working with winload.exe is missing or corrupt
Matthew Cosier One of my virtual machines randomly died the other day, and I could no longer boot it. Whenever I booted it up, it came to a windows pre-boot error screen telling me that winload.exe was missing or corrupt. What the?
After a fair amount of playing about, I fixed it by putting in my server 2008 installation CD, clicking ‘repair my computer’, then ‘command prompt’, I then typed the following commands:
c:\
cd \windows\system32
bcdedit /set {bootmgr} device boot
bcdedi [read]. Posted: Mon, Sep 29th '08 |
Patrick Tisseghem
Matthew Cosier I woke this morning to read the sad news:
http://blogs.msdn.com/sharepoint/archive/2008/09/05/we-ll-miss-you-patrick.aspx
Patrick Tisseghem has passed away.
I can’t express how shocked, sad, and sorry I am to hear this news. Patrick was a really great guy, and he put so much energy and life into the SharePoint community - we will all really miss you mate!
It seems like it was only yesterday we were having a chat over skype - and now you’re gone. I can’t believe it.
Life i [read]. Posted: Sat, Sep 6th '08 |
A good example of MOSS Search capability
Matthew Cosier TV Guide have implemented MOSS Enterprise Search in quite a nice way. They have a bunch of videos which are meta-data tagged, they then use MOSS Enterprise Search to crawl and search the data.
http://video.tvguide.com/
The case study is an interesting read:
http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=4000000663
It displays a very nice example of the types of ways you can utilized search - it’s not just there to serve as a search utility for your intranet content and [read]. Posted: Tue, Aug 19th '08 |
SharePoint: WSS RPC’s
Matthew Cosier There exists a set of RPC (Remote Procedure Call) functions exposed by WSS which you can make use of in your applications, through a means of HTTP POST calls. You can find more detailed information about them , and the methods they expose here: http://msdn.microsoft.com/en-us/library/ms954090.aspx
One of them which I find really handy is the GetProjSchema function, which can be used to extract the XML definition used when creating a particular WSS site. For instance, you execute the command [read]. Posted: Mon, Aug 18th '08 |
Office SharePoint Server 2007 - Official SQL Server 2008 support
Matthew Cosier From the team blog:
http://blogs.msdn.com/sharepoint/archive/2008/08/15/sql-server-2008-support-for-sharepoint-products-and-technologies.aspx
“You may already be aware of the recent RTM announcement of SQL Server 2008. We are happy to announce that Office SharePoint Server 2007 SP1 & Windows SharePoint Services 3.0 SP1 now support SQL Server 2008. Our documentation has been updated to include support for SQL Server 2008. Please refer to:
Windows SharePoint Service 3.0
http://technet [read]. Posted: Sun, Aug 17th '08 |
WSS object model and databinding - simple.
Matthew Cosier The WSS object model is very straight forward, and when you mix it in with ASP.NET databinding, you can produce powerful results, with as little as 4 lines of code:
SPSite site = SPControl.GetContextSite(Context);
myContentTypes.DataSource = site.RootWeb.ContentTypes;
myContentTypes.DataTextField = “Name”;
myContentTypes.DataBind();
Cool… change that ContentTypes binding to any one of the SPBaseCollection’s within the RootWeb, and you’re set. [read]. Posted: Sat, Aug 16th '08 |
Required Content Placeholders in SharePoint Masterpages
Matthew Cosier I get asked quite often - what are the required content place holders I need to put into my sharepoint masterpage, so that it doesnt keep failing when I remove all of them?
Well, there’s actually a very good description of each content placeholder, what it is used for, etc within the WSS SDK. Generally what I do is set up a blank masterpage template which contains all of the required content placeholders, stored within a div with a display:none CSS attribute applied, and slowly bring in [read]. Posted: Sat, Aug 16th '08 |
Exposing properties in userprofiles using the SharePoint BDC
Matthew Cosier Just found this really nice article on how to expose calculated/updatable properties as part of your user profiles in MOSS, using the business data catalog:
http://blogs.msdn.com/maximeb/archive/2008/03/29/computed-profile-property-with-bdc-and-web-services.aspx
Essentially, what you do is create a BDC ADF which points to your custom web service that takes in a date, and returns an age. You then add a new profile property to your user profile within your SSP, and choose BDC as the source, alon [read]. Posted: Sun, Aug 10th '08 |
One ajax request at a time, please!
Matthew Cosier Found some code online today which is quite handy - stops/cancels the current async request if one is already underway…and sets the wait cursor in between….nice! This can prevent the ’scripts already loaded’ error.
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(initializeRequest);
prm.add_endRequest(endRequest);
var postbackElement;
// checks the PageRequestManager if the [read]. Posted: Thu, Jul 10th '08 |
Sales marketing tabs missing in CRM
Matthew Cosier Navigate to settings -> business unit settings -> users -> double click your user name -> uncheck the ‘restricted’ checkbox at the bottom. [read]. Posted: Thu, Jul 10th '08 |
CS1061: ‘System.Web.UI.Control’ does not contain a definition for ‘DataItem’ and no extension method ‘DataItem’ accepting a first argument of type ‘System.Web.UI.Control’ could be found
Matthew Cosier If you are using an update panel inside of a repeater’s ItemTemplate you must either use Eval() instead of accessing the data item directly, or you must explicitly cast the data item:
((System.Web.UI.WebControls.RepeaterItem)(Container)).DataItem
That is all [read]. Posted: Tue, Jul 8th '08 |
CRM Migration Manager - manager cannot connect to the Microsoft CRM server
Matthew Cosier I thought I’d just let you know about an issue that CRM has after an upgrade (or any other potential times where you have changed the original server URL, and/or port number).
CRM fails to update its internal record for the ‘expected’ root domain for accessing the server.
So if you install CRM 3.0 on port 2444, it will record http://servername:2444 as the expected base URL.
If you then perform any type of querying through the APIs, you must specify that URL as the base URL…..
N [read]. Posted: Wed, Jun 25th '08 |
World Wide Telescope is up and running
Matthew Cosier ‘Nuff said.
http://www.worldwidetelescope.org
M [read]. Posted: Tue, May 13th '08 |
Code Camp Oz April 08
Matthew Cosier It was great catching up with all the new Readify guys at Code Camp Oz this year - we had a blast.
Mahesh has taken some photo’s of the BBQ:
http://blogesh.wordpress.com/2008/04/29/code-camp-oz-barbie/ [read]. Posted: Tue, Apr 29th '08 |
System Centre Virtual Machine Manager 2007 (SCVMM) Crashes during installation
Matthew Cosier If your SCVMM install is crashing - and you debug the crash, and notice that the top of your callstack has a call to ‘GetFullyQualifiedName’ - I have your answer.
Basically, in order to install SCVMM you need to hook your machine to a domain. When you do this, it will place a local hosts entry (in c:\windows\system32\drivers\etc\hosts) for your domain like so:
127.0.0.1 myserver
127.0.0.1 myserver.mydomain
For whatever reason (a bug in SCVMM) it’s trying to perform a FQDN look [read]. Posted: Sat, Mar 15th '08 |
404 URL Rewriting with IIS7
Matthew Cosier This purpose of this post is to expose an issue(?) in IIS7 in the context of 404 URL rewriting.
To set up URL Rewriting in IIS 7, you basically go into the settings for your website, go to the custom error pages tab, double click 404 and set it to ‘execute url’ and provide it with a root-relative path to your aspx page, which is going to handle the actual 404 request, extract the path you requested, and rewrite appropriately.
The issue is, if you use any type of url encoding (ie /my% [read]. Posted: Wed, Mar 12th '08 |
Vista - logon failed: account is disabled.
Matthew Cosier If you are getting the account is disabled error when you are trying to log onto your vista machine through a UNC share \\my-computer\C$ (or something similar) - this is due to the enhanced security in vista, dis-allowing the admin account remote access to the machine via UNC (and I believe any other means except local login).
To fix/change this behavior do the follow:
1. Start -> run -> MMC -> OK
2. Add/Remove snap-in
3. Add the ‘Local Computer Policy’ snapin
4. Hit OK - e [read]. Posted: Sat, Mar 8th '08 |
Brand new ReGhost software released!
Matthew Cosier I bring you, the long awaited arrival of ReGhost!
http://www.reghost.net
What is ReGhost?
ReGhost is an application that was built quite some time ago, to deal with the unghosting issues prominant in Windows SharePoint Services 2.0, and SharePoint Portal Server 2003. Whenever a page/item was customised in an application such as SharePoint Designer - the content would become what they call ‘unghosted’. Meaning that the content is now stored and served from the database - it now [read]. Posted: Tue, Feb 19th '08 |
Request is not available in this context - Request not available at Application_Start in IIS7
Matthew Cosier In IIS 7.0, there now exists a new HTTP Pipeline called “Integrated Pipeline” or “IP”.’
One of the more noticable changes to IP is that the Application_Start event has now been pushed upwards, before the request object is created. This can cause issues if you have code referencing the Request object in Application_Start:
Request is not available in this context.
I came across this nice article on how the DNN guys got around this problem to support their Applicatio [read]. Posted: Thu, Feb 14th '08 |
Debugging ASP.NET - extremely slow. Huge CPU Usage
Matthew Cosier If you have this problem - simply do the following:
1. CTRL+D, B
2. Clear *every single breakpoint in that list*
Especially clear the ’special’ breakpoints, such as conditional breakpoints.
I just had a situation where I had 2 conditional breakpoints - very simple conditions, and it brought my entire debugging process to a screaming halt - it was unbelievably slow. Deleted the breakpoints - and now its super quick again.
Hope this helps someone out there! [read]. Posted: Thu, Feb 14th '08 |
Inserting HTML at the current cursor position in an editable iframe (designMode =”on”)
Matthew Cosier We have a requirement, where we need to insert some HTML into a telerik RAD editor control, at the current cursor position.
I thought this was going to be a peice of cake. Firstly, I didn’t realise that the telerik RAD editor control actually used an iframe, with an internal DOM set to designMode = “on”. This basically instantiates a document in “edit” mode, and within internet explorer (and I believe this works for most other browsers) will let you edit and pas [read]. Posted: Tue, Jan 8th '08 |
Locale Culture Identifier (LCID) - Listing
Matthew Cosier I found this nice list of LCID’s, that may come in handy for you one day, as it did for myself:
http://www.firmawebben.no/content/pages/Kanskje-nyttig/List-of-locale-ID-(LCID).asp
Happy Localizing! [read]. Posted: Mon, Dec 17th '07 |