I have a LINQ recordset (of users and their username) that I want to loop through and update a user's profile value. The profile information is based on the default asp.net membership tables.
The following is my code and the timeout error is happening on the userProfile.save() line
Dim dbRGT As New RegentSignsDataContext
Dim myResults = From myTable In dbRGT.vw_USERS_GroupEmails
For Each myRow In myResults
''The following line writes out to the OUTPUT window during Debug
''System.Diagnostics.Debug.Write(myRow.chrFullName.ToString + " = " + myRow.UserId.ToString)
Dim userProfile As ProfileCommon = ProfileCommon.Create(myRow.UserName, True)
userProfile.groupEmail = 1
The specific error I am getting is:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I should add that if I take out the profile.save I can loop through the recordset and perform other functions with no problem.
Can anyone help me figure out why this error is happening. All other connections to the SQL server are working and have never thrown a timeout error.
I even tried adding this code into the function in desperation:
but it did not help at all