Exploring the depths and potentials of ASP.NET RSS 2.0 or Subscribe to .BenRush by Email
 Friday, February 24, 2006

...this page will be cool.


kick it on DotNetKicks.com
Friday, February 24, 2006 3:46:40 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

Jeff has, what appears to be, a rather complete list of all events in the ASP.Net pipeline:

http://weblogs.asp.net/jeff/archive/2004/07/04/172683.aspx 


kick it on DotNetKicks.com
Friday, February 24, 2006 2:11:56 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback


Okay...when I get some free time (which equates to some slow time), I'm going to write a full featured application which can generate a sitemap path by being pointed to the root folder and using some lexical analysis to identify which page is above what, etc....but for now, I needed something which (in a pure, raw fashion), just generated the XML tags for me so I could move them about freely when constructing a sitemap path, the source for my endeavor is below (it works for me, again, if it doesn't work for you - you're on your own!). The XML generated was well formatted for me (IE didn't complain when I opened it up inside it).  

using System;
using System.Collections.Generic;
using System.Text;

namespace SiteMapGenericBuilder
{
    class Program
    {
        private static System.String root = "";
        static void Recurse(System.IO.DirectoryInfo cur, System.Xml.XmlTextWriter tw)
        {
            foreach (System.IO.FileInfo fi in cur.GetFiles())
            {
                if (fi.Extension == ".aspx")
                {
                    System.String webPath = "~" + fi.FullName.Replace(root, "").Replace("\\", "/");
                    tw.WriteStartElement("siteMapNode");
                    tw.WriteAttributeString("url", webPath);
                    tw.WriteAttributeString("title", "");
                    tw.WriteAttributeString("description", "");
                    tw.WriteFullEndElement();
                }
            }
            foreach (System.IO.DirectoryInfo di in cur.GetDirectories())
                Recurse(di,tw);
        }

        static void Main(string[] args)
        {
            // this app should be placed in the root of the web application
            // (alongside the web.config file).
            System.IO.DirectoryInfo di =
                new System.IO.DirectoryInfo(System.IO.Directory.GetCurrentDirectory());
            if (System.IO.File.Exists(di.FullName + "/web.config"))
            {
                root = di.Parent.FullName;
                System.IO.FileStream fs = new System.IO.FileStream("web.sitemap.part",
                    System.IO.FileMode.Create);
                System.IO.StreamWriter sw = new System.IO.StreamWriter(fs);
                System.Xml.XmlTextWriter tw = new System.Xml.XmlTextWriter(sw);
                tw.Formatting = System.Xml.Formatting.Indented;

                // recurse over all the directories.

                tw.WriteStartDocument();
                tw.WriteStartElement("partial_sitemap");
                Recurse(di, tw);
                tw.WriteEndElement();
                tw.WriteEndDocument();
                tw.Flush();
                tw.Close();
            }
        }
    }
}


kick it on DotNetKicks.com
Friday, February 24, 2006 10:45:34 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

Jason Haley seems to have an interesting blog - mostly a large assemblage of other interesting and notable blog entries appears to be his primary content through the "Interesting Finds" posts. Looks like a good one to check from time to time as he would probably keep us pretty aware of what's all going on... 


kick it on DotNetKicks.com
Friday, February 24, 2006 12:58:15 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

You gotta check out the latest video from Channel9 in their Going Deep series (no, it's not porn - it's even better: it's kernel mode!). I love the concept of virtualization and I see it permeating many, many areas of computing in the future from security to testing to [insert whatever here].

Scattered, happy and maybe a bit waxed on wine I perused the internet for more content on virtualzation and hit this cool blog. Check out the whitepapers section! Wooohoo! I've identified a whole new way to kill a conversation - and it's called virtualization!


kick it on DotNetKicks.com
Friday, February 24, 2006 12:48:17 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing
 Thursday, February 23, 2006

...something wanky happens with Visual Studio when this error pops up (at least for me). It appears to lock down and hold onto some modules created in the temporary ASP.Net items folders. So, to fix this:

1) Close Visual Studio,
2) Reset iis (iisreset) - I don't think this is necessary, but it's what I did,
3) Manually remove all content under C:\windows\microsoft.net\framework\v[???]\temporary asp.net files\[webapp_name]\*

....um...whatever...


kick it on DotNetKicks.com
Thursday, February 23, 2006 6:02:30 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing
 Tuesday, February 21, 2006

System.AccessViolationException was unhandled by user code
  Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
  Source="Oracle.DataAccess"

What a pathetic exception detail! The cause of this is not calling .Read() on your OracleDataReader before calling .GetValue(). Wonderfully insightful error message there!


kick it on DotNetKicks.com
Tuesday, February 21, 2006 3:34:19 PM (Central Standard Time, UTC-06:00)  #    Comments [2] - Trackback
Computing | Ranting

Well, this drove me bonkers. I distinctly remember trying the method that finally worked before and I distinctly remember it not working before - but it suddenly started working now, so I figured I might as well post and hopefully save others time.

The CreateUserWizard control uses template controls to perform its forward/backward magic. But what if you want to reset the text box values after you have successfully created a user (so that you can click "continue" and have it go back to the original page so you can create more). After trying the method you'll see in a second, I tried this (as a hard-coded attempt):

CType(Me.CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName"), TextBox).Text = ""
CType(Me.CreateUserWizardStep1.ContentTemplateContainer.FindControl("Password"), TextBox).Text = ""
CType(Me.CreateUserWizardStep1.ContentTemplateContainer.FindControl("ConfirmPassword"), TextBox).Text = ""
CType(Me.CreateUserWizardStep1.ContentTemplateContainer.FindControl("Email"), TextBox).Text = ""
CType(Me.CreateUserWizardStep1.ContentTemplateContainer.FindControl("Question"), TextBox).Text = ""
CType(Me.CreateUserWizardStep1.ContentTemplateContainer.FindControl("Answer"), TextBox).Text = ""

This did NOT work - I have a feeling that the control remembers the values and, just before rendering out the HTML resets thos values to what it knows internally. The solution (which I honestly remember trying earlier) is:

Me.CreateUserWizard1.UserName = ""
Me.CreateUserWizard1.Email = ""
Me.CreateUserWizard1.Question = ""
...

That's a %&$**$ hour of my life I can't get back.


kick it on DotNetKicks.com
Tuesday, February 21, 2006 12:41:26 PM (Central Standard Time, UTC-06:00)  #    Comments [4] - Trackback
Computing

Computers Blogs - Blog Top Sites

Archive
<February 2006>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009
Benjamin Rush
Sign In
Statistics
Total Posts: 444
This Year: 0
This Month: 0
This Week: 0
Comments: 128
Themes
Pick a theme:
All Content © 2009, Benjamin Rush
DasBlog theme 'Business' created by Christoph De Baene (delarou)