Creating a user profile



Hi there,

I have authentication setup on a web application that I have created
using the standard asp.net login controls.

I would like to extend the profile of users so that I can store an extra
property for each one. So far I have added the following section to my
web.config file,

<profile enabled="true">
<properties>
<add name="myproperty" type="string"/>
</properties>
</profile>

I have also added the following lines to the my new user registration
page,

Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e
As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim pPCnProfile As ProfileCommon =
ProfileCommon.Create(CreateUserWizard1.UserName, True)
pPCnProfile.myproperty = "UNSET"
Call pPCnProfile.Save()
End Sub

Unfortunately when the account is created I now recieve the following
error message,

"An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections."

Of course, the rest of the application works, so I can still log in
other users that were created prior to this profile property being
introduced. So any ideas why it can't find the database at that point?

TIA.

Nick.


.



Relevant Pages

  • Re: Classic ASP connectionstring to SQL Server 2005
    ... So this connection string is in the VB6 dll? ... What is the error message? ... Provider cannot be found. ... can you ping the sql server? ...
    (microsoft.public.inetserver.asp.db)
  • Re: Problem upgrading Microsoft Office Accounting Professional from 2008 to 2009 using SQL Express 2
    ... I tried adding the TCP but then I get a error message "Microsoft Office Accounting cannot open the company because of a connection error." ... I assume that's why trying to force a TCP connection doesn't work. ... Rick Byham, SQL Server Books Online ... Since the problem appears to involve some sort of interaction between Microsoft Office Accounting Professionaland SQL Express 2008 hopefully someone in this forum will understand the error message I'm receiving and can suggest some possible solutions for me to try. ...
    (microsoft.public.sqlserver.connect)
  • Re: Cant connect to SQL Server 2008
    ... The error occurs on opening a connection. ... I can connect to SQL Server 2008 using sqlcmd from the same machine which ... VS solution cannot connect to the SQL Server. ... Error Message: ...
    (microsoft.public.sqlserver.connect)
  • Re: Trusted connection to SQL Server 2000
    ... As the error message says, the user ASPNET could not logon. ... I do not have either SQL Server or the ... > Roslyn L. ... >> If you can use a trusted connection to connect to SQL Server ...
    (microsoft.public.sqlserver.security)
  • How to check if SQL Server is running via asp.net
    ... When my provider shuts down the SQL Server IIS receives a few ... establishing a connection to the server. ... This error message happens when the server is offline and my ASP.NET 2 ...
    (microsoft.public.dotnet.framework.aspnet)

Loading