Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Sir Dot Net

@Sir Dot Net
About
Posts
53
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Salesforce's Patent Lawsuit - wtf USPTO
    S Sir Dot Net

    So I'm looking through the SalesForce lawsuit against Microsoft http://regmedia.co.uk/2010/06/25/salesforce_v_microsoft_complaint.pdf[^] and I decided to read the patents in question. With theses patents salesforce could potentially sue almost any .NET application development company. How is this even legit? Error Handling - http://www.google.com/patents/about?id=9qQVAAAAEBAJ&dq=6918059[^] ASP.NET Caching - http://www.google.com/patents/about?id=syMSAAAAEBAJ&dq=6813633[^] Postback?! - http://www.google.com/patents/about?id=04d4AAAAEBAJ&dq=7024454[^] It's absolutely ridiculous.

    The Lounge question csharp asp-net com help

  • An independent Win Phone 7 review
    S Sir Dot Net

    I read this article earlier today, and as someone who's been a MS enthusiast for a while, and an interested app dev. for all MS platforms, this worries me. I'm starting to wonder if MS can't even deliver the core functionality, then maybe I should focus on developing for other platforms instead.

    The Lounge csharp php wpf com tools

  • Deleting an XML node in C#
    S Sir Dot Net

    If you're using .NET 3.5+

    XDocument doc = XDocument.Load( "file.xml" );
    var authors = ( from n in doc.Descendants( "author" )
    select n );
    if (authors != null) {
    authors.Remove();
    doc.Save( "file.xml" );
    }

    C# csharp xml

  • .NET IL Code
    S Sir Dot Net

    Is it really that different than disassembling a native executable? No matter what language it's in, or how it's compiled, it can be broken down and analyzed. My thoughts are, put a bit of money/effort in to disuade 'casual' disassemblers, and that's probably enough. Anyone who cares enough can crack any application.

    C# csharp dotnet question

  • Oil Spill Media Blackout?
    S Sir Dot Net

    What happened to the coverage? I still see little bits, but literally nothing even close to the 'top news' area... they are aware it's still spooging into the gulf right?

    The Soapbox question announcement

  • How to use Internal , Protected Internal across Assemblies..
    S Sir Dot Net

    http://msdn.microsoft.com/en-us/library/0tke9fxk(VS.80).aspx[^] This is the only way other than using reflection.

    C# tutorial

  • ActiveDirectory (DirectoryEntry) Set/Get Attributes - Cached?
    S Sir Dot Net

    Ok... nvm... found my own answer. Turns out that I have to set the CacheResults on the DirectorySearcher (that finds my DirectoryEntry) to false. Now everything works immediately!

    C# sysadmin performance help question

  • ActiveDirectory (DirectoryEntry) Set/Get Attributes - Cached?
    S Sir Dot Net

    Anyone know what I can do about this. I'm getting a user DirectoryEntry, modifying an attribute value, then committing the changes, and closing the entry, but on subsequent calls (re-get user directory->get attribute value), the value is the original... until about 10-15 seconds later. I've tried using the RefreshCache method, and the UsePropertyCache property on the DirectoryEntry, but nothing seems to work. I don't understand why the value isn't set immediately (this is a dev ADAM server w/ virtually no load, it shouldn't be a performance issue). Setting:

    using ( DirectoryEntry entry = FindUserDirectoryEntry( username ) ) {
    if ( entry != null ) {
    if ( entry.Properties.Contains( attributeName ) ) {
    entry.Properties[attributeName].Value = value;
    } else if ( value.IsEmpty() == false ) {
    entry.Properties[attributeName].Add( value );
    }
    entry.CommitChanges();
    entry.Close();
    }
    }

    Getting:

    DirectoryEntry entry = this.ADAMProvider.GetUserDirectoryEntry( userName );
    if ( entry != null ) {
    if ( entry.Properties.Contains( attributeName ) ) {
    entry.RefreshCache(attributeName);
    value = entry.Properties[attributeName].Value.SafeToString();
    }
    entry.Close();
    }

    C# sysadmin performance help question

  • Sessions in WCF
    S Sir Dot Net

    You're interpretation of WCF sessions is incorrect. WCF Sessions are not ASP.NET Sessions, they mean "a communications session between the client and the WCF service" - It's an instancing mode for the service itself, not a storage state or anything like HTTP/ASP.NET sessions. To utilize ASP.NET sessions in WCF you have to tinker a bit: Try looking at this.[^] To learn more about the meaning of WCF sessions: try this[^]

    WCF and WF csharp wcf regex help question

  • How can I convert a Class to byte[] then back to Class for Windows Mobile? [modified]
    S Sir Dot Net

    Look into serialization, there are many options -> Binary, xml, soap, etc.

    Mobile question help sysadmin data-structures security

  • Terminology: "Custom" versus "User-Defined"
    S Sir Dot Net

    To make things worse, here's other possible terms you could use: {x} Preferences, {x} Settings, {x} User Defaults.

    IT & Infrastructure question help

  • IT Network Security?
    S Sir Dot Net

    So does having multiple user accounts with different levels of priveledges increase security of a enterprise network somehow? To me it seems like a huge mess since each user has to remember multiple account details. Anyone have thoughts?

    IT & Infrastructure sysadmin security question discussion

  • Dont understand arrays
    S Sir Dot Net

    Every array has at least 1 dimension, for instance: string[] x1 = new string[] {...} // is 1 dimensional string[,] x2 = new string[,] {...} // is 2 dimensional string[,,] x3 = new string[,,] {...} //is 3 dimensional Each dimension has upper and lower bounds, which in most cases is easiest to think about as a capacity, since the lower bound is almost always 0. The GetUpper and LowerBounds functions help you get the bounds (lowest possible index to highest possible index) for the given dimension, so... Here we are creating a 1 dimentional array with a capacity of 5 elements. string[] x1 = new string[5]; now we pass the target dimension (0 index based) to the function... GetLowerBounds(0) would say 0. GetUpperBounds(0) would say 4. Why does upper bounds say 4? Because the bounds functions are returning 0 based indexes, thus, the capacity is 5, and the 5 indexes of each 'space' are 0,1,2,3, and 4. If we were to do this: GetLowerBounds(1) or GetUpperBounds(1) we would get an exception, because our array has only 1 dimension (thus we would pass index 0). More reading here: http://msdn.microsoft.com/en-us/library/system.array.getlowerbound.aspx[^] http://www.java2s.com/Tutorial/CSharp/0220__Data-Structure/ArrayGetLowerBoundGetUpperBound.htm[^]

    C#

  • Appending data to a aes encrypted file?
    S Sir Dot Net

    It takes a bit of work, but you could code an interface to write a 'footer' that contains indexes of encrypted blocks within the file. So for instance, - you would write 1024 encrypted bytes - then write a footer that says the index 0 file ends at 1024. - when you want to append, read the footer to memory. - shorten the file to that last index (erasing the footer). - write your new encrypted block. - write the new index (1) to footer in memory. - write the new footer to the end of the file. The downside (potentially) is that if you want to remove a file that is not at the last index, you essentially have to rewrite the entire file.

    C# question

  • What's your favorite (.NET) windows forms UI library?
    S Sir Dot Net

    Just wondering, what's your favorite windows forms UI control library (commercial or free)?

    Windows Forms csharp winforms design question

  • Javascript window.opener redirect question.
    S Sir Dot Net

    I am working on an app for a big company and we have a subdomain website page that is opened by javascript. We want to have the opened page redirect the window.opener when it is closed. The big thing is that the opener is on a different subdomain (same top level domain). Will this be permitted or is blocked by browser 'cross-site scripting'? I've tried a couple methods but can't seem to get it to redirect. Mainly trying window.opener.location.href='blah.htm';

    Web Development question javascript

  • If I say dems are f'd up, does that mean I have to be a rep?
    S Sir Dot Net

    No, you can be independant. Join the coffee party[^] or something.

    The Soapbox question

  • .NET Reflector now shareware... NOOOooooooo!!!
    S Sir Dot Net

    I knew it was inevitable when RedGate got it... sigh. dammit. Guess I'll have to wait for an open source equiv now.

    The Lounge csharp

  • Session being lost in a simple test webpage
    S Sir Dot Net

    Based on the code above, you have to click the button twice in order for the session var to show in the textbox. this is because the execution goes in this order: Page Load --You click Button Page Load Button Click

    ASP.NET csharp help visual-studio windows-admin

  • Windows 7 SDK code
    S Sir Dot Net

    Is code specifically for Windows 7 (through the win7 SDK) ignored if executed on a pre-windows 7 OS? or do you have to do OS version checks before calling any of it? or will it just not run at all?

    C# question announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups