Sharing Virtual Machines with TFS Workspaces

by brad 4. February 2010 09:22
We tend to use a virtual machine per external client so that we can keep things nicely separated. We can then easily add people to a project by giving them a copy of the virtual hard disk and they can be up and running in minutes (once they’ve renamed the guest machine name to avoid IP conflicts!) That worked fine until we started using TFS, where it would moan that the workspace doesn’t exist because its now a different user accessing TFS. After some digging i found the answer was to edit the following file: C:\Documents and Settings\[USER NAME]\Local Settings\Application Data\M... [More]

Tags:

Team Foundation Server

Customising TFS Work Item ‘Assigned To’ Column

by brad 26. January 2010 14:41
We’ve recently been looking at importing Microsoft Project tasks into TFS so that the developers can see their tasks inside visual studio. However the first snag was that TFS work items aren’t able to support more than one resource being assigned to them, a problem when your Project Manager has allocated more than one developer to do the same thing! Also some of the tasks in the project plan are assigned to the client, E.g. ‘Sign Off Wireframes’ and by default TFS will only allow you to assign work items to valid users than exist in your companies Active Directory. I got round the multiple r... [More]

Tags:

Team Foundation Server

FindControl() recursively using an Extension Method

by brad 26. January 2010 11:15
FindControl() is great if you’re looking for a control one level down, but if you’re making a dynamic control with n levels of child controls it can become a pain… Extension Methods to the rescue! Not only does it find the control your looking for at any level in the page, it also used generics to return the control without needing to cast it. /// <summary>/// Finds the control (Recursively) with an ID matching that given, of the Type requested. /// No need to cast either!/// </summary>/// <typeparam name="T">The type of control to return</typeparam>///... [More]

Tags:

ASP.NET | .NET 3.5 | C#

ActiveSync and Proxy Server

by Brad 4. September 2008 07:38
Our network guys recently added a proxy server to our network which has caused my Windows Mobile device to no longer sync with Exchange via ActiveSync. I thought that's annoying but its ok I will just set the proxy settings in ActiveSync... To my disapointment ActiveSync doenst have that option! After some investigation I discovered that if you change the "This computer is connected to:" value to "The Internet" (rather than "Automatic") it works fine! So in summary, with your device connected, in ActiveSync go to: File > Connection Settings > This computer is connected to: > Th... [More]

Tags:

Misc

Making an EPiServer Plug-in: Copying Page Type Properties

by Brad 21. August 2008 09:05
Following on from Steve's excellent post on how to copy one or more properties from one Page Type to another, I decided to share how easy it is to turn his hard work into an EPiServer plug-in so that it will appear in the admin area of the CMS. First you need to 'decorate' (that's an official term honestly!) your page with the following GuiPlugin attribute: [GuiPlugIn(DisplayName = "Property Duplicator", Description = "Duplicate Page Type Properties", Area = PlugInArea.AdminMenu, Url = "~/cms/Admin/DuplicatePageTypeProperties.aspx")] If you're not sure what that ac... [More]

Tags:

EPiServer Mail while running under .NET 3.5

by Brad 14. August 2008 14:56
I've just installed EPiServer Mail into an EPiServer CMS 5 SP2 site that is running under .NET 3.5 (yes i know its not officially supported but hey). Much to my annoyance I had 3 errors to fix - which simply meant removing 3 lines from the web.config that either the EPiServer Mail install (or the hotfix) added. The offending lines which must be removed are as follows: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, ... [More]

Tags:

Updating EPiServer Version: Login Failed for User ''

by Brad 14. August 2008 14:27
I've just spent too long trying to upgrade EPiServer CMS 5 to SP2 but kept getting the following error: Login failed for user ''. The user is not associated with a trusted SQL Server connection. Turns out the problem was that EPiServerManager was pulling the connection string out of my web.config, but it appears it was ignoring the fact it specified an Integrated/Windows connection and was passing an empty SQL username to the database - hence the empty quote marks above. (cheers for your help Steve!) Solution: Temporarily change the SQL connection string in the site's web.config to... [More]

Tags:

C# | EPiServer

EPiServer: Dynamic SiteMap.xml generator for Google

by Brad 12. June 2008 10:09
Having stumbled across Google's Webmaster Tools a while ago it's been in the back of my mind to create a custom HttpHandler to dynamically create a (virtual) SiteMap.xml file that Google (and other search engines) can use as a reference when spidering my sites. I thought I'd share the basic implantation as a starting point. Ideally you'd add a property to each EPiServer PageType page for "change frequency" and "priority" which the sitemap generator would then use, but for this basic version I've simply set the homepage to 1.0 (the maximum priority) with a daily change, and all other pages to ... [More]

Tags:

ASP.NET | C# | EPiServer

EPiServer: Get a Page's Friendly URL

by Brad 9. June 2008 11:33
As part of my Search Engine friendly SiteMap.xml generator (using a HttpHandler - expect a blog post shortly...) I needed to output the friendly URL for each page in the site. However a call to PageData.LinkURL returns the actual link to the page (example shown below), not a "friendly" one that gets displayed in the browser address bar, or in any Hyperlink within the site. /MySite/Default.aspx?id=26&epslanguage=en-GB I had a look through the EPiServer documentation and couldn't find anything obvious so resorted to creating my own method to do it (shown below). Simply pass the rele... [More]

Tags:

ASP.NET | C# | EPiServer

C#: Google Map Server Control - Part 2 - Custom EPiServer Property

by Brad 9. June 2008 09:24
This post tells you how to take what I discussed in Part 1 and turn it into a custom EPiServer property, so CMS user's can simply enter a postcode and it will call of to Google's Local Search API, return the Coordinates for the postcode and plot a marker on the map. The user can then drag the marker for a more exact location, set the zoom level and finally the type of map (Normal, Satellite or Hybrid). The data is then rendered on the public site using the code from Part 1. The screenshot below show's how it will look in EPiServer (click the thumbnail for the full size version): Creating a... [More]

Tags:

ASP.NET | ASP.NET AJAX | C# | EPiServer

C#: Google Map Server Control - Part 1

by Brad 6. June 2008 15:17
Following on from my Google Analytics server control, I wanted make something "cooler", so creating a Server Control to render a Google Map control seemed ideal. Part 1 covers the creation of the this control, stay tuned for part 2 which will focus on creating a custom EPiServer property so it can be used in the EPiServer edit area, featuring Geocoding to lookup the coordinates from a UK post code, Map type selection and zoom level. Anyway here's the generic bit that can be used on any site... First off we need a set of basic properties to hold Latitude, Longitude, Zoom Level and Map Type: ... [More]

Tags:

ASP.NET | ASP.NET AJAX | C# | EPiServer

C#: Google Analytics Server Control

by Brad 4. June 2008 11:20
Today I've been consolidating UserControls that I've found myself using in one EPiServer project after another into a nice Server Control library. One such control that gets used on every site (even non-EPiServer ones) is one which adds the Google Analytics JavaScript code to the page. I decided this would be the first UserControl to migrate. Firstly I created a constant GoogleAnalyticsJavaScript which holds the JavaScript string to be added to the page. The only change I needed to make was to dynamically add the unique Google Analytics tracking code that was generated specifically for my dom... [More]

Tags:

ASP.NET | C# | EPiServer

C# Register onUnload JavaScript programmatically in code-behind

by Brad 3. June 2008 14:22
Having just created a Google Map server control I spent some time trying to register the relevant unload scripts that the Google API demands. However there was no easy way to get access to the body tag, and I certainly didn't want to have to edit the body tag, adding runat="server" as that would ruin my nicely "wrapped" control, I simply want a developer to drag it out of their Visual Studio Toolbox and it work... So after some thought I tried the following, which worked a treat: //Now we need to add the google maps //ONUNLOAD JavaScript function (it its not be added already) if (!Page... [More]

Tags:

C#

EPiServer Language Selector

by Brad 28. May 2008 12:55
Today I needed to create a UserControl to allow a user to select to view the current page from a list of enabled languages. To begin with I thought it would be a fairly easy task, by simply calling GetLanguageBranches() in the DataFactory class. However this ONLY returns the versions of the page that have been translated, which didn't suit me as our requirement was that ALL (enabled) languages should be displayed in the language selector, and if a language version doesn't exist for the specific page then the fallback language be used. So next I tried looping through the results from EPiServe... [More]

Tags:

ASP.NET | C# | EPiServer

C#: Getting round the &quot;Indexed Pixel Format Issue&quot; in GDI+

by Brad 21. May 2008 09:49
If you've ever tried to manipulate images in C# using GDI+ you'll almost certainly have come across the following error at some point: a graphics object cannot be created from an image that has an indexed pixel format I know I have, and it took a fair bit of effort to find the solution so I thought I'd share it. Here's a quick background on Pixel Formats... In 'Non Indexed' images, each pixel represents ONE colour. So a pixel might have a value &h0000FF (Red). In 'Indexed' images each pixel value is an index to a so-called 'palette' or 'colour table'. So a pixel might have a va... [More]

Tags:

C#

SharePoint: 'Theme already exists on server' Error

by Brad 20. May 2008 13:39
I've just been (struggling) to create a new theme for SharePoint but kept getting the following error: A theme with the name "MY-THEME-HERE 1011" and version already exists on the server It turns out that my ThemeID (and the name of the folder) were too long - how the error message above gives any indication of that is beyond be! Anyway all you need to do is make sure the ThemeID is a maximum of 8 characters. Once I shortened it everything worked fine. I'm new to SharePoint so ignore me if this 'common knowledge' - I thought I'd share for any other newbies out there...

Tags:

Microsoft SharePoint

URL Rewriting: ASP.NET HyperLink ImageUrl Bug

by Brad 20. May 2008 08:12
I've been experimenting with writing my own C# URL Rewriter using a HttpModule. It's surprisingly simple as .NET kindly has the following (where newURL is the path to the actual file) : HttpContext.RewritePath(string newURL) So this allows a URL such as: /my-friendly-url to actually point to: /pages/content.aspx?id=5   Problem: All was going well, but some pages were giving the following error for no apparent reason: Cannot use a leading '..' to exit above the top directory. After some investigation I tracked the problem down to any asp.net Hyper... [More]

Tags:

ASP.NET | C#

How to access Session in custom HttpHandler

by Brad 19. May 2008 08:38
Creating a custom HttpHandler is fairly simple, all you need to do is implement the IHttpHandler interface. public class MyHttpHandler : IHttpHandler I recently needed to access the Session object from within my HttpHandler to check if a value existed, however the HttpContext.Session object was always null! After several minutes of pulling my hair out I discovered I simply needed to implement an additional 'marker' Interface. As I only needed Read Only access to the session object I used IReadOnlySessionState as follows: public class MyHttpHandler : IHttpHandler, ... [More]

Tags:

C#

Better IIS Logging

by Brad 16. May 2008 10:36
I was recently trying to check if IIS's SMTP sever was working correctly. To help I turned on the logging, leaving the default "W3C Extended Log Format" selected. I sent the test email and checked the log - to say it was unhelpful is an understatement! I was wrongly assuming that "extended" format meant it would have more information than the other logging formats which didn't have "extended" in their name! Enter Steve who suggested I change the format to Microsoft IIS Log File Format (shown in the image below). I did, and the log file was suddenly completely what I was expecting and I could ... [More]

Tags:

Misc

Indent ListItems in DropDownList

by Brad 13. May 2008 14:30
If you've ever wanted to indent ListItems in an ASP.NET DropDownList you've probably come up against a brick wall if you use a simple space. It will indent in the actual HTML OK, but browsers will simply ignore the whitespace and render all the items inline. The trick is to do the following to enter the space, not use the spacebar: Hold down "ALT" while typing 0160

Tags:

C#

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar