Posts

Using the SQL Server Export generating an excel spreadsheet from an access database

Image
What a wordy title, go read it again, it's crazy but true. This post covers generating an Excel spreadsheet from an Access Database but using a SQL Server tool. It's crazy but great and easy! Welcome! I am assuming you have SQL Server installed and the import export wizard, if you don't have this go get it first before carrying on. First up open the Import and Export Data application, note this has to be the x86 edition so if you are running an x64 machine, which I think most dev's are nowadays, ensure you choose the correct edition. This will give you the welcome screen. Source Screen Click next to get the ball rolling, this first screen is where we want to get the data from, in this case access, so use the drop down box to select Microsoft Access. Then provide the path to the database file, you can see my file path was actually on the network and it worked fine. Destination Screen Next up the destination, well again Excel is what we want s...

Revisting Linq To Lucene

Last July I wrote a blog post about prototyping getting Entity Framework CodeFirst working with Linq To Lucene . I hadn't realised it was quite that long ago but alas time flies especially with a baby. Anyhow, I never finished the work nor made it "feature" ready or submitted it back to the project, this was partly due to the apparent inactivity. However this week the Linq To Lucene project has become quite active, and as I now need to use the implementation I spent a few hours to finish it. This included working out how to get all the tables off of a DbContext, which involved a bit of reflection magic and then writing some tests to ensure it worked at least how the LinqToSql version had done. I have now submitted this as a patch, http://linqtolucene.codeplex.com/SourceControl/list/patches  - item id 11857, and hope its available in the main trunk soon, enjoy!

Troubleshooting NuGet failing to load

Today I had the unfortunate circumstance for VS2010 to crash whilst I was working, nothing to big I thought, I've had this happen before. I reopened VS went to open my solution and got the following message: --------------------------- Microsoft Visual Studio --------------------------- The 'NuGet.Tools.NuGetPackage, NuGet.Tools, Version=1.6.21215.9133, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' package did not load correctly. EEK! Nuget is smegged :( I immediately thought to uninstall the extension and then reinstall it, same thing happened :( I then, (looking back this was foolish as NuGet is shared), thought I know I just load it in VS11 that will work, it also errored. Not cool, the error message however directs you to start VS with logging enabled by using the /log command argument and then to look at the activity log.  The activity log is located in your appdata roaming folder, simply stick %appdata%\Microsoft\VisualStudio\10.0\ActivityLog.xml in...

Developing with MonoTouch - Day 1 - Setup

Image
Introduction So recently I have started a company and been working on a rather large project, initial plans were to use Window 7 or Windows 8 tablets for the "mobile" solution however for various reasons the plan has somewhat changed to now use iPads. As primarily a .Net developer this was a tough decision but a necessary one. However I often talked about using MonoTouch for doing iOS develop after successfully doing some work with MonoDroid when it was in beta. So this is my solution, use MonoTouch to code as much as possible in C# and then Xcode where necessary. I thought it would be a good idea to blog my experiences and any insights I gleam during my first few weeks. I have to admit I have never owned a Mac or an iPad so its all very new, although I have used other peoples. Stage 1 - Order the kit! First things first the kit, as most of my work won't actually be on the iPad application but on Azure services etc I decided that the Mac Mini was the way to go. I...

DotNetOpenAuth 4 beta with Windows Azure

Recently I blogged about using DotNetOpenAuth , I got it working within my local MVC3 Web Application after fixing the dependency issue however when I came to put it into Windows Azure I was getting a random error when the compute emulator started up. --------------------------- Microsoft Visual Studio --------------------------- Windows Azure Tools for Microsoft Visual Studio There was an error attaching the debugger to the IIS worker process for URL 'http://127.255.0.0:82/' for role instance 'deployment16(174).xxxxxxxxxxx_IN_0'. Unable to start debugging on the web server. See help for common configuration errors. Running the web page outside of the debugger may provide further information. Make sure the server is operating correctly. Verify there are no syntax errors in web.config by doing a Debug.Start Without Debugging. You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation. Nice! How confusing, the...

Using DotNetOpenAuth and getting "DotNetOpenAuth.Messaging.OutgoingWebResponseActionResult"

Today I started integrating OpenID into my latest web application. I chose to use the DotNetOpenAuth  library as a helper, it's top and makes Open ID really easy, supports Web Forms, MVC and even classic  ASP. Anyhow there are many how too guides, including one from my good friend Danny Tuppeny , so when it comes to setting it up I refer you to those. However today I found when I was using the AsActionResult extension method my web page would come back blank with just  DotNetOpenAuth.Messaging.OutgoingWebResponseActionResult written on screen. For some reason the ToString was being called and returned. Commonly it seems that the issue is caused by not having a binding redirect for older versions of the MVC assembly  however my one was set, but what I did notice was the following: <dependentAssembly>         <assemblyIdentity name="DataAnnotationsExtensions" publicKeyToken="358a5681c50fd84c" culture="neutral" /> ...

Windows Azure and type initializer for 'System.ServiceModel.Diagnostics.TraceUtility' threw an Exception

Image
I've been working on a new product that I'm with Windows Azure and today whilst I came to debug a WCF service within it stumbled apon an error that at first glance doesn't make a whole lot of sence, but with a bit of working backwards turns out is quite simple to fix. The scenario: I have a WCF service setup to run in a WorkerRole as part of an Azure solution, pretty simple. To enable me to see what was going on clearer with my service i decided to configure my system.diagnostic listeners and added the default AzureLocalStorage listener, which is created automatically for you, to my service model and message logging. <system.diagnostics>         <sharedListeners>       <add name="AzureLocalStorage" type="ServiceAuthenticationGatewayWorkerRole.AzureLocalStorageTraceListener, ServiceAuthenticationGatewayWorkerRole"/>     </sharedListeners>     <sources>  ...