Entries:
Comments:
Discussions:

Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

PerfectPhase PerfectPhase "This is not war, this is pest control!" - Dalek to Cyberman
  • Map a network printer in c#

    Anyone know how to map a network printer using c#?

    I have a webservice that needs to be able to print to a network printer and is running under the ASPNET account.

    I have found that you can map a network printer on a machine wide basis with the command

    rundll32 printui.dll,PrintUIEntry /ga /c\\machine /n\\machine\printer

    So I guess I could just add a PInvoke wrapper onto the printui.dll?

    Thanks

    Stephen.

  • P2P and technology lose in our nation’s highest court

    This does not just affect P2P, all the apps like AnyDVD, DVDShrink, NeroRecode and the like will be in the firing line as well! 

    What about Linux, their reluctance to implement core DRM technologies in the platform clear show its intent is to create a platform to enable rampant piracy Smiley


    Stephen.
  • Study Shows Windows Beats Linux on Security

    AndyC wrote:
    Define Admin access? Unlike *nix, Windows doesn't have the concept of a superuser. You can obliterate almost all of the rights and privileges assigned by default to Administrators. You can tweak NT permissions in the registry to prevent an Administrator from changing them and use Group Policies to enforce further restrictions.


    One way of which is just to rename the administrator account to something obscure and create a new administrator account with guest level access.  Let the hackers waste time breaking the dummy account.  Or watch with glee as the software testers try to work out what has happened in revenge for all the obscure bugs reports Smiley

    Stephen.

  • C# Using Block - Another Question

    littleguru wrote:

    It's not correct, because you get a compiler error if the object does not implement IDisposable.


    Opps, yep, should have been as in Sven's and your post post.

    EDIT:-  Or not....  Smiley

    Stephen.

  • C# Using Block - Another Question

    The whole point of the using block is that this..


    using (connection = new SqlConnection(...))
    {
    // do some stuff
    }



    it is short hand for...


     
    SqlConnection connection = null;
    try
    {
    connection = new SqlConnection(...);
    // do some stuff
    }
    finally
    {
    if (connection != null)
    ((IDisposable)connection).Dispose();
    }


    so you can be guaranteed that your object will be cleaned up if it implements IDisposable.

    Stephen

  • Loading Images via SQL2000

    W3bbo wrote:
    dynamic image generation per request entails a massive performance overhead.

    It is far, far, better to perform all processing on an image upon being uploaded, although this does come at a slight disadvantage as far as disk-space is concerned.


    When doing something like this, I cache the generated files to the DB/disk on first request rather than when uploading.  I also tend to limit the image size to several common sizes, just makes the whole lot easier to manage, and you can cull older images from the cache and have them recreated as needed.

    Stephen.


  • Finally a way to ...

    Interesting, I was just thinking about something similar after my PC started overheating with all the internal drives.

    Stephen

  • I'm soooo sick of the Crazy Frog

    Sabot wrote:


    Hmm obviously you don't watch an UKTV channels ... you would do if your were married! I have never cried watching 'Extreme Makeover: House - Edition' honest! (But building a house in Seven days is amazing!)


    We were just talking about that show, I love the way they sit down sketch out a design and within 24 hours all the parts turns up to that design with planning permission etc.  Something tells me they don't really do it all from scratch in 7 days Wink

    Stephen.

  • Loading Images via SQL2000

    While we are talking, it's beter to use an ashx handler for stuff like this as you then you do not have the overhead of all the page framework.

    Also while I store the details for a page in the db and use that for building lists etc, if the files are on disk, most of the time i'll write out the direct link to the file on disk in things like <img> tags.  Let IIS do what it really good at and serve the file directly.

    Stephen.

  • I'm soooo sick of the Crazy Frog

    I found this very therapeutic!

    http://www.abearstail.co.uk/video/frog/abearstail.wmv

    Stephen.