There I was hammering away, well in the zone writing a pretty beefy login system in C# when all of a sudden all the pages stopped working. I was running the application on my own machine so I tried to debug by setting a breakpoint and attaching the aspnet worker process. Nope just output blank pages. I was about to go back to a previous version of the project I had in CVS but I had done a good bit of work and didn’t fancy trying to merge it all back in bit by bit. I then noticed the following on another aspx.cs file that I had not been working on .
[code lang=”cpp”]
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
[/code]
I had seen this in my login.aspx.cs but stripped it out as thought it was the usual Visual studio bullshit. I added it and hey presto, I have XHTML being output and I can debug to my hearts content.
The moral of todays little tale – Don’t ever delete something if you don’t know what it does.
That’s enough for today, I’m going home (in my Volvo 🙂 )