C# ASP.NET SQL SERVER
  • Thu
    03
    Jul 08

    Network card Speed and Duplex

    We've been having a problem that's been plaguing us for weeks and today we finally solved it. We have 4 Windows Server 2003 machines running a handful of web sites in a cluster being access through a non-sticky VIP (Virtual IP). Some of the web sites allow uploading of files the server which itself saves...

    Continue reading "Network card Speed and Duplex"

  • Wed
    02
    Jul 08

    Get link list from HTML page with regular expressions

    Here's a little bit of code that I wrote to strip out the anchor links from an HTML page using regular expressions. The final line of the example code will only work if you're testing this in Joseph Albahari's excellent LINQPad . i.e. Dump() is an extension method that he's added to IEnumerable. String...

    Continue reading "Get link list from HTML page with regular expressions"

  • Tue
    01
    Jul 08

    Identity Impersonate

    This is a reminder to myself to set <system.web> <identity impersonate="true"/> </system.web> in the web.config after setting up a web site otherwise it won't be able to access external resources such as file shares that require the login/password that you've set for the site...

    Continue reading "Identity Impersonate"

  • Sun
    29
    Jun 08

    LINQ to SQL architecture question

    I have structured a project with a single LINQ to SQL .dbml file and a single DataAccess class that is used to call stored procs and query against this this DBML class. The DataAccess class implements the singleton pattern inasmuch as their's a static DataAccess property which is used for all DB access...

    Continue reading "LINQ to SQL architecture question"

  • Sat
    28
    Jun 08

    VS2008 bugs

    Here are a few bugs that I've found so far with Visual Studio 2008: If you have a lot of files open and you quickly hit Ctrl+F4 in succession then there's a good chance that you will crash VS2008. This sometimes happens when you click on the menus Window -> Close All Documents. Sometimes I'm in a...

    Continue reading "VS2008 bugs"

  • Sat
    28
    Jun 08

    Structuring a solution and project

    How do you structure a new solution in Visual Studio? Typically, within about 10 minutes of starting a new solution is VS2008, I will have 10 projects in that solutions. They are: The Application The Business Layer (BLL) The Database Layer (DB) The Logger The Utility Library And then for each of those...

    Continue reading "Structuring a solution and project"

  • Fri
    27
    Jun 08

    Powershell replace text in files and recurse subdirectories

    I needed to go through every file in a folder and all of its sub directories and open each file and replace a given string. This is what I finally came up with. I'm sure that this can be improved on though... function ReplaceText($fileInfo) { if( $_.GetType().Name -ne 'FileInfo') { # i.e. reject DirectoryInfo...

    Continue reading "Powershell replace text in files and recurse subdirectories"

  • Fri
    27
    Jun 08

    Invalid attempt to call MetaData when reader is closed

    I'm using LINQ to SQL to write information at a rapid rate to the same table via calls to a web page. At the same time there is a web service provide results from that table. So far the best info I've found on this lies here: http://blogs.msdn.com/angelsb/archive/2004/09/07/226597.aspx Invalid attempt...

    Continue reading "Invalid attempt to call MetaData when reader is closed"

  • Sun
    22
    Jun 08

    Improving Hauppauge Wireless Performance

    My Hauppauge MediaMVP has been pausing every few seconds when I've been using it over wireless, basically an apparent bandwidth problem. If I hard wire it to the network then it gets rid of the problem. Recently I needed to use it wirelessly again and so I had to solve the problem. I tried a few things...

    Continue reading "Improving Hauppauge Wireless Performance"

  • Sat
    21
    Jun 08

    Inktomi Slurp Confirm 404

    Approximately once a month (or perhaps every 2 months) my web sites record a request for a page such as: SlurpConfirm404.htm SlurpConfirm404/weather/heavenbecauseofyou/hearzg.htm SlurpConfirm404/thelmalouise/ALL-IMAGE-005-J/railways.htm This is Yahoo checking to see that the web site correctly returns...

    Continue reading "Inktomi Slurp Confirm 404"