Showing posts with label logins. Show all posts
Showing posts with label logins. Show all posts

Wednesday, March 21, 2012

Error: 18456, Severity: 14, State: 12.

I am running SQL Server 2005 x64 SP2 and have problem connecting to database with the SQL logins I created. I test the database login using Microsoft ODBC Administrator to connect the the database locally, only 'sa' can login. All other sql logins I created fails and returns this message:


Microsoft SQL Server Login

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'doteasylogin'.


OK

In the SQL Logs, it shows: Error: 18456, Severity: 14, State: 12.

The SQL Services is running as 'Local System'.

Can anyone help please?

Did you create the user at the server level and give him access to the server (and to the database) ? The state 12 indicates that there is an access problem which is normally dedicated to the fact that the user is either not allowed to login or does not have the appropiate permissions for the database.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I created the user 'testlogin' in SQL Server Login and grant the 'testlogin' user db_datareader & db_datawriter permission in Database Role Membership.

I'm using Windows Server 2003 x64 standard edition.

|||

Try executing the following two queries and check that each of them returns a row:

select name, principal_id from sys.server_principals where name = 'testlogin'

select permission_name, state_desc from sys.server_permissions where grantee_principal_id = suser_id('testlogin')

The first query should return the 'testlogin' login name and its associated id.

The second query should display a row with the CONNECT_SQL, GRANT value.

Thanks

Laurentiu

|||

Hello.

I have the same problem.

I am a beginner in SQL Server.I tried to install SQLServerExpress2005sp2

I've migrated a database from Access.

I tried to make a new user: for example 'testlogin' .

I've do all you sugest (server permissions, database permissions, ..)

I've run the queries from above and everything seems ok, but I cannot connect to database using the 'testlogin' account.

Error: 18456, Severity: 14, State: 12.

Login failed for user 'testlogin'. [CLIENT: xx.xx.xx.xxx]

IMPORTANT: if I grant sysadmin role to 'testlogin' I can connect.

thanks a lot in advance.

|||I started receiving this error after attempting to set up database mirroring. After running through the configuration including setting up endpoints (unsuccessfully) the mirror server has stopped accepting logins from SQL accounts (except SA). The principal server still accepts SQL logins without failure. I have stopped mirroring and deleted the database on both servers. Thank you for any help you can give. This was not an issue before I attempted database mirroring.

Okay after looking at it further it turned out that in my instance there was a new object for mirroring created. This object was accessible by going to the properties of the user account, choosing securables on the left side of the window. Then click on the add button and choose "all objects of the types" click OK; check Endpoints and click OK. In my case I saw the "Mirroring" option under Securables. That seems to be the culprit, after selecting Grant for the Connect permission I was able to connect fine. As a temporary solution I have chosen to follow the steps mentioned before using the "Public" server role, that way all accounts will have connect access. This is just temporary until I learn how to Drop the pesky Mirroring object from the server altogether.
|||

I am having the same issue, create a login using TSQL and granting access to a user database and it will not connect. I have tried the queries mentioned and from sys.server_permissions is saying CONNECT SQL with the GRANT option.

As soon as I added the user to the sysadmin server role, no problems connecting.

Thank you.

Error: 18456, Severity: 14, State: 12.

I am running SQL Server 2005 x64 SP2 and have problem connecting to database with the SQL logins I created. I test the database login using Microsoft ODBC Administrator to connect the the database locally, only 'sa' can login. All other sql logins I created fails and returns this message:


Microsoft SQL Server Login

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'doteasylogin'.


OK

In the SQL Logs, it shows: Error: 18456, Severity: 14, State: 12.

The SQL Services is running as 'Local System'.

Can anyone help please?

Did you create the user at the server level and give him access to the server (and to the database) ? The state 12 indicates that there is an access problem which is normally dedicated to the fact that the user is either not allowed to login or does not have the appropiate permissions for the database.


Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I created the user 'testlogin' in SQL Server Login and grant the 'testlogin' user db_datareader & db_datawriter permission in Database Role Membership.

I'm using Windows Server 2003 x64 standard edition.

|||

Try executing the following two queries and check that each of them returns a row:

select name, principal_id from sys.server_principals where name = 'testlogin'

select permission_name, state_desc from sys.server_permissions where grantee_principal_id = suser_id('testlogin')

The first query should return the 'testlogin' login name and its associated id.

The second query should display a row with the CONNECT_SQL, GRANT value.

Thanks

Laurentiu

|||

Hello.

I have the same problem.

I am a beginner in SQL Server.I tried to install SQLServerExpress2005sp2

I've migrated a database from Access.

I tried to make a new user: for example 'testlogin' .

I've do all you sugest (server permissions, database permissions, ..)

I've run the queries from above and everything seems ok, but I cannot connect to database using the 'testlogin' account.

Error: 18456, Severity: 14, State: 12.

Login failed for user 'testlogin'. [CLIENT: xx.xx.xx.xxx]

IMPORTANT: if I grant sysadmin role to 'testlogin' I can connect.

thanks a lot in advance.

|||I started receiving this error after attempting to set up database mirroring. After running through the configuration including setting up endpoints (unsuccessfully) the mirror server has stopped accepting logins from SQL accounts (except SA). The principal server still accepts SQL logins without failure. I have stopped mirroring and deleted the database on both servers. Thank you for any help you can give. This was not an issue before I attempted database mirroring.

Okay after looking at it further it turned out that in my instance there was a new object for mirroring created. This object was accessible by going to the properties of the user account, choosing securables on the left side of the window. Then click on the add button and choose "all objects of the types" click OK; check Endpoints and click OK. In my case I saw the "Mirroring" option under Securables. That seems to be the culprit, after selecting Grant for the Connect permission I was able to connect fine. As a temporary solution I have chosen to follow the steps mentioned before using the "Public" server role, that way all accounts will have connect access. This is just temporary until I learn how to Drop the pesky Mirroring object from the server altogether.
|||

I am having the same issue, create a login using TSQL and granting access to a user database and it will not connect. I have tried the queries mentioned and from sys.server_permissions is saying CONNECT SQL with the GRANT option.

As soon as I added the user to the sysadmin server role, no problems connecting.

Thank you.

Wednesday, March 7, 2012

Error with Logins into SQL 2K

Hello,
I need some advice...
I am running SQL Server 2000... I've installed a new instance of this on a
new
server (to migrate from server1 to server2).
On server1, i have a group set up (domain/SQLGroup)...
On server2, i have the exact same group set up... unfortunately all the
users in this group doesn't get recognized by my new sql installation. I
get the error above (SQL Error 18456, State '28000') when they try and
login. (Access, VB progs, etc)...
I can change permissions for all the users in this group to have "Domain
Admins", but obviously i don't want to do that... by doing this though, all
access works as before...
SP4 is installed on server2, but not on server1...
Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
Server2 is just windows 2003, and is dedicated to sql server 2000...
Does anyone have any suggestions on how to proceed with this?
Thanks.
Hi
In my opinion the real problem seems to be with an ODBC connection
Does itt succeeds with NT authentication if and only if the user is an
administrator ?
"RL Tech" <tech_support@.nospamuls.com> wrote in message
news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I need some advice...
> I am running SQL Server 2000... I've installed a new instance of this on a
> new
> server (to migrate from server1 to server2).
> On server1, i have a group set up (domain/SQLGroup)...
> On server2, i have the exact same group set up... unfortunately all the
> users in this group doesn't get recognized by my new sql installation. I
> get the error above (SQL Error 18456, State '28000') when they try and
> login. (Access, VB progs, etc)...
> I can change permissions for all the users in this group to have "Domain
> Admins", but obviously i don't want to do that... by doing this though,
> all
> access works as before...
> SP4 is installed on server2, but not on server1...
> Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
> Server2 is just windows 2003, and is dedicated to sql server 2000...
> Does anyone have any suggestions on how to proceed with this?
> Thanks.
>
>
|||This would help.
http://support.microsoft.com/kb/298897
-oj
"RL Tech" <tech_support@.nospamuls.com> wrote in message
news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I need some advice...
> I am running SQL Server 2000... I've installed a new instance of this on a
> new
> server (to migrate from server1 to server2).
> On server1, i have a group set up (domain/SQLGroup)...
> On server2, i have the exact same group set up... unfortunately all the
> users in this group doesn't get recognized by my new sql installation. I
> get the error above (SQL Error 18456, State '28000') when they try and
> login. (Access, VB progs, etc)...
> I can change permissions for all the users in this group to have "Domain
> Admins", but obviously i don't want to do that... by doing this though,
> all
> access works as before...
> SP4 is installed on server2, but not on server1...
> Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
> Server2 is just windows 2003, and is dedicated to sql server 2000...
> Does anyone have any suggestions on how to proceed with this?
> Thanks.
>
>
|||On server1, NT (windows) authentication works with the group SQLGroup
(whether they are admin or not)... as long as they are part of SQLGroup,
they will be fine.
On server2, NT (windows) authentication only works with Admin users (thus by
adding all the users in SQLGroup to Domain Admins, they would work)... Which
i obviously don't want to do.
Both are mixed mode authentication...
ODBC has worked from the moment i set up that connection with that group...
In fact, it still works fine when i authenticate non-windows usernames...
Do i need to make server2 a Domain controller?
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eeAlh4jUGHA.5884@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Hi
> In my opinion the real problem seems to be with an ODBC connection
>
> Does itt succeeds with NT authentication if and only if the user is an
> administrator ?
>
> "RL Tech" <tech_support@.nospamuls.com> wrote in message
> news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
a[vbcol=seagreen]
I[vbcol=seagreen]
server).
>
|||Hi,
I did look at it yesterday, but i wasn't sure if that was the problem...
I'll give it a try and see if it works out..
Thanks!
...Robin
"oj" <nospam_ojngo@.home.com> wrote in message
news:u1vHDDlUGHA.5004@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> This would help.
> http://support.microsoft.com/kb/298897
>
> --
> -oj
>
> "RL Tech" <tech_support@.nospamuls.com> wrote in message
> news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
a[vbcol=seagreen]
I[vbcol=seagreen]
server).
>

Error with Logins into SQL 2K

Hello,
I need some advice...
I am running SQL Server 2000... I've installed a new instance of this on a
new
server (to migrate from server1 to server2).
On server1, i have a group set up (domain/SQLGroup)...
On server2, i have the exact same group set up... unfortunately all the
users in this group doesn't get recognized by my new sql installation. I
get the error above (SQL Error 18456, State '28000') when they try and
login. (Access, VB progs, etc)...
I can change permissions for all the users in this group to have "Domain
Admins", but obviously i don't want to do that... by doing this though, all
access works as before...
SP4 is installed on server2, but not on server1...
Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
Server2 is just windows 2003, and is dedicated to sql server 2000...
Does anyone have any suggestions on how to proceed with this?
Thanks.Hi
In my opinion the real problem seems to be with an ODBC connection
Does itt succeeds with NT authentication if and only if the user is an
administrator ?
"RL Tech" <tech_support@.nospamuls.com> wrote in message
news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I need some advice...
> I am running SQL Server 2000... I've installed a new instance of this on a
> new
> server (to migrate from server1 to server2).
> On server1, i have a group set up (domain/SQLGroup)...
> On server2, i have the exact same group set up... unfortunately all the
> users in this group doesn't get recognized by my new sql installation. I
> get the error above (SQL Error 18456, State '28000') when they try and
> login. (Access, VB progs, etc)...
> I can change permissions for all the users in this group to have "Domain
> Admins", but obviously i don't want to do that... by doing this though,
> all
> access works as before...
> SP4 is installed on server2, but not on server1...
> Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
> Server2 is just windows 2003, and is dedicated to sql server 2000...
> Does anyone have any suggestions on how to proceed with this?
> Thanks.
>
>|||This would help.
http://support.microsoft.com/kb/298897
-oj
"RL Tech" <tech_support@.nospamuls.com> wrote in message
news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I need some advice...
> I am running SQL Server 2000... I've installed a new instance of this on a
> new
> server (to migrate from server1 to server2).
> On server1, i have a group set up (domain/SQLGroup)...
> On server2, i have the exact same group set up... unfortunately all the
> users in this group doesn't get recognized by my new sql installation. I
> get the error above (SQL Error 18456, State '28000') when they try and
> login. (Access, VB progs, etc)...
> I can change permissions for all the users in this group to have "Domain
> Admins", but obviously i don't want to do that... by doing this though,
> all
> access works as before...
> SP4 is installed on server2, but not on server1...
> Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
> Server2 is just windows 2003, and is dedicated to sql server 2000...
> Does anyone have any suggestions on how to proceed with this?
> Thanks.
>
>|||On server1, NT (windows) authentication works with the group SQLGroup
(whether they are admin or not)... as long as they are part of SQLGroup,
they will be fine.
On server2, NT (windows) authentication only works with Admin users (thus by
adding all the users in SQLGroup to Domain Admins, they would work)... Which
i obviously don't want to do.
Both are mixed mode authentication...
ODBC has worked from the moment i set up that connection with that group...
In fact, it still works fine when i authenticate non-windows usernames...
Do i need to make server2 a Domain controller?
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eeAlh4jUGHA.5884@.TK2MSFTNGP14.phx.gbl...
> Hi
> In my opinion the real problem seems to be with an ODBC connection
>
> Does itt succeeds with NT authentication if and only if the user is an
> administrator ?
>
> "RL Tech" <tech_support@.nospamuls.com> wrote in message
> news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> > Hello,
> >
> > I need some advice...
> >
> > I am running SQL Server 2000... I've installed a new instance of this on
a
> > new
> > server (to migrate from server1 to server2).
> > On server1, i have a group set up (domain/SQLGroup)...
> > On server2, i have the exact same group set up... unfortunately all the
> > users in this group doesn't get recognized by my new sql installation.
I
> > get the error above (SQL Error 18456, State '28000') when they try and
> > login. (Access, VB progs, etc)...
> >
> > I can change permissions for all the users in this group to have "Domain
> > Admins", but obviously i don't want to do that... by doing this though,
> > all
> > access works as before...
> >
> > SP4 is installed on server2, but not on server1...
> >
> > Server1 is the Domain Controller...running sbs2000 (windows 2000
server).
> > Server2 is just windows 2003, and is dedicated to sql server 2000...
> >
> > Does anyone have any suggestions on how to proceed with this?
> >
> > Thanks.
> >
> >
> >
>|||Hi,
I did look at it yesterday, but i wasn't sure if that was the problem...
I'll give it a try and see if it works out..
Thanks!
...Robin
"oj" <nospam_ojngo@.home.com> wrote in message
news:u1vHDDlUGHA.5004@.TK2MSFTNGP11.phx.gbl...
> This would help.
> http://support.microsoft.com/kb/298897
>
> --
> -oj
>
> "RL Tech" <tech_support@.nospamuls.com> wrote in message
> news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> > Hello,
> >
> > I need some advice...
> >
> > I am running SQL Server 2000... I've installed a new instance of this on
a
> > new
> > server (to migrate from server1 to server2).
> > On server1, i have a group set up (domain/SQLGroup)...
> > On server2, i have the exact same group set up... unfortunately all the
> > users in this group doesn't get recognized by my new sql installation.
I
> > get the error above (SQL Error 18456, State '28000') when they try and
> > login. (Access, VB progs, etc)...
> >
> > I can change permissions for all the users in this group to have "Domain
> > Admins", but obviously i don't want to do that... by doing this though,
> > all
> > access works as before...
> >
> > SP4 is installed on server2, but not on server1...
> >
> > Server1 is the Domain Controller...running sbs2000 (windows 2000
server).
> > Server2 is just windows 2003, and is dedicated to sql server 2000...
> >
> > Does anyone have any suggestions on how to proceed with this?
> >
> > Thanks.
> >
> >
> >
>

Error with Logins into SQL 2K

Hello,
I need some advice...
I am running SQL Server 2000... I've installed a new instance of this on a
new
server (to migrate from server1 to server2).
On server1, i have a group set up (domain/SQLGroup)...
On server2, i have the exact same group set up... unfortunately all the
users in this group doesn't get recognized by my new sql installation. I
get the error above (SQL Error 18456, State '28000') when they try and
login. (Access, VB progs, etc)...
I can change permissions for all the users in this group to have "Domain
Admins", but obviously i don't want to do that... by doing this though, all
access works as before...
SP4 is installed on server2, but not on server1...
Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
Server2 is just windows 2003, and is dedicated to sql server 2000...
Does anyone have any suggestions on how to proceed with this?
Thanks.Hi
In my opinion the real problem seems to be with an ODBC connection
Does itt succeeds with NT authentication if and only if the user is an
administrator ?
"RL Tech" <tech_support@.nospamuls.com> wrote in message
news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I need some advice...
> I am running SQL Server 2000... I've installed a new instance of this on a
> new
> server (to migrate from server1 to server2).
> On server1, i have a group set up (domain/SQLGroup)...
> On server2, i have the exact same group set up... unfortunately all the
> users in this group doesn't get recognized by my new sql installation. I
> get the error above (SQL Error 18456, State '28000') when they try and
> login. (Access, VB progs, etc)...
> I can change permissions for all the users in this group to have "Domain
> Admins", but obviously i don't want to do that... by doing this though,
> all
> access works as before...
> SP4 is installed on server2, but not on server1...
> Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
> Server2 is just windows 2003, and is dedicated to sql server 2000...
> Does anyone have any suggestions on how to proceed with this?
> Thanks.
>
>|||This would help.
http://support.microsoft.com/kb/298897
-oj
"RL Tech" <tech_support@.nospamuls.com> wrote in message
news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I need some advice...
> I am running SQL Server 2000... I've installed a new instance of this on a
> new
> server (to migrate from server1 to server2).
> On server1, i have a group set up (domain/SQLGroup)...
> On server2, i have the exact same group set up... unfortunately all the
> users in this group doesn't get recognized by my new sql installation. I
> get the error above (SQL Error 18456, State '28000') when they try and
> login. (Access, VB progs, etc)...
> I can change permissions for all the users in this group to have "Domain
> Admins", but obviously i don't want to do that... by doing this though,
> all
> access works as before...
> SP4 is installed on server2, but not on server1...
> Server1 is the Domain Controller...running sbs2000 (windows 2000 server).
> Server2 is just windows 2003, and is dedicated to sql server 2000...
> Does anyone have any suggestions on how to proceed with this?
> Thanks.
>
>|||On server1, NT (windows) authentication works with the group SQLGroup
(whether they are admin or not)... as long as they are part of SQLGroup,
they will be fine.
On server2, NT (windows) authentication only works with Admin users (thus by
adding all the users in SQLGroup to Domain Admins, they would work)... Which
i obviously don't want to do.
Both are mixed mode authentication...
ODBC has worked from the moment i set up that connection with that group...
In fact, it still works fine when i authenticate non-windows usernames...
Do i need to make server2 a Domain controller?
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eeAlh4jUGHA.5884@.TK2MSFTNGP14.phx.gbl...
> Hi
> In my opinion the real problem seems to be with an ODBC connection
>
> Does itt succeeds with NT authentication if and only if the user is an
> administrator ?
>
> "RL Tech" <tech_support@.nospamuls.com> wrote in message
> news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
a[vbcol=seagreen]
I[vbcol=seagreen]
server).[vbcol=seagreen]
>|||Hi,
I did look at it yesterday, but i wasn't sure if that was the problem...
I'll give it a try and see if it works out..
Thanks!
...Robin
"oj" <nospam_ojngo@.home.com> wrote in message
news:u1vHDDlUGHA.5004@.TK2MSFTNGP11.phx.gbl...
> This would help.
> http://support.microsoft.com/kb/298897
>
> --
> -oj
>
> "RL Tech" <tech_support@.nospamuls.com> wrote in message
> news:%23b1DfodUGHA.1688@.TK2MSFTNGP11.phx.gbl...
a[vbcol=seagreen]
I[vbcol=seagreen]
server).[vbcol=seagreen]
>

Sunday, February 26, 2012

Error with asp admin/logins on live server

I have created a site using VWDExpress and now that I've finished testing have moved it over to the server which runs SQLServer 2000. Part of the site requires login, so I created the membership using the ASP.net web configuration tool and when testing locally worked well.

Now though that I've copied the web site over, when I try to log in I get the error:

System.Data.SqlClient.SqlException: 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

Obviously its some sort of configuration issue, but I don't know what.

What do I have to change to make this work from a test machine to a live server?


Thanks

Have you configured your machine.config and web.config on the live server (where you have SQL Server 2000) to work with SQL Server 2000 because by default it looks for SQL Server 2005?

bullpit

|||

bullpit:

Have you configured your machine.config and web.config on the live server (where you have SQL Server 2000) to work with SQL Server 2000 because by default it looks for SQL Server 2005?

bullpit

I ran through the steps listed here http://msdn2.microsoft.com/en-us/library/aa479307.aspx but it gets to a point and says"The easiest way to have your application take advantage or your newly created database is just to replace he connection string value of this localSQLServer setting in your apps web.config". The problem i have is that i dont know what or how to modify?

Now though Im getting the errorSystem.ArgumentException: Invalid value for key 'attachdbfilename' when i try to access the database even though it appears to point to a valid DB file (i.e.

data source=SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true)

thanks for any assistance

|||

Ok...Lets start from the beginning. What my understanding is that your dev server had SQL Server Express edition and your live server has SQL Server 2000. Now, if you have not changed any configuration settings in config files, heres what you have to do. Make sure you have ASPNETDB in SQL Server 2000. If not, locate aspnet_regsql.exe in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 and run it.

Now: Locate machine.config.

If Windows Server 2000 is your live server, then it will be located in C:\WINNT\Microsoft.NET\Framework\v2.0.50727\CONFIG

Modify <connectionStrings> tag like this. I commented the default string just in case it gets messed up. Also, make a copy of machine.config before altering it.

<connectionStrings><!-- <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>--><add name="LocalSqlServer" connectionString="YOUR CONNECTION STRING TO SQL SERVER 2000 ASPNETDB"/> </connectionStrings> Then: add this connectionString in your application web.config file:<add name="LocalSqlServer" connectionString="YOUR CONNECTION STRING TO SQL SERVER 2000 ASPNETDB"/>Add the following tags just before your </system.web> tag<membership> <providers><remove name="AspNetSqlMembershipProvider"/> <add name="AspNetSqlMembershipProvider"type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"connectionStringName="LocalSqlServer"enablePasswordRetrieval="false"enablePasswordReset="true"requiresQuestionAndAnswer="true"applicationName="/YOUR APPLICATION NAME" MAKE SURE TO CHANGE THE NAME TO YOUR APPLICATION NAMErequiresUniqueEmail="false"passwordFormat="Hashed"maxInvalidPasswordAttempts="5"minRequiredPasswordLength="7"minRequiredNonalphanumericCharacters="1"passwordAttemptWindow="10"passwordStrengthRegularExpression="" /> </providers></membership> <profile><providers> <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/"type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers></profile>

Try this and let me know if you are getting anywhere.

Good luck...

bullpit

|||

bullpit:

Make sure you have ASPNETDB in SQL Server 2000. If not, locate aspnet_regsql.exe in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 and run it.

Seems as though im falling at the first hurdle then! The database isn't in SQLServer at all, because it was created using the ASP web admin tool and resides in the \app_data\ folder of my site. I have copied this to the server but obviously SQLServer doesn't pick it up. If i run the aspnet_regsql tool then its not in the drop-down list of databases to intialise.

Im not sure how to proceed now to get it in SQLServer 2000.

Thanks for all the help btw.

|||

Lets try this:

Just go thru all the default steps of the wizard, leave the value as <default> in dropdown and click next, verify in the last step that the wizard is creating ASPNETDB. click finish. see if this helps.

good luck...

bullpit

|||

bullpit:

Lets try this:

Just go thru all the default steps of the wizard, leave the value as <default> in dropdown and click next, verify in the last step that the wizard is creating ASPNETDB. click finish. see if this helps.

good luck...

bullpit

It Did, Thanks!I now have a blank aspnetdb showing in SQLServer 2000 and another (populated with users and passwords) in the \app_data folder.

How do i go aobut moving from one to the other?

|||

elDeeJay:

bullpit:

Lets try this:

Just go thru all the default steps of the wizard, leave the value as <default> in dropdown and click next, verify in the last step that the wizard is creating ASPNETDB. click finish. see if this helps.

good luck...

bullpit

It Did, Thanks!I now have a blank aspnetdb showing in SQLServer 2000 and another (populated with users and passwords) in the \app_data folder.

How do i go aobut moving from one to the other?

I should have said,

How do i go about moving from one to the other and getting the membership pages created with the ASP web based management tool to recognise this new database location??

Thanks again

|||

You have to configure web.config and machine.config for that. I have already explained that earlier.

bullpit

|||

bullpit:

You have to configure web.config and machine.config for that. I have already explained that earlier.

bullpit

OK, so I deployed my database using this guide (http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx) and now the SQLServer 'sees' the database. I updated my web.config to point to the database on the server and now the login page loads. However, when i go to login, its telling me the login is rejected, for ALL the users, even though i know the login details are correct.

Also, if the data is in the SQLServer database, but the details are encrypted, how do i go about adding new users etc?

I can't belive the process is this coplex. I would have thought it would know the database is in the \app_data\ folder and copying this over would have been sufficient, whatever host it was running on! :(

|||

Well...copying is not the same is copy-paste operation in Windows plateforms. You have to detach the database and then attach it to the new DBMS. Can you paste your web.config please so that I can see what setting you have?

bullpit

|||Certainly (and i really appreciate the time you are giving up to help btw)

123<!--45 Note: As an alternative to hand editing this file you can use the67 web admin tool to configure settings for your application. Use89 the Website->Asp.Net Configuration option in Visual Studio.1011 A full list of settings and comments can be found in1213 machine.config.comments usually located in1415 \Windows\Microsoft.Net\Framework\v2.x\Config1617-->1819<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">2021 <appSettings/>2223 <connectionStrings>2425 <remove name="LocalSqlServer" />2627 <add name="ENQConnectionString" connectionString="Data Source=WEBSERVER;Initial Catalog=ENQUIRIES;Integrated Security=True" providerName="System.Data.SqlClient" />2829 <add name="LocalSqlServer" connectionString="Data Source=WEBSERVER;Initial Catalog=aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient" />3031 </connectionStrings>3233 <system.web>3435 <globalization culture="en-GB" uiCulture="en-GB" />3637 <roleManager enabled="true" />3839 <authentication mode="Forms" />4041 <pages styleSheetTheme="DataWebControls"/>4243<!--4445 Set compilation debug="true" to insert debugging4647 symbols into the compiled page. Because this4849 affects performance, set this value to true only5051 during development.5253 -->5455 <compilation debug="true" defaultLanguage="c#">5657 <assemblies>5859 <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />6061 <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />6263 <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />6465 </assemblies>6667 </compilation>6869 <customErrors mode="Off"/>7071<!--7273 The <authentication> section enables configuration7475 of the security authentication mode used by7677 ASP.NET to identify an incoming user.7879 -->8081 <!--8283 The <customErrors> section enables configuration8485 of what to do if/when an unhandled error occurs8687 during the execution of a request. Specifically,8889 it enables developers to configure html error pages9091 to be displayed in place of a error stack trace.92939495 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">9697 <error statusCode="403" redirect="NoAccess.htm" />9899 <error statusCode="404" redirect="FileNotFound.htm" />100101 </customErrors>102103 -->104105 <httpHandlers>106107 <remove verb="*" path="*.asmx"/>108109 <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>110111 <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>112113 <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364E35" validate="false"/>114115 </httpHandlers>116 <httpModules>117 </httpModules>118<membership>119120<providers>121122<remove name="AspNetSqlMembershipProvider"/>123124<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"125126connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true"127128applicationName="/ETS" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"129130minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />131132</providers>133134</membership>135136<profile>137138<providers>139140<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />141142</providers>143144</profile>145146</system.web>147148</configuration>149
|||

You are welcome.

Modify the authentication and authorization tags to something like this:

<authentication mode="Forms"><forms name="appNameAuth" path="/" loginUrl="Login.aspx" protection="All" timeout="999999"> </forms></authentication><authorization> <deny users="?" /> </authorization>
good luck.
bullpit

|||

bullpit:

You are welcome.

Modify the authentication and authorization tags to something like this:

<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="Login.aspx" protection="All" timeout="999999">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
good luck.
bullpit

Thanks, replaced <authentication mode="Forms" /> with the code above but the exact same problem persists.

|||

Now I am not sure what the problem is. For creating users in your database, you can use the ASP.NET configuration tool to create and manage users, roles and other things. For me, for some reason, Create User option does not work, everything else works though. So what I do is add a temporary web page to my application with just a CreateUserWizard control on it, create a user, and then remove it from the project. For everything else, theres Master Card (ASP.NET Tool)

bullpit