• Code Tips

    How to resolve: “Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive”

    When trying to deploy my WCF service. I was getting the error “Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive” on an ASP .NET 4.0 website. I first thought that this was happening because .NET 4 was not on the server, but even after installing .NET 4 the problem persisted. The error was caused by the application pool targeting the wrong .net framework. To resolve the problem : Change the application pool to the correct .net framework and the error will be resolved.

    Comments Off on How to resolve: “Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive”
  • Code Tips

    jsFiddle – A playground for web developers

    jsFiddle is a playground for web developers, a tool which may be used in many ways. You can use it as an online editor for snippets build from HTML, CSS and JavaScript. Share your Fiddle. Embedded on a blog, tweet URL to edit or result page. Using this approach, JavaScript developers can very easily isolate bugs. Many actively developed frameworks are supported – it helps with testing backward compatibility of your plugins. Your code may be shared from GitHub and displayed as new Fiddle. Draft functionality provides an ability to test your Fiddle in many devices or browsers. To go to the site and take a look just click here.

    Comments Off on jsFiddle – A playground for web developers
  • Code Tips,  Mobile Development

    New Mobile View Engines for ASP.NET MVC 3, spec-compatible with ASP.NET MVC 4

    Today i have been playing with view engines for MVC3 and I found this great update by Scott Hanselman, which is an upgrade to the demo that was shown at Tech Ed 2011 USA. Following this was straight forward and produced results straight away for the IPhone, but the IPad would not be seen as a mobile device and so more investigation to get this to work was nessecary. The answer is in Scotts blog with the lite version of 51Degrees.mobi and i will post the setup required for this next. http://www.hanselman.com/blog/NuGetPackageOfTheWeek10NewMobileViewEnginesForASPNETMVC3SpeccompatibleWithASPNETMVC4.aspx

    Comments Off on New Mobile View Engines for ASP.NET MVC 3, spec-compatible with ASP.NET MVC 4
  • Code Tips,  Mobile Development

    Improving device detection using the 51Degrees.Mobi package

    This is a reposting of information found in Steve Sanderson post a link to the complete article is below. using-51degreesmobi-foundation-for-accurate-mobile-browser-detection-on-aspnet-mvc-3/ 51Degrees.Mobi Foundation is an open source .NET project that enhances Request.Browser so it gets its information from Wireless Universal Resource File (WURFL) – one of the most comprehensive and up-to-date databases of mobile device information. The great news is that 51Degrees.Mobi Foundation is now available as a NuGet package, so it’s incredibly easy to install and update. If you haven’t already installed the NuGet package manager, do so right away! Next, install 51Degrees by entering the following into the NuGet Package Manager Console: Install-Package 51Degrees.mobi Easy! This does the following…

    Comments Off on Improving device detection using the 51Degrees.Mobi package
  • Code Tips

    How to Connect to SQL Server 2008 R2 Using EF and MVC 3

    This has taken me all day to figure out and the errors that i have been getting back all suggested that there was a connection problem to the server. As it turns out you need to add a reference to your dabase connection in the model context file, it was so simple in the end it was stupid, but it is amazing how hard it was to find the answer. as long as this matches what is in your web.config file connection to the database should be made.below is a link to the webpage that sorted things for me.how-to-connect-to-sql-server-2008-r2-using-ef-and-mvc-3

    Comments Off on How to Connect to SQL Server 2008 R2 Using EF and MVC 3
  • Code Tips

    Setup for Github:Gist

    Interestingly I have found that all you need to add your Gist entry is a Github account, there is no need to setup a repository and install the Github GUI if all you want to do is post code snippets. Once you have a Github account you can log into the Github Gist website and create all the gists you want. Very easy and a nice way to post well formatted code samples with no additional tweeking.

  • Code Tips

    C# Suffix Examples, Numeric Suffixes

    Numeric suffixes, which are also called literal number suffixes, are hints to the compiler that a literal number is of a certain type. Recall that “literal” means a value hard-coded into your program. Investigation revealed that literal suffixes on constants actually generate conv instructions. This means they work the same as runtime casts. https://gist.github.com/1922826

    Comments Off on C# Suffix Examples, Numeric Suffixes
  • Code Tips

    Scaffold your ASP.NET MVC 3

    I have just been playing around with Scaffolding for MVC3 and i am very impressed. It certainly makes it a lot easier to quickly develop applications, and using the code first approach with Entity Frameworks works very well. I have found a post on Steve Sanderson’s blog which outlines the process step by step, it is really well done and a great reference. Scaffold your ASP.NET MVC 3 project with the MvcScaffolding package