Bits and Pieces

Bits and Pieces

Tools and Code by Avner Shahar-Kashtan

Home Archive Categories Tags Blog Tools & Projects About Me RSS
  • SPS Area Templates

    2004-08-19 Avner Shahar-Kashtan Miscellaneous Debris
    And, to close of the day's rants - an instructive post. Today: How to create a template of a Sharepoint Area that can be moved or taken to different servers. Unfortunately, SPS Areas can't be bundled into STP templates like WSS sites or …
  • LoadControl and HTML Comments

    2004-08-19 Avner Shahar-Kashtan Miscellaneous Debris
    Developin webparts with many UI elements can be a hassle - which is why I'm fond of the UserControl shortcut - I build my web UI as a WebUserControl, then simply have my webpart call Page.LoadControl to dynamically load that usercontrol. A …
  • To CLS or not to CLS.

    2004-08-19 Avner Shahar-Kashtan Miscellaneous Debris
    For some reason, Sharepoint's object model doesnt adher to Microsoft's recommended practices - namely, trying to keep your external interfaces CLS-compliant. It seems the object model itself exposes several methods and properties that use …
  • Be Vewy Vewy Caweful - We'we Instawwing Shawepoint!

    2004-08-15 Avner Shahar-Kashtan Miscellaneous Debris
    Sharepoint 2003's installation process is one of the most delicate and uncooperative I've seen in while. Quite a surprise in this day and age - responsive, coherent installations is something we've grown to expect from Microsoft's server …
  • Lookup Hijinx

    2004-07-27 Avner Shahar-Kashtan Miscellaneous Debris
    Here's something that mired me down for several hours, so may it be Googled and seen and used by Sharepoint developers:  We're developing a solution right now based on SPS and WSS sites, under several different Site Collections, that …
  • Programmatically creating an IIS Application

    2004-07-27 Avner Shahar-Kashtan Miscellaneous Debris
    Using System.DirectoryServices to manage IIS servers and directories is a long-established practice (or is it? Should I elaborate on that? Write a short article?), but I ran into a problem today when I wanted to turn an ordinary directory …
  • SQL Server Woes.

    2004-07-16 Avner Shahar-Kashtan Miscellaneous Debris
    I am not a SQL Server Guru, I admit. Far from it, actually. But still, this shouldn't be this hard. I was cheerfully punching away Sharepoint code on my Win2003 machine, when suddenly the power died. Cries of alarm, black smoke from the …
  • The Joy of VSTO.

    2004-07-06 Avner Shahar-Kashtan Miscellaneous Debris
    At last, I have a glowingly positive, happily cheerful and satisfyingly pleased entry instead of my usual rant. I installed the Whidbey Beta 1 build yesterday, and immediately started checking out the beta of VSTOv2. After the grief I went …
  • The API Maze

    2004-07-03 Avner Shahar-Kashtan Miscellaneous Debris
    A reminder to those lost: The SystemInformation class, containing many useful tidbits of information like the running computer name, number of monitors and whether we're on a network, resides in System.Windows.Forms of all places. Sure, …
  • Disposable Impersonation

    2004-06-30 Avner Shahar-Kashtan Miscellaneous Debris
    Impersonating a user in .NET isn't quite as simple as it could be. It's really easy if you you already have a WindowsIdentity or WindowsPrincipal in hand, but to get a handle on an arbitrary user you have to resort to P/Invoking the …
  • COM Add-Ins : Multiple Madness!

    2004-06-17 Avner Shahar-Kashtan Miscellaneous Debris
    [Don't you hate it when IE throws your long post to the trash? We need a smart client for updates!] COM AddIns for Office are a nice feature. A rather easy way to add some buttons and functionality to your documents, and even deployment …
  • Office 2003's disappearing-reappearing PIAs.

    2004-06-09 Avner Shahar-Kashtan Miscellaneous Debris
    Just in case someone else is running into this problem: If you're trying to install Office 2003 Professional and want to make sure you install the PIAs as well, you go to the setup components list and look for .NET Programmability Support …
  • Ghost Files

    2004-06-09 Avner Shahar-Kashtan Miscellaneous Debris
    For some obscure reason, Windows Sharepoint Services allows me to fetch a non-existent file. Consider this code:SPSite site = new SPSite(site_url);SPFile file = site.RootWeb.GetFile(file_url); This code will return an SPFile object …
  • Who Am I?

    2004-06-01 Avner Shahar-Kashtan Miscellaneous Debris
    As we probably know, the most popular activity involving the Active Directory for the developers amongst us is to check for authorization. We get a username from the context/environment/browser, and now we wanna check if the user is allowed …
  • A Sincere and Permanent Attachment

    2004-05-31 Avner Shahar-Kashtan Miscellaneous Debris
    Our goal for today is automatically attaching a Smart Document to a document - hopefully from a button or a COM add-in or something. Well, my pre-2003 Office skills are a bit rusty, so I haven't gotten around to making a COM add-in for this …
  • Erase-a-RegKey.

    2004-05-19 Avner Shahar-Kashtan Miscellaneous Debris
    For many years now I've been using .REG files to deploy registry changes - quick, easy and notepad-compatible. The problem is that I could easily add or modify keys with this, but couldn't erase them - there was no notation in the REG file …
  • Reporting Services and Sharepoint

    2004-05-19 Avner Shahar-Kashtan Miscellaneous Debris
    In case you missed it in the setup Help file (I did) and you installed SQL Server Reporting Services on a virtual directory that's under Windows Sharepoint Services - there are some manual things to adjust for it to work: 1) Make sure your …
  • State of the Nation

    2004-05-09 Avner Shahar-Kashtan Miscellaneous Debris
    Another painful point I have just noticed. Again, this was embedded in the SDK, but so deep you would hardly notice it until you looked for it specifically: All instances of Winword will use the same instance of your ISmartDocument object …
  • Communication Breakdown

    2004-05-09 Avner Shahar-Kashtan Miscellaneous Debris
    And today, on “Why Smart Documents Are Giving Me Ulcers”: ActiveX controls! The concept is simple - I want to have an ActiveX control on my Smart Document that can affect the Smart Doc it it initialized from. Assuming we have the ActiveX …
  • He who controls the feeds - controls INFORMATION.

    2004-04-18 Avner Shahar-Kashtan Miscellaneous Debris
    This has nothing to do with Smart Documents, but I just wanted to mention Sig Weber's XSLT files that enable you to easily show RSS feeds as web parts on a Sharepoint site, without even having to install anything. You simply add a built-in …
← Newer
9 / 10
Older →

Bits and Pieces — Tools and Code by Avner Shahar-Kashtan