How Come Deleting Files Is Broken?

How come (in Vista) deleting files seems to be broken? The OS likes to decide that an application is still referencing a file that I am trying to delete, thus elevating to admin control. I hit continue, say yes, I am sure I want to do this and still nothing happens. Vista decides that it still can’t delete the file. This is great if I am using the file somewhere, but generally I am not when this happens. I can open the folder, select the files and delete them without elevation. I can then step back up a directory to the one that did elevate and delete without a problem.

So why didn’t it delete in the first place?

Hosting A Page Inside A SharePoint Page

One of the tasks I had recently was to get not only a web page into a SharePoint page but also pass in parameters from the Query String. Let’s say I am going to create the page at http://localhost/sharepoint/mypage.aspx in a normal way. In order to host a page inside that SharePoint page, we can use a Page Viewer Web Part, but this limits what can be done. Instead, we can create a custom web part to do the work…

Please excuse me if the code isn’t exactly correct. I do not have the code in front of me right now and will update it when I do.


public class CustomWebPart : WebPart {
    public override void Render(HtmlTextWriter writer){
        string rawUrl = Context.Request.Url.OriginalString;
        int index = rawUrl.IndexOf("?");

        string query = String.Empty;
        if(index != -1) query = rawUrl.Substring(index);

        writer.Write(
            "