Didsbury Design Blog

Resolve Multiple Default Views in Microsoft Dynamics CRM 2011 (Supported)

April 23rd, 2012

Every now and then, with Dynamics CRM 2011 (and CRM 4), you can end up with two default views for the same Entity. It seems to occur when you import a solution with certain customizations to an entity.

I think in our case it occurred when we renamed the Account entity to be Organisation. A supported way of resolving this is outlined below.

  1. Create a new view on the same entity called ‘fix’ and assign some filter criteria (it doesn’t matter what)
  2. Set the new view as the default
  3. Publish your changes
  4. Open the new view, go to more actions and delete it. You can’t delete it from the main list of views as you will get an error “You cannot delete a default view until you have specified another view as the default”
  5. Publish your entity again

You should now only have one default view and no more problems!

Matching a W3wp Process to an Application Pool / IIS Site

November 4th, 2011

OK so maybe you are trying to:

  • Debug a website
  • Debug a web service
  • Debug another .NET app

So you go into Visual Studio, Debug menu, Attach to process…

SO you are looking for the w3p.exe process, but there are loads!

Here is how to match up which process related to your application pool or IIS site.

Server 2003
Open a command prompt (run as administrator)
C:\Windows\System32\inetsrv>cscript.exe C:\Windows\System32\system32\iisapp.vbs

Server 2008
Open a command prompt (run as administrator)
%windir%\system32\inetsrv\appcmd.exe list wp

If you get an error WAS service not started – make sure you opened command prompt as an administrator!

Hope this helps someone else quickly attach to the right process.

Alternatively attach to them all if you are lazy ;)

Microsoft Certified Technology Specialist for SharePoint 2010

August 30th, 2011

Andrew, the founder of Didsbury Design has now successfully passed the Microsoft Certified Technology Specialist (MCTS) for SharePoint 2010 exam. This means we are now much better equipped to take on SharePoint projects and to advise others on similar work.

We are aiming to achieve more certifications throughout 2011 to help us grow and be able to assist our clients in a broader area of subjects.

Please don’t hesitate to get in touch if you have any projects coming up you wish to discuss.

All the best,

Didsbury Design Team

Carbon Neutral Web Hosting from Didsbury Design

November 23rd, 2010

We are proud to announce that our web hosting is now carbon neutral. Below is a description from our award winning provider.

As a responsible hosting provider, we have recognised the need to develop carbon efficient hosting solutions to reduce our environmental impact.

Data centres, which are necessary for housing servers and providing hosting services, use a large amount of energy and emit tonnes of CO2 every year.

In fact, data centres worldwide are expected to generate 533 million tonnes of CO2 by 2020 (Carbon Trust).

Becoming carbon neutral we are now a carbon neutral business, working with one of the world leaders in carbon management to offset carbon emissions.
In addition, we have achieved PAS 2060 certification – making us the 1st certified carbon neutral hosting company in the UK:

  • 100% carbon neutral office and data centres
  • 100% carbon neutral for all current client hosting solutions (free of charge)
  • 100% carbon neutral for all new client hosting solutions (free of charge)

Canonical URLs in your ASP.NET MVC2 / MVC3 Application

November 15th, 2010

What are canonical links used for
The Canonical link element was introduced in 2009 to help cleanup duplicate pages on search engines.
The html code is shown below and it basically informs search engines of the primary URL for that page. This means any alternative entry points to that page will not be picked up as duplicate content. This HTML must be specified in the HEAD section of the document.

<link rel="canonical" href="http://example.com/page.html"/>

The search engines have also posted about this on a Google blog post or help center documentation from Google, Yahoo’s blog post, or Microsoft’s blog post.

How to easily use canonical links in MVC2 using Action Filters and Master Pages

Add this to the master page in the head section as follows:

    <%=ViewData["CanonicalURL"] %>
    <!--Your other head info here-->

Create a Filter Attribute (CanonicalURL.cs):

public class CanonicalURL : ActionFilterAttribute
{
    public string Url { get; private set; }
 
    public CanonicalURL(string url)
    {
       Url = url;
    }
 
    public override void OnResultExecuting(ResultExecutingContext filterContext)
    {
        string fullyQualifiedUrl = "http://www.example.com" + this.Url;
        filterContext.Controller.ViewData["CanonicalUrl"] = @"<link rel='canonical' href='" + fullyQualifiedUrl + "' />";
        base.OnResultExecuting(filterContext);
    }
}

Call this from your actions:

[CanonicalURL("Contact-Us")]
public ActionResult Index()
 {
      ContactFormViewModel contact = new ContactFormViewModel(); 
      return View(contact);
}

For some other interesting articles on Search Engine Related posts check out Matt Cutts blog

ASP.NET MVC 3 Release Candidate is now available

November 10th, 2010

ASP.NET MVC 3 Release Candidate is now available for download. Phil Haack has written an article about it and also mentions the intentions for MVC 4.

Phil Haack’s blog post: ASP.NET MVC 3 Release Candidate

Direct download: MVC 3 RC Download

Zero7Web becomes Didsbury Design

October 26th, 2010

After a few months of discussions and ideas being passed around we are now finally in the final stage of our re-brand.

Didsbury Design is the new name for Zero7Web. We will be offering the same high quality services as before, with extra services being added.

Website Hosting Upgrade

We have invested in a new, faster, even more reliable web hosting provider which means our clients websites will load even quicker than before! We can pass on our providers 100% network uptime guarantee and we are also proud to announce our web hosting is the first in the UK to be carbon neutral.

The hosting upgrade will not affect prices for current clients, although we will start to bill for domain names separately from now on which still keeps our prices very competitive.

Windows .NET 4 / MVC2 Support

We can now support additional languages for web development including Microsoft SQL, Classic ASP and the .NET framework including version 4.0.

We hope you like the new website and we very much look forward to working with you in the future.

Didsbury Design Team

Cheshire Wood Flooring Website goes live

June 4th, 2010

Cheshire Wood Flooring approached us for a website to promote their services and to expand onto the web.

The site is now looking great and is online.

Cheshire Wood Flooring

How to: Create and Delete a cookie in ASP.NET C#

April 29th, 2010

I thought I would do a quick post about Creating and more importantly Deleting cookies in ASP.NET as it’s not quite as obvious as it may seem with the misleading .Remove() method which doesnt do as you would expect.

I hope this helps someone get started with cookies if your just getting started with the .NET framework.

Creating a cookie

This is a basic example of how to create a cookie in ASP.NET C#

//Create a new cookie, passing the name into the constructor
HttpCookie cookie = new HttpCookie("MyCookie");

//Set the cookies value
cookie.Value = "CookieValue";

//Set the cookie to expire in 1 day
cookie.Expires = DateTime.Now.AddDays(1);

//Add the cookie
Response.Cookies.Add(cookie);

Deleting a cookie

When deleting a cookie all you need to do is amend the HttpCookie object so it has an expiry date in the past, then re-save the cookie to push the new value to the client.

// Clear cookie Info
            if(Request.Cookies["MyCookie"]!=null){

                HttpCookie cookie = Request.Cookies["MyCookie"];
                cookie.Expires = DateTime.Now.AddDays(-1);

                Response.Cookies.Add(cookie);
            }

NAB Communications website now online

April 20th, 2010

NAB Communications approached us for a website to promote their services and to help to reach new clients. The site has it’s own basic Content Management System and has been built to a custom specification.

We will now be keeping a close eye on the sites traffic and we will be working closely with Deborah to help her achieve the online success she deserves.