ObjectSharp

The leading provider of Microsoft technology solutions and services in Canada: Silverlight, SharePoint, and .NET.
Welcome to ObjectSharp Sign in | Join | Help

Front Page News

  • Generate a Data Driven Coded UI Test from an Action Recording

    One of the very cool new features of VS 2010 and TFS is the ability to turn a manual test into an Automated UI test. As if that wasn’t cool enough how about making it Data Driven and bind it to the original Test Case created by QA. Using the new Test Manager that comes with VS Ultimate 2010 your test team can create Test Cases using parameters instead of hard coded data values. This allows the manual test to be executed over multiple iterations and validate several scenarios using just one Test Case. If you have such a Test Case stored in TFS it will look something like this. Notice the @Value1, @Value2 and @Result under the Action and Expected Result. They represent parameters whose values that are listed below, the steps. Assuming the test team executed this Test Case and created an Action Recording. Which means they let Test Manager record their actions while they ran through a manual...
    03-16-2010, 7:02 PM by dave to Dave Lloyd's 2 Cents
  • MIX 10 – First Impressions

    Once of the interesting elements of this year’s MIX is the complete domination of Twitter as a medium for distributing updates. If you have been following me on Twitter (I’m @LACanuck), then you will already have heard a lot about the Windows Phone 7 development announcements. However, as useful as Twitter is, it’s not really a place for opinion. Unless your opinions fit into <140 characters. Mine don’t Windows Phone There is no question that there is a lot of buzz around developing apps for the Windows Phone 7. This is completely understandable, as WP7 allows Silverlight developers the ability to create applications for the phone. According to Scott Gu’s keynote, there is only “one Silverlight”. That is to say that applications that run on the browser should also be able to run on WP7. Now there is going to be a little bit of a reality check for that statement, especially as we hit Silverlight...
  • Expression Blend Pro Tip: Add your own sample data lists

      Expression Blend (3 and higher) lets you create Sample Data Sources, and for each property, select a data type and sample data format, such as Lorem ipsum, Colors, Company Names, Names, etc. It’s a nice list, which is great for prototyping. However, if you want to add to this list of types, or just edit the potential values for each type, you can do edit a simple csv file. In your Blend program directory, you will find a “SampleDataResources” folder. Inside this you will find an Images folder (in case you don’t set your own folder when creating a property) and a Data folder that stores the sample string data. C:\Program Files (x86)\Microsoft Expression\Blend 3\SampleDataResources\en\Data You can edit this file in excel and simply edit the values or even add new columns. Windows 7 or Vista doesn’t find it cool to be editing any file underneath your Program Files folder, so you’ll either...
  • SharePoint 2010: Managed Service Accounts

    SharePoint 2010 allows administrators to pre-configure service accounts to be used when configuring SharePoint components. This way administrators don't have to remember or lookup usernames and passwords for service accounts every time they configure a new web application or SharePoint service. To configure managed service accounts in SharePoint 2010: Open SharePoint Central Administration Click on Application Management | Manage Web Applications Click on New button on the ribbon Fill in the text fields in IIS Website, Security Configuration, and Public URL sections, until you reach Application Pool section. This is where the fun begins... You can use one of already preconfigured managed accounts or create new one. To use an existing managed account simply pick one from the drop-down list. To create new managed account, click on Register New Managed Account Fill in the username and password...
    03-04-2010, 4:44 PM by max to Max Yermakhanov's Blog
  • The Benefits of Windows Azure

    The age of cloud computing is fast approaching. Or at least that's what the numerous vendors of cloud computing would have you believe. The challenge that you (and all developers) face is to determine just what cloud computing is and how you should take advantage of it. Not to mention whether you even should take advantage of it. While there is little agreement on exactly what constitutes 'cloud computing', there is a consensus that the technology is a paradigm shift for developers. And like pretty much every paradigm shift there is going to be some hype involved. People will recommend moving immediately to the technology en masse . People will suggest that cloud computing has the ability to solve all that is wrong with your Web site. Not surprisingly, neither of these statements is true. And, as with many other paradigm shifts, the reality is less impactful and slower to arrive than the...
    03-01-2010, 10:03 AM by bruce to Bruce Johnson's SOA(P) Box
    Filed under: , ,
  • Silverlight Binding Lesson

    I learned a very important lesson about binding in Silverlight that I thought I would share.  Here is what I was trying to do: <TextBlock Text=”{Binding Path=MyPeople, Converter={StaticResource OldestPersonNameConverter}}” /> MyPeople is a collection of People and the converter is going to take that collection, find the oldest person and return their name.  I thought this would just work and it does the first time.  However in this case, adding a new person to MyPeople will NOT trigger the binding to update, your converter will never run again. Right? Wrong?  I’ve been debating the point with a few people at Objectsharp, and I didn’t expect this to fail (some did).  I was under the assumption that binding was binding, the magic behind the covers would look for INotifyPropertyChanged or INotifyCollectionChanged regardless of the property you are trying to bind....
    02-05-2010, 11:40 AM by dan to Dan's Blog
    Filed under:
  • TFS 2010 Web Access “access denied” error

    If you're getting "Access to the path 'C:\ProgramData\Microsoft\Team Foundation\Web Access\Cache' is denied" error when you try to access TFS 2010 Beta 2 via the Team Web Access, the problem most likely lies with missing NTFS permissions on the above-mentioned Cache folder. This problem often happens when you're running your TFS 2010 server on a domain controller, which is not ideal, but sometimes unavoidable, especially if you run all-in-one server setup. There are two possible workarounds: First workaround is to assign Modify NTFS permissions on Cache folder on the TFS server to the service account used by SharePoint application pool in your TFS environment. Most likely, your SharePoint application pool (by default) runs under Network Service built-in account. Second workaround is changing SharePoint application pool to run under a domain account instead of Network Service account. I have...
    02-03-2010, 2:28 PM by max to Max Yermakhanov's Blog
    Filed under: , ,
  • Microsoft SharePoint 2010 Upgrade Planning

    I recently came across draft guidelines from Microsoft that describe the requirements and considerations for planning to upgrade to SharePoint 2010. It's a one page document. It's easy to read to and to the point. I found it quite useful. Microsoft describes this document as: "This model covers planning for an upgrade from Microsoft Office SharePoint Server 2007 or Windows SharePoint Services 3.0 to SharePoint 2010 Products. It includes information about the following: Upgrade requirements: Hardware, operating system, and database Upgrade process: specific steps to follow before, during, and after the upgrade" You can download it from Microsoft Download Center: http://www.microsoft.com/downloads/details.aspx?FamilyID=eef6f604-9faa-4ea8-b000-569c656b7420&displaylang=en...
    02-02-2010, 5:10 PM by max to Max Yermakhanov's Blog
    Filed under:
  • WCF Ria Services vs Entity Framework

    This is a quick tip for anyone using WCF RIA Services with Entity Framework.  The WCF RIA Services team has fixed what I consider a fairly annoying ‘bug’ with Entity Framework.  In Entity Framework the EntityCollection class does not implement INotifyCollectionChanged, however the client side EntityCollection class that RIA uses is part of the RIA framework and they have fixed this issue.  They have explicitly implemented the interface however so you will need to cast the EntityCollection to a INotifyCollectionChanged before you see the CollectionChanged event....
    02-01-2010, 11:20 AM by dan to Dan's Blog
    Filed under: ,
  • Order Fixation

    One of my current tasks for a client has been to facilitate the integration between a Java client and a WCF service. The mechanism for doing this is JSON and I have been quite grateful that WCF makes it relatively easy to implement this type of communication. However, there is one area that has been causing some grief for me (and my Java colleagues) that I finally create a workaround for yesterday. The source of my problem starts with the contract used by the WCF service. A number of the methods include parameters that are abstract data types. Consider the following class declaration. [KnownType(ButtonCommand)] [KnownType(MouseCommand)] [DataContract] public abstract class AbstractCommand The AbstractCommand class is just a base class for a couple of concrete classes (ButtonCommand and MouseCommand). The WCF method is declared as accepting an AbstractCommand type, but the value passed into...
  • RIA Services XMLMetaDataProvider and Dynamic Assemblies

    If you are using the XMLMetaDataProvider and have a dynamic assembly reference your service might fail with the following error:            The invoked member is not supported in a dynamic assembly There are two fixes for this problem, one is to use the full attribute names.  So ‘DisplayAttribute’ instead of just ‘Display’.  Second option is to fix the code in MetadataSet.cs.  The problem is with the TryGetType method around line 421.  You should be able to find the code below, the GetExportedTypes needs to be changed to GetTypes.  1: // TODO : the metadata file might need a way to specify the set 2: // of source assemblies to load from - for now search all loaded assemblies 3: foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) 4: { 5: foreach (Type t in assembly.GetTypes()) 6: { 7: if (t.Name ==...
    01-15-2010, 7:12 PM by dan to Dan's Blog
    Filed under: ,
  • Running SharePoint 2010 on a domain controller

    If you need to run SharePoint 2010 on a domain controller, then you have to run the following PowerShell command on your SharePoint server to enable Sandboxed Solutions : $acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $person = [System.Security.Principal.NTAccount]"Users" $access = [System.Security.AccessControl.RegistryRights]::FullControl $inheritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit" $propagation = [System.Security.AccessControl.PropagationFlags]::None $type = [System.Security.AccessControl.AccessControlType]::Allow $rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access, $inheritance, $propagation, $type) $acl.AddAccessRule($rule) Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl This PowerShell command will add an ACL access rule on your server, without which SPUCWorkerProcess.exe...
    01-15-2010, 4:34 PM by max to Max Yermakhanov's Blog
    Filed under: ,
  • WCF RIA Services XMLMetaDataProvider Problem

    The current RIA Services project I’m working on has been using the XMLMetaDataProvider due to the fact that our model and DomainService are in different projects.  This rules out defining your metadata in a partial class for each entity.   As the project got bigger we noticed that randomly our metadata was not being created at build time.  Turns out there is a race condition with loading the XML file and the requests for metadata.  Here is the new XmlMetadataProvider.cs file where we now load the dataset in the constructor, not the first time it is requested.  After all that, I think we’ll try using Nikhil Kothari’s fluent API style , I like the look of it over the mass amount of XML. 1: internal class XmlMetadataProvider : TypeDescriptionProvider 2: { 3: private Type domainServiceType; 4: private MetadataSet metadataSet; 5:   6: /// <summary> 7: ///...
    01-14-2010, 8:52 PM by dan to Dan's Blog
    Filed under: ,
  • Setting the Default Style for a Custom Silverlight Control

    Like so many of my posts, this one is as much about keeping a log of what I learned. And, in this particular case, since I had a difficult time finding the answer (and the answer is relatively new), a blog posts is doubly worthwhile. I was trying to write a custom control for Silverlight 3. It was an extension to a ListBox, so I created a class that derived from ListBox and added my neat-o cool functionality. However, part of the requirements for the control was (for example) that it needed to be horizontal and that the scroll bars needed to be hidden. For this, the best approach is to define a default template for the control. The default template is basically the style that is applied to the control in the absence of designer requests to the contrary. Practically, it is exactly the same as any other style that you would create. What makes it different is that the user of the custom component...
    01-14-2010, 9:47 AM by bruce to Bruce Johnson's SOA(P) Box
  • Happy New Year

    It’s been over a month since I wrote an blog entry. I have reasons, Christmas, time off, New Years. I paved my main machine too, it was time. Put a fresh install of Windows 7 on a brand new Solid State Drive. It’s crazy fast. Of course that means fresh installs of everything. Everyday software gets installed first and then I move on to secondary stuff that I don’t use everyday, like Live writer.  I am going to try and get out more Blog entries on what's new in 2010. At the moment I am pretty busy. Besides helping with day to day business. I have several presentations coming up. Today Adam Gallant and I are doing a Web Cast titled Quality Assurance in VSTS 2010 . On January 21st Jeff Zado  and I will be in Waterloo to discuss Better Application Lifecycle Management with VS 2010 On January 27th Deb Forsyth and I will be at the CTTDNUG in Kitchener presenting What’s new in TFS 2010...
    01-12-2010, 10:16 AM by dave to Dave Lloyd's 2 Cents
  • Blank page instead of the SharePoint Central Administration site

    If you're getting a blank page when you are trying to access SharePoint Central Administration site, then check your IIS settings. To be more specific, check the authentication settings for SharePoint Central Administration website in IIS. Make sure that you have Windows Authentication enabled and Anonymous Authentication disabled . This must be the shortest blog post I have ever written. But taking into consideration that it was written on the first day of work after the holiday season, it's not so bad. Happy New Year everyone!!! J...
    01-04-2010, 11:45 AM by max to Max Yermakhanov's Blog
    Filed under: , ,
  • Merry High Tech Christmas!

    December 23, 2009 Well, it's Christmas time again. Time for all to revive and treasure the traditions of yesteryear, but also to embrace new customs like…a Christmas blog. Yes, this year I multitasked to such a great extent that my bandwidth was greatly compromised. I did not send out Christmas cards. I did not host a Christmas party. I did not even attend ObjectSharp's Christmas party. I was out of the country on training! Fortunately, I work with an amazing team at ObjectSharp. We're a group of extraordinary individuals, excelling in our chosen technical and business roles. But far more significant than our market worth, in my opinion, is our humanity. So although I missed the ObjectSharp Christmas party, I shortly after received an email toting a large attachment from one of my esteemed colleagues. It was a video Christmas card. From Toronto to California, via Cisco routers and fiber optic...
    12-23-2009, 5:21 PM by Julie to Julie`s Blog
  • Integrating TFS 2010 with SharePoint 2010 beta 2

    It is definitely possible to use SharePoint 2010 beta 2 with TFS 2010 beta 2. You don't even need to do a lot of work to get them working together. A few things to consider: SharePoint 2010 beta 2 must be preinstalled (either on the same or separate machines) since TFS configuration wizard will not install SharePoint 2010 for you (only can only install WSS3) You need to manually enable TFS to log diagnostics information to SharePoint 2010 logs, because Microsoft changed the trace mechanism used in SharePoint 2010. To do that open SharePoint 2010 Management Console and type in Set-SPDiagnosticConfig –AllowLegacyTraceProviders Since we are dealing with beta products, some things in the project dashboards might look a bit funny in IE8 And last, but not least, if you decide to go with SharePoint 2010, do not forget to allocate a LOT of memory to SharePoint server (physical or virtual) because...
    12-03-2009, 5:59 PM by max to Max Yermakhanov's Blog
    Filed under: , ,
  • Using local accounts in SharePoint 2010 complete install

    If you want to install and configure SharePoint 2010 in a standalone environment, but you do not want to use SQL Express and/or if you it to run in a workgroup environment, by default SharePoint 2010 configuration wizard will not allow you to do that. There is a way to get around this limitation though: Open SharePoint 2010 management shell, (you can find it at the same location as the SharePoint Central Administration link) Type in New-SPConfigurationDatabase to create new SharePoint configuration database manually Enter the name of the new SharePoint configuration database and hit Enter Enter the credentials that you want to use to create new SharePoint configuration database. Enter the password for those credentials when you get prompted to type in a passphrase and hit Enter. Your new SharePoint configuration database will now be created, just wait a few seconds/minutes. Run SharePoint...
    12-02-2009, 4:07 PM by max to Max Yermakhanov's Blog
    Filed under: ,
  • Find bottlenecks in Windows 7

    From what we've seen so far Windows 7 is already performing better than Vista, but if your PC seems sluggish then it's now much easier to uncover the bottleneck. Click Start, type RESMON and press Enter to launch the Resource Monitor. Click the CPU, Memory, Disk or Network tabs. Windows 7 will immediately show which processes are hogging the most system resources. The CPU view is particularly useful, and provides something like a more powerful version of Task Manager. If a program has locked up, for example, then right-click its name in the list and select Analyze Process. Windows will then try to tell you why it's hanging - the program might be waiting for another process, perhaps - which could give you the information you need to fix the problem....
    11-25-2009, 12:05 PM by max to Max Yermakhanov's Blog
    Filed under: ,
  • Cannot move, hide, or add anything in SharePoint navigation menu

    Yesterday I have witnessed a very weird behaviour of SharePoint navigation menu. Basically, SharePoint refused to save any changes (add/remove, hide, move, etc.) to SharePoint navigation menu. To make things even more confusing, it did not throw any errors or warnings in the event logs or SharePoint logs when this happened! In the process of troubleshooting this problem, we have systematically eliminated navigation provider(s), master pages, pages layouts, web.config(s), etc. as a potential source of this problem. We have checked everything and we're not able to come even close to finding a solution. Just before we started to plan on rebuilding the entire SharePoint environment to solve the problem, we have (almost accidently) found what was causing the problem. It turns out that what was causing this weird behaviour is that a default value of a single Boolean variable (_spSuppressFormOnSubmitWrapper)...
    11-25-2009, 10:43 AM by max to Max Yermakhanov's Blog
    Filed under: ,
  • Clip, a little utility for the command line.

    Included in Windows Vista and Windows 7 is a little command line utility called Clip. It's very simple: it pipes the output of your command to the clipboard. Here's how you might use it: c:\Users\Jon>dir | Clip It can also be used as a command with a file as an argument, to place the contents of the file in the clipboard: c:\Users\Jon>Clip < foo.txt Then just ctrl+v to your heart's content....
    11-24-2009, 3:35 PM by jdewees to Jon's bytes
    Filed under: , ,
  • Installing SharePoint 2010 on Windows 7

    I installed the public Beta of SharePoint 2010 on Windows 7 last night. There were several resources on the web to use as a guide, I found this one to be the best: Setting Up the Development Environment for SharePoint Server There are a couple main points you need to be aware of: The setup contains a config file that must be edited to allow SharePoint to be installed on a Windows 7 or Vista There are several prerequisites required before you install There are a few hotfixes required after the install but before running the SharePoint Configuration Wizard Install Visual Studio after you install SharePoint (this isn’t in the guide)...
    11-17-2009, 10:19 AM by rwindsor to Rob Windsor's Five Cents
    Filed under: ,
  • Build Process Templates

    Making a build script do exactly what you want is easier with 2010? When setting up a build there has always been a separation of concerns. The Build Definition The Build Process Creating the build definition is much like you are use to in 2008. Right click on the builds node in the Team Explorer and select New Build Definition. It’s no longer a modal wizard, however it’s the same of information. Name and Description How you want the build to be triggered Working folders Build Server and Drop Location Retention Policy However there is a big difference, and it relates to the separation of concerns I mentioned above. In 2008 you could create a project file, that you would later have to edit to get the build to do anything extra ordinary. When you hit create on the project file tab you would be launched into another wizard that allowed you to select the solution to build, the type of configuration...
    11-16-2009, 10:38 AM by dave to Dave Lloyd's 2 Cents
    Filed under:
  • Conflict Resolution in TFS 2010

    The conflict resolution in previous versions of VSTS/TFS worked ok, but did not have the best user experience for the developer. When a conflict was detected on check in a modal dialogue was dispatched and the developer could resolve the conflicts from there. However getting to all the information you required to resolve the conflict was not at hand.   In TFS 2010 when you attempt to check in a conflict VS behaves the way it does when you have violated a Check in Policy. One mark for consistency. You will get a warning message as seen below. Then you will be redirected to the Pending Changes - Conflicts Tab .  From the conflicts tab you can get at the information you need to help you resolve the conflict. Compare – Compare the local file with the latest version in source control. History – See the complete history of all changes to this file. Annotate – Shows you the source...
    11-09-2009, 10:00 AM by dave to Dave Lloyd's 2 Cents
    Filed under:
More Posts Next page »