﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Jeremy Wadsworth's Blog</title><link>http://www.jeremywadsworth.com</link><description>Blog posts from Jeremy Wadsworth</description><copyright>Copyright 2006-2007 JeremyWadsworth.com. All rights reserved.</copyright><item><category>Web Development</category><title>Web Development - ASP.NET Configuration menu item missing</title><description>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.&lt;BR&gt;&lt;BR&gt;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.&lt;BR&gt;&lt;BR&gt;If you're trying to manage users over the web, check out my web-based user management sample from my downloads section.</description><link>http://www.jeremywadsworth.com/Default.aspx?blogentryid=68</link><pubDate>Sat, 29 Dec 2007 16:50:21 GMT</pubDate><guid>http://www.jeremywadsworth.com/Default.aspx?blogentryid=68</guid></item><item><category>ASP.NET 2.0</category><title>ASP.NET 2.0 - Check if email address is from a valid domain</title><description>Dim strEmail As String = "&lt;A href="mailto:jwadsy@jjkklllm.com"&gt;jwadsy@jjkklllm.com&lt;/A&gt;"&lt;BR&gt;strEmail = strEmail.Substring((strEmail.LastIndexOf("@") + 1), strEmail.Length - (strEmail.LastIndexOf("@") + 1))&lt;BR&gt;Try&lt;BR&gt;Dim strTest As String = System.Net.Dns.GetHostEntry(strEmail).HostName&lt;BR&gt;Catch exNoHostException As System.Net.Sockets.SocketException&lt;BR&gt;&amp;nbsp;'Handle here when the email has an invalid domain&lt;BR&gt;&amp;nbsp;Dim stT As String = ""&lt;BR&gt;Catch ex As Exception&lt;BR&gt;&amp;nbsp;'Handle unexpected errors here&lt;BR&gt;&amp;nbsp;Dim stT As String = ""&lt;BR&gt;End Try</description><link>http://www.jeremywadsworth.com/Default.aspx?blogentryid=67</link><pubDate>Wed, 14 Nov 2007 15:44:26 GMT</pubDate><guid>http://www.jeremywadsworth.com/Default.aspx?blogentryid=67</guid></item><item><category>ASP.NET 2.0</category><title>ASP.NET 2.0 - Automatically unlock a user after a specified time limit</title><description>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. &lt;BR&gt;&lt;BR&gt;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.&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;&lt;FONT size=1&gt;Dim ctrlLogin As System.Web.UI.WebControls.Login&lt;BR&gt;ctrlLogin = CType(LoginArea.FindControl("Login1"), System.Web.UI.WebControls.Login)&lt;BR&gt;txtUserName = CType(ctrlLogin.FindControl("UserName"), TextBox)&lt;BR&gt;Dim theUser As MembershipUser = Membership.GetUser(txtUserName.Text.Trim, False)&lt;BR&gt;If IsNothing(theUser) = False Then&lt;BR&gt;&amp;nbsp;If theUser.IsLockedOut = True Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;Dim theUser As MembershipUser = Membership.GetUser(txtUserName.Text.Trim, False)&lt;BR&gt;&amp;nbsp;&amp;nbsp;Dim ts As TimeSpan = Now.Subtract(theUser.LastLockoutDate)&lt;BR&gt;&amp;nbsp;&amp;nbsp;If Math.Round(ts.TotalMinutes) &amp;gt; 10 Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;theUser.UnlockUser()&lt;BR&gt;&amp;nbsp;&amp;nbsp;Else&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ctrlLogin.Enabled = False&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;failureText.Text = "Your account has been locked out for 10 minutes, because of too many invalid login attempts."&lt;BR&gt;&amp;nbsp;&amp;nbsp;End If&lt;BR&gt;&amp;nbsp;End If&lt;BR&gt;End If&lt;/FONT&gt;&lt;/STRONG&gt;</description><link>http://www.jeremywadsworth.com/Default.aspx?blogentryid=66</link><pubDate>Fri, 19 Oct 2007 00:59:37 GMT</pubDate><guid>http://www.jeremywadsworth.com/Default.aspx?blogentryid=66</guid></item><item><category>ASP.NET 2.0</category><title>ASP.NET 2.0 - DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'PageURL'.</title><description>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&amp;nbsp;the parent&amp;nbsp;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&amp;nbsp;MasterTableView.&lt;BR&gt;&lt;BR&gt;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.</description><link>http://www.jeremywadsworth.com/Default.aspx?blogentryid=65</link><pubDate>Sat, 15 Sep 2007 02:00:00 GMT</pubDate><guid>http://www.jeremywadsworth.com/Default.aspx?blogentryid=65</guid></item><item><category>ASP.NET 2.0</category><title>ASP.NET 2.0 - 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.</title><description>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&amp;nbsp;different scenario; you can read the post &lt;A href="http://www.jeremywadsworth.com/Default.aspx?blogentryid=56"&gt;here&lt;/A&gt;. The solution presented in my previous post&amp;nbsp;did not work in this case.&lt;BR&gt;&lt;BR&gt;I have several different websites and web applications using SQL Server Express in&amp;nbsp;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.&lt;BR&gt;&lt;BR&gt;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 &lt;STRONG&gt;Recent Projects&lt;/STRONG&gt; list. When asked to remove the link that was no longer valid, I said yes. I then chose &lt;STRONG&gt;File&amp;gt;Open Web Site&lt;/STRONG&gt; and browsed to the renamed folder. When I ran the site this time, it was working again.</description><link>http://www.jeremywadsworth.com/Default.aspx?blogentryid=64</link><pubDate>Fri, 14 Sep 2007 04:05:00 GMT</pubDate><guid>http://www.jeremywadsworth.com/Default.aspx?blogentryid=64</guid></item></channel></rss>