"Unable to connect to SQL Server database" error when using profile
- From: "Peter Afonin" <pafonin@xxxxxxxxxxx>
- Date: Sat, 7 Oct 2006 20:23:29 -0700
Hello,
I'm using CreateUserWizard control in ASP.NET 2.0. I'm storing the data in
SQL Server 2005.
The first and last steps run smoothly without any problems. But I added one
middle step to collect some other information from the user. I've added this
to Web.config:
<profile>
<properties>
<add name="FirstName" />
<add name="LastName" />
<add name="Country" />
<add name="City" />
<add name="Email2" />
</properties>
</profile>
Then I try to collect this data:
Protected Sub cuzGudzon_FinishButtonClick(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.WizardNavigationEventArgs) Handles
cuzGudzon.FinishButtonClick
Try
With Profile
..FirstName = Me.txtFirstName.Text
..LastName = Me.txtLastName.Text
..Country = Me.txtCountry.Text
..City = Me.txtCity.Text
..Email2 = Me.txtEmail2.Text
End With
Catch ex As Exception
Me.lblError.Text = ex.Message
Finally
End Try
End Sub
This is where I get an error: Unable to connect to SQL Server database
Aparently, the connection string I specified in Web.config is correct, since
the first step where the user creates a user name and password runs without
any problems, and the data is entered into the database. Am I missing
something in this additional step?
I would appreciate your help.
Thank you,
--
Peter Afonin
.
- Follow-Ups:
- Re: "Unable to connect to SQL Server database" error when using profile
- From: Cowboy \(Gregory A. Beamer\)
- Re: "Unable to connect to SQL Server database" error when using profile
- Prev by Date: Re: User Control Event Handlers
- Next by Date: Cool Interview Questions on Dot Net
- Previous by thread: Picking Up or Assuming Session???
- Next by thread: Re: "Unable to connect to SQL Server database" error when using profile
- Index(es):