Sunday, March 11, 2012

Adding roles to hosted server

I need to find out how to add roles to my SQL that is on a hosted server.
I have created 2 roles, but after publishing and uploading my site, when I try and create a user, I get the error:

"Exception Details: System.Configuration.Provider.ProviderException: The role 'userAtype' was not found."

There are two other roles that the same happens with.
Running it locally all was fine, I just didn't seem to get this info where it needs to be when I uploaded it.

I'm new to messing about with SQL, so sorry if this is really elementary.
I have VS2005 Standard, and the SQL Server Management Studio Express.

The hosting provider I have does not allow remote connections to the DB on shared hosting, so I need to (?) generate a script to populate the DB? and run it in their browser-based Querry Window?
How would I do this?

Thanks.you can use an option on the aspnet_reg.exe command that creates a script. then you can use that sqlscript to load the remote database.|||I'm afraid I'll need a bit more than that.

Are you refering to "aspnet_regsql.exe"? I can't seem to find "aspnet_reg.exe"A bit more info, please?
Thanks|||

Yes, sorry. I meant aspnet_regsql.exe

http://msdn2.microsoft.com/en-us/library/x28wfk74.aspx

If you use the option-sqlexportonly filename

You can export the file it will create

|||I'll post this here as a follow up.

I tried out the new SQL Server Database Publishing Wizard CTP 1, found in the sticky at the top of this forum.
Fast, simple.
Well, there is a goof with GoDaddy's Querry Analyser [sic] and I had to adjust the generated script in a text editor, but that is GoDaddy's fault/problem.

Very straightforward - the command line goes like this:

sqlpubwiz script -C "Server=MACHINENEAME\SQLEXPRESS;AttachDbFilename=\"C:\path\to\the\local\ASPNETDB.MDF\";Integrated Security=True;User Instance=True;Database=DB_NAME" myDB.sql

No comments:

Post a Comment