Jeremy Wadsworth
My Contribution to the ASP.NET Community


Welcome   
Welcome to my personal website. Here you will find blog posts related to web development as well as personal related interests. If you're here for the source code to my Personal Web Site Kit, please register and you'll receive an email when your account has been approved.


Latest Blog Entries

 Saturday, December 29, 2007


ASP.NET Configuration menu item missing   
I responded to a user recently on a forum regarding a missing menu item in Visual Studio 2005. The user wanted to create an administrator account using the ASP.NET Configuration tool available through the Website menu. However, the tool was not there. The person was accessing the website directly through ftp in Visual Studio.

What I found is that if you load up a website in VS or VWD using ftp, the ASP.NET Configuration tool is not present on the menu. This is because the tool can only be used on the local system; it can't be used over the web.

If you're trying to manage users over the web, check out my web-based user management sample from my downloads section.


jeremy at 11:50 AM | (0) Comments | Add a comment | Permalink



 Thursday, October 18, 2007


Automatically unlock a user after a specified time limit   
Using the ASP.NET 2.0 membership service framework, I discovered that when a user's account is locked out as a result of too many invalid login attempts, it stays locked out. I guess I expected it to unlock after 10 or 15 minutes since this is what I've seen on most sites.

I wrote some code to handle this. It's kind of scratchy but it works. You can put this in the Page_PreRender and only run it on postback.

Dim ctrlLogin As System.Web.UI.WebControls.Login
ctrlLogin = CType(LoginArea.FindControl("Login1"), System.Web.UI.WebControls.Login)
txtUserName = CType(ctrlLogin.FindControl("UserName"), TextBox)
Dim theUser As MembershipUser = Membership.GetUser(txtUserName.Text.Trim, False)
If IsNothing(theUser) = False Then
 If theUser.IsLockedOut = True Then
  Dim theUser As MembershipUser = Membership.GetUser(txtUserName.Text.Trim, False)
  Dim ts As TimeSpan = Now.Subtract(theUser.LastLockoutDate)
  If Math.Round(ts.TotalMinutes) > 10 Then
   theUser.UnlockUser()
  Else
   ctrlLogin.Enabled = False
   failureText.Text = "Your account has been locked out for 10 minutes, because of too many invalid login attempts."
  End If
 End If
End If


jeremy at 7:59 PM | (5) Comments | Add a comment | Permalink



 Friday, September 14, 2007


DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'PageURL'.   
In my case I am binding to the Telerik r.a.d.Grid using a hierarchal view. So I create a Dataset and stick a parent and child DataTable in it. I then create a DataRelation for the tables and bind it to the grid. The part I missed that throws the System.Data.DataRowView... error, is I didn't assign the parent table name to the datamember property of the grid. If you're using the radGrid, you would assign the parent table name to the DataMember property of the MasterTableView.

If you're not using the Telerik radGrid, but you're trying to bind to a grid or list using a parent/child relationship, something similar to my scenario could be the source of your error.


jeremy at 9:00 PM | (4) Comments | Add a comment | Permalink



 Thursday, September 13, 2007


Error: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.   
This error has once again plagued me and consumed way too much of my time. I blogged on this error before when it was occurring in a different scenario; you can read the post here. The solution presented in my previous post did not work in this case.

I have several different websites and web applications using SQL Server Express in which I have the database in the App_Data folder. All of my sites ran fine locally except one. The one site was working fine one day and was giving me this error the next. I tried all the solutions I could find and nothing worked. I didn't reinstall SQL Express cause I wanted to solve the issue.

How did I fix it in this case? I closed Visual Web Developer and then renamed the root folder of the website in Windows Explorer. I then opened VWD and clicked on the old name of my site in the Recent Projects list. When asked to remove the link that was no longer valid, I said yes. I then chose File>Open Web Site and browsed to the renamed folder. When I ran the site this time, it was working again.


jeremy at 11:05 PM | (2) Comments | Add a comment | Permalink







Join WebHost4Life.com






If you would like to help support this project, please click the button below to make a small donation.