Using TortoiseGit with GitHub– A checklist rather than tutorial

    1. Install msysGit  http://code.google.com/p/msysgit/
    2. Create a SSH key using Bash (id_rsa and id_rsa.pub)
    3. Install TortoiseSVN
        1. Use plink 

 

    1. Use puttyGEN, which comes with TortoiseGit, to create a Putty private key from id_rsa like so:
      puttyGen –>
      Conversions –>
      Import Key –>
      Open %userprofile%\.ssh\id_rsa –>
      Save Private Key
      as private.ppk (or whatever you want)
    2. Register your Public Key (id_rsa.pub) with GitHub i.e. Copy/paste the text inside the file into your Github account SSH Key (https://github.com/account –> SSH Public Keys)

 

  • Set your details from the Git Bash command line. The token is available from your Github Account Settings.

    git config –global user.name “Your Name”
    git config –global user.email “your@email.com”
    git config –global github.user your-github-name
    git conf
    ig –global github.token your-github-token
  • Get the Repository’s Read + Write SSH URL
    image
  • Clone the repository to a folder using TortoiseGit

 

  1. Load the putty key %userprofile%\.ssh\private.ppk  if that is where you saved it.

Disclaimer

This is a rough summary of what to do, and more of a reminder to my future self. If you have any suggestions, let me know.

Posted in Uncategorized | Tagged , , | 2 Comments

Asp.Net MVC3 Razor and RESX Localisations/Localizations

I was just applying for a small two week contract that was based on Localisation. This is the work I did to give myself a quick refresh. It reminded me on how well Asp.Net MVC3 works with RESX localisations.

imageAs a start, you will need someway to change your Local Language quickly. My preferred choice is using the Quick Locale Switcher for Firefox which is in the image.

I have (over the last few hours) built up a fully translated version of the default MVC3 project which is viewable at http://resxstuff.adventureswith.net and is viewable as 2 languages available English (Which is default) and French (which is terribly translated BTW).

Turn On The World – Enable Globalisation

To enable globalisation, you will need to add this line to your web.config  in the <system.web></system.web> section:

<globalization uiCulture="auto" culture="auto"/>

Add the RESX files; and let the class be seen

If you are coming from Web Forms, note that for MVC you DO NOT HAVE TO (and perhaps should not) add your RESX to App_GlobalResourses or even App_LocalResources.

Just add them wherever you want and they can still be used, but only if you do the following:

Posted in ASP.Net | Tagged , , | 6 Comments

MSI Executable–Extract to a folder

Today I had the unfortunate situation of installing sample code files. This means downloading a MSI and then running it so it can place the sample code somewhere on your computer. I don’t think any developer can appreciate this. Where is the zip file?

Well, it kind of is a zip file. In a sense. You can run a command to output that pesky MSI to a folder. How?

Running as admin:

msiexec /a yourmsi.msi /qb TARGETDIR=c:\output_to_here\

Credit to neoice for answering this in StackOverflow

Posted in Uncategorized | Leave a comment

Using Common.Logging with Glimpse and ASP.Net MVC

Glimpse is an amazing tool (that comes available with Nuget in Visual Studio 2010 [included in the Tools Update]) that can hook into the System.Diagnostic.Trace (ewww) to display error messages on your client side browser. Like so:

image

I don’t want to use System.Diagnostics as my Logging system. I could use it on the side, but not as the core. This would be awful and much too rigid. The good thing is, I typically use Common.Logging in all my projects because of it’s way to tie ANY LOGGING SYSTEM into a single point then ship those events off to any other receiving system. The receiving system in this case, is  of course, System.Diagnostics.Trace using the TraceLoggerFactoryAdapter

So to get to the point above this is what I did:

  1. Using Create a new MVC project in VS2010
  2. Nuget
    1. Install-Package Glimpse
    2. Install-Package Common.Logging
  3. Add Common.Logging  to the web config
    <!--...config sections... --> <sectionGroup name="common"> <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> </sectionGroup> <!--...configuration... --> <common> <logging> <factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e"> <arg key="level" value="ALL" /> <arg key="showLogName" value="true" /> <arg key="showDataTime" value="true" /> <arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" /> </factoryAdapter> </logging> </common>

  4. Add some “problems”image
  5. Run the project and go to http://[your project url]/Gimpse/Configthen click “Turn Glimpse On”. Don’t be surprised that nothing happens.

    image

  6. Go to your main page http://[your project url]/ – See the icon in the right hand corner? Click that.
    image
  7. Look at those errors!

image

Conclusion?

Amazing! The guys who made Glimpse deserve some sort of medal!

Posted in ASP.Net | Tagged , , , | 1 Comment

AWStats on IIS7 (in less steps than the closest cup of coffee. Well almost. )

image

So, you want AWStats on IIS7?  This doesn’t require a restart of IIS, so it can be done in place with no issues.

For IIS6, you will need to look elsewhere sorry. I’m also sorry you still have to deal with IIS6.

The 2 Required Files

  • ActiveState ActivePerl – http://www.activestate.com/activeperl
  • AWStats Installer (awstats-7.0.exehttp://awstats.sourceforge.net/#DOWNLOAD
  • Installing ActivePerl

     

    image

    Continue reading

  • Posted in ASP.Net | Tagged , , | 2 Comments

    GoDaddy vs Umbraco – Access to Umbraco.config is denied

    If you got the error along the lines of

    …./App_Data/Umbraco.config -  Access is denied.

    Add the following into your web.config

    <system.web>
    <identity impersonate=”true”/>
    </system.web>

    It says to do  that in the error anyway

    Posted in godaddy | Tagged , | Leave a comment

    Start of a new site: safetaxi.info


    This is a pre release plug for safetaxi.info – a find a taxi service in London for people on the run. Not up yet, but when it is..oooohh

    http://safetaxi.info

    Posted in Uncategorized | Tagged | Leave a comment

    Crashing Visual Studio after debugging ASP Classic

    I hate ASP classic. I hate it with a passion. AND THEN when your browser crashes every time that you go to debug it, you start building muderous tendancies.

    Anyway, Found a solution. Hot fix to VS 2008 that fixes this and a few things that I didnt care about.

    http://code.msdn.microsoft.com/KB967631

    This QFE fixes three complete separate issues in the VS2008 SP1 Debugger:
    - Debugger can hang the IDE after setting a breakpoint when working with a large C++ project
    - Breakpoints do not bind correctly when an MSIL file is built containing .line directives
    - VS crashes when debugging a classic ASP web and debugging is stopped.

    Posted in Uncategorized | Tagged , | Leave a comment

    Web Deployment with VS2010 and IIS7

    Have watched a great presentation today from Scott Hanselman from the MIX 10 conference.

    YOU MUST/NEED TO WATCH THIS!  -> Scott Hanselman presents the IIS Web Deploy

    There were a few great ideas built in to his story, such as Web Deploy sitting on the back of a continuous integration setup and pushing out all the good stuff on successful build.

    A problem I had while setting up Web Deploy was that there was no “Management Service Delegation” icon in IIS after installing the Web Deploy tool from the Web Platform Installer.

    I solved it by downloading the actual install for the Web Deployment tool itself, then changing the setup so that IIS management items were installed. Voila! I have my icon:

    image

    Also, I had to add (for some unknown reason) an allow all IP range into my Management Service to stop 404 Errors.

    image 

    credit to AndyFraley @ IIS Forum – Web Deploy thread – http://forums.iis.net/t/1163109.aspx

    Posted in Uncategorized | Leave a comment

    Converting MVC 2 RC to MVC 2 RTM

    Ok, this is more of a hack than a true conversion, but I haven’t noticed the difference… yet.

    Remember to back up what you’re not willing to lose!

    1. Remove your MVC project from your solution. Don’t delete, just remove. Then save all (Shift-Ctrl-S)
    2. Edit your MVC project *.csproj file and change the ProjectTypeGuids to:
      <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>image
    3. Add your project back into your solution and save everything
    Posted in ASP.Net | Tagged , | Leave a comment