Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > [2.0] Cannot create membership database on webhost provider

Reply
Thread Tools

[2.0] Cannot create membership database on webhost provider

 
 
~~~ .NET Ed ~~~
Guest
Posts: n/a
 
      02-27-2007
Hi,
I am having problems creating the necessary membership stuff on my
webhost. Here is the information.

My webhost provider (shared hosting) has Microsoft .NET v2.0 and both MSSQL
databases. Obviously one as customer has no access to the master tables
where the membership scripts deploy themselves.

On my shared hosting I created a SQL Server 2005 database, say I called it
MyMembers to which I had to assign a user and password credentials at the
time of creation. Unfortunately I have gotten stuck there.

Approach #1: ASPNET_REGSQL
--------------
I used aspnet_regsql .exe, entered the Server name (the SQL server address
of my webhost provider), selected SQL Server Authentication and entered the
user/password assigned when I created the database. Also entered the name of
the database exactly as I created it (i.e. MyMembers) because it can't do
the browsing.

I then clicked Next and was presented with the server name and DB name.
Clicked Next again and after a few moments I got the following error:

Setup failed.

Exception:
Unable to connect to SQL Server database.

----------------------------------------
Details of failure
----------------------------------------

System.Web.HttpException: Unable to connect to SQL Server database. --->
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: Named Pipes Provider, error:
40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject
stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner, String
protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean
encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection
owningObject, Boolean aliasLookup)
at
System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection
owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection
owningObject)
at
System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection (String server,
String user, String password, Boolean trusted, String connectionString)
--- End of inner exception stack trace ---
at System.Web.Management.SqlServices.GetSqlConnection (String server,
String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplication Services(String
server, String user, String password, Boolean trusted, String
connectionString, String database, String dbFileName, SqlFeatures features,
Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures
features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()

Approach #2: MANAGEMENT STUDIO EXPRESS
-------------------------------------------------------
Given that option #1 did not work I used the Microsoft SQL Server Management
Studio Express to setup a connection to the DB server on the webhost
provider. The connection succeeded and I was presented with a tree
containing the server name and the databases.

I can see there the database I created on the webhost (MyMembers). Obviously
given that it is shared hosting I only have rights to that database and not
any other.

I read somewhere that if ASPNET_REGSQL did not work one could run
InstallCommon.sql and then InstallMembership.sql so I tried to do that using
the Management studio but got stomped with:

---------------------------------------

Starting execution of InstallCommon.SQL

---------------------------------------

Creating the aspnetdb database...

Msg 262, Level 14, State 1, Line 1

CREATE DATABASE permission denied in database 'master'.

Msg 916, Level 14, State 1, Line 2

The server principal "cptyuser" is not able to access the database
"ASPNETDB" under the current security context.

(120 row(s) affected)

Creating the aspnet_Applications table...

Creating the aspnet_Users table...

Creating the aspnet_SchemaVersions table...

Cannot grant, deny, or revoke permissions to sa, dbo, information_schema,
sys, or yourself.

Cannot grant, deny, or revoke permissions to sa, dbo, information_schema,
sys, or yourself.

(0 row(s) affected)

(1 row(s) affected)

Cannot grant, deny, or revoke permissions to sa, dbo, information_schema,
sys, or yourself.

Creating the vw_aspnet_Applications view...

Creating the vw_aspnet_Users view...

Cannot grant, deny, or revoke permissions to sa, dbo, information_schema,
sys, or yourself.

Cannot grant, deny, or revoke permissions to sa, dbo, information_schema,
sys, or yourself.

----------------------------------------

Completed execution of InstallCommon.SQL

----------------------------------------



So, what can I do? can somebody tell me how I can accomplish this? What I
need to do is work on my development PC and then deploy things to the
production site on the ISP provider.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership or Role Provider // Provider Model // Factories .. How does MS do it? sloan ASP .Net 1 07-03-2007 08:17 PM
Want to create a custom membership provider, but use SQLMembershipProvider functionality Mwob ASP .Net 0 10-19-2006 03:13 PM
membership provider for the sam database Jerry C ASP .Net Security 3 07-13-2006 02:26 AM
Deploying 2.0 app on a Service Provider .. Membership Provider sloan ASP .Net 5 06-03-2006 11:20 PM
How to create Profile,Membership and Role provider with SQL2000/2005 RedHair ASP .Net 2 02-21-2006 02:03 AM



Advertisments