Problems deploying membership on a hosted environment

G

Guest

I ran the aspnet_regsql.exe tool with the -sqlexportonly option to create the
script. I searched and replace the string [dbo] by [mySchema] and had the
dba's run the script. When I do anything like Membership.CreateUser or click
on the 'security' tab in the website admin tool I get... Could not find
stored procedure 'dbo.aspnet_CheckSchemaVersion'.
I think this is because "dbo" is harcoded in the framework. The hosting
company won't let us use the dbo user of course. Do I have yo rewrite the
provider? Is there any other and easyer workaround for getting this to work?
Thank you very much
 
M

Mark Fitzpatrick

Dbo isn't a user, it's a schema. Are you sure that you can't apply the
schema yourself? By default, the schema ownership will be for the user
account that was logged in to create the tables/stored procedures but that
doesn't mean you're limited to it. dbo isn't a user itself, it's a role and
your user account is probably already in that role, just using a seperate
owner schema. Try creating a new table so that you have an object generated
with your current schema. Then run the following stored procedure

sp_changeobjectowner 'itemname','dbo' where itemname is the name of the new
object.

This should change the schema to dbo and you can check and see if you can
still access the object OK through a tool like sql management console. If
that works then you can use this procedure to change the schema of all the
aspnet objects needed for membership.
 
G

Guest

Mark, I try to execute what you posted by I get the following message:

Msg 15247, Level 16, State 1, Procedure sp_changeobjectowner, Line 17
User does not have permission to perform this action.

Is that dbo string hardcoded in the framework? I am sure that I am not the
first one trying to deploy an ASP.NET 2.0 website to a hosted environment
without dbo permissions in the SQL Server 2000. It must be an easy solution.

Thank you for your time.

__________________________


Mark Fitzpatrick said:
Dbo isn't a user, it's a schema. Are you sure that you can't apply the
schema yourself? By default, the schema ownership will be for the user
account that was logged in to create the tables/stored procedures but that
doesn't mean you're limited to it. dbo isn't a user itself, it's a role and
your user account is probably already in that role, just using a seperate
owner schema. Try creating a new table so that you have an object generated
with your current schema. Then run the following stored procedure

sp_changeobjectowner 'itemname','dbo' where itemname is the name of the new
object.

This should change the schema to dbo and you can check and see if you can
still access the object OK through a tool like sql management console. If
that works then you can use this procedure to change the schema of all the
aspnet objects needed for membership.


--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

Iván Sainz said:
I ran the aspnet_regsql.exe tool with the -sqlexportonly option to create
the
script. I searched and replace the string [dbo] by [mySchema] and had the
dba's run the script. When I do anything like Membership.CreateUser or
click
on the 'security' tab in the website admin tool I get... Could not find
stored procedure 'dbo.aspnet_CheckSchemaVersion'.
I think this is because "dbo" is harcoded in the framework. The hosting
company won't let us use the dbo user of course. Do I have yo rewrite the
provider? Is there any other and easyer workaround for getting this to
work?
Thank you very much
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top