Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Monday, March 26, 2012

Membership Database Question (Under a deadline - please respond soon!)

So I can't quite understand what's going on here... I've watched the video tutorial on ASP.NET about creating and securing my site using Membership (configuring roles and users), and I noticed that it creates a database in my App_Data folder (ASPNETDB, I think it's called). And I've got all that working on my local machine, but I'm confused as to how to move it to my server.

My hosting provider is M6.net, and they've told me that if I want to upload a database to their server, I have to create it using my admin panel, then upload the file and they'll fill it in for me. My question is this: if I give them the database that's automatically created when I use login controls on my website LOCALLY, will that database still provide the correct membership functionality for my website when it's run from the web server? Such that I can give them (M6) the ASPNETDB (containing all the usernames/passwords/rules? I've already specified for my local site), have them populate the similarly titled database on the server, and have it still work with my pages?

I'm also confused as to why that database doesn't have a connection string specified in the web.config file...can anyone shed some light on that?

As I have no direct access to the database server on my hosting provider, I need to create the membership database with all the correct details prior to uploading it to my server - if simply using the locally generated copy won't work, what should I do?

Lastly, the video tutorial says to go to the ASP.NET Configuration page to manage users, roles, security settings, etc., but I don't seem to have access to that through M6. Instead, I have access to a FrontPage configuration page that is strikingly similar in content to that ASP.NET Configuration page featured in the video, in that it also allows user and role management capability - is this the same thing under a different guise?

Hi the ev,

the ev:

My hosting provider is M6.net, and they've told me that if I want to upload a database to their server, I have to create it using my admin panel, then upload the file and they'll fill it in for me. My question is this: if I give them the database that's automatically created when I use login controls on my website LOCALLY, will that database still provide the correct membership functionality for my website when it's run from the web server? Such that I can give them (M6) the ASPNETDB (containing all the usernames/passwords/rules? I've already specified for my local site), have them populate the similarly titled database on the server, and have it still work with my pages?

What format's they'll accept it in will be up to them. To be sure you should probably provide them a script instead of a database as it will guarantee they can use it. You can generate the script within Management Studio or by using something like thedatabase publishing wizard.aspnet_regsql.exe also has a command line switch to generate the statements required to setup the database but won't include your data.

the ev:


I'm also confused as to why that database doesn't have a connection string specified in the web.config file...can anyone shed some light on that?

If you don't define the providers in your web.config the defaults will be used, which includes trying to use an sql instance running out of your app_data folder. This will need to be changed to work on your hosted platform. You'll need to specify a connection string matching what M6 tell you to use and setup the providers to use that. Seehere for an example of configuring membership in your web.config.

To make use of the existing information you'll have to make sure your applicationName in the config file matches, I believe it defaults to "/".


the ev:


Lastly, the video tutorial says to go to the ASP.NET Configuration page to manage users, roles, security settings, etc., but I don't seem to have access to that through M6. Instead, I have access to a FrontPage configuration page that is strikingly similar in content to that ASP.NET Configuration page featured in the video, in that it also allows user and role management capability - is this the same thing under a different guise?

I doubt it. I have always steered clear of Frontpage so I can't say for sure, but I'd assume this is going to manage permissions at the Webserver level and won't interact with your membership provider.

To provide some sort of user/role management after it's been deployed to your host you'll have to implement it yourself. There's atwopart article on doing just that which you may find interesting.

I hope that helps.

|||

Thanks for the reply! I'm checking out what you wrote now and will report back later! :)

|||

Its funny -- your questions seem very familar to me--

I find MS's way of handleing these things to be perplexing and scary all at the same time - so far i have not been able to get a membership DB to work on a server.

To be honest I don't really see how the thing works at all. Farther I love the tools that make my life easier but there is something fairly Freaky about giving anything this much controll of the development process. Granted theres no need to re-invent the wheel but why the hell is the wheel so inflexable you'd think you would be able to mount it onto anything and have a wheel that works...

Yet microsoft shrouds fundimental things such as this in total mistery...

Maybe im missing the ahh-hah moment here but if you've ever developed in Linux or with any other DB platform you'd know that getting to the db is stored some place and connected to with a db account. Why complicated with attaching, local file permissions and membership 'provider' voodoo?

</rant>

members of db_owner can't mangage roles?

I have two people assigned to the db_owner role in a database and they can do
everything except manage users and roles. For example when they try to look
at the properties of a role in EM they get the following error message:
Error229: EXECUTE permission denied on object ‘sp_helprolemember’, database
‘master’, owner dbo
(The same thing happens in QA)
In master, the public role has permission to execute sp_helprolemember and
both of these users are members of the public role in master.
I also tried adding them to the db_accessadmin and db_securityadmin roles in
the database as well as making them members of the securityadmin server role.
None of this worked either.
Any suggestions?
Did you check for user, roles denied execute on the stored
procedure?
use master
go
sp_helprotect 'sp_helprolemember'
-Sue
On Wed, 27 Apr 2005 14:22:07 -0700, "AlexB_05"
<AlexB_05@.discussions.microsoft.com> wrote:

>I have two people assigned to the db_owner role in a database and they can do
>everything except manage users and roles. For example when they try to look
>at the properties of a role in EM they get the following error message:
>Error229: EXECUTE permission denied on object sp_helprolemember, database
>master, owner dbo
>(The same thing happens in QA)
>In master, the public role has permission to execute sp_helprolemember and
>both of these users are members of the public role in master.
>I also tried adding them to the db_accessadmin and db_securityadmin roles in
>the database as well as making them members of the securityadmin server role.
> None of this worked either.
>Any suggestions?
|||That was it. Somehow the public role did not have permission to execute
sp_helprolemember. Once I granted those permissions everything worked.
"Sue Hoegemeier" wrote:

> Did you check for user, roles denied execute on the stored
> procedure?
> use master
> go
> sp_helprotect 'sp_helprolemember'
> -Sue
> On Wed, 27 Apr 2005 14:22:07 -0700, "AlexB_05"
> <AlexB_05@.discussions.microsoft.com> wrote:
>
>

members of db_owner can't mangage roles?

I have two people assigned to the db_owner role in a database and they can do
everything except manage users and roles. For example when they try to look
at the properties of a role in EM they get the following error message:
Error229: EXECUTE permission denied on object â'sp_helprolememberâ', database
â'masterâ', owner dbo
(The same thing happens in QA)
In master, the public role has permission to execute sp_helprolemember and
both of these users are members of the public role in master.
I also tried adding them to the db_accessadmin and db_securityadmin roles in
the database as well as making them members of the securityadmin server role.
None of this worked either.
Any suggestions?Did you check for user, roles denied execute on the stored
procedure?
use master
go
sp_helprotect 'sp_helprolemember'
-Sue
On Wed, 27 Apr 2005 14:22:07 -0700, "AlexB_05"
<AlexB_05@.discussions.microsoft.com> wrote:
>I have two people assigned to the db_owner role in a database and they can do
>everything except manage users and roles. For example when they try to look
>at the properties of a role in EM they get the following error message:
>Error229: EXECUTE permission denied on object ?sp_helprolemember?, database
>?master?, owner dbo
>(The same thing happens in QA)
>In master, the public role has permission to execute sp_helprolemember and
>both of these users are members of the public role in master.
>I also tried adding them to the db_accessadmin and db_securityadmin roles in
>the database as well as making them members of the securityadmin server role.
> None of this worked either.
>Any suggestions?|||That was it. Somehow the public role did not have permission to execute
sp_helprolemember. Once I granted those permissions everything worked.
"Sue Hoegemeier" wrote:
> Did you check for user, roles denied execute on the stored
> procedure?
> use master
> go
> sp_helprotect 'sp_helprolemember'
> -Sue
> On Wed, 27 Apr 2005 14:22:07 -0700, "AlexB_05"
> <AlexB_05@.discussions.microsoft.com> wrote:
> >I have two people assigned to the db_owner role in a database and they can do
> >everything except manage users and roles. For example when they try to look
> >at the properties of a role in EM they get the following error message:
> >
> >Error229: EXECUTE permission denied on object â'sp_helprolememberâ', database
> >â'masterâ', owner dbo
> >
> >(The same thing happens in QA)
> >
> >In master, the public role has permission to execute sp_helprolemember and
> >both of these users are members of the public role in master.
> >
> >I also tried adding them to the db_accessadmin and db_securityadmin roles in
> >the database as well as making them members of the securityadmin server role.
> > None of this worked either.
> >
> >Any suggestions?
>

members of db_owner can't mangage roles?

I have two people assigned to the db_owner role in a database and they can d
o
everything except manage users and roles. For example when they try to look
at the properties of a role in EM they get the following error message:
Error229: EXECUTE permission denied on object ‘sp_helprolemember’, data
base
‘master’, owner dbo
(The same thing happens in QA)
In master, the public role has permission to execute sp_helprolemember and
both of these users are members of the public role in master.
I also tried adding them to the db_accessadmin and db_securityadmin roles in
the database as well as making them members of the securityadmin server role
.
None of this worked either.
Any suggestions?Did you check for user, roles denied execute on the stored
procedure?
use master
go
sp_helprotect 'sp_helprolemember'
-Sue
On Wed, 27 Apr 2005 14:22:07 -0700, "AlexB_05"
<AlexB_05@.discussions.microsoft.com> wrote:

>I have two people assigned to the db_owner role in a database and they can
do
>everything except manage users and roles. For example when they try to loo
k
>at the properties of a role in EM they get the following error message:
>Error229: EXECUTE permission denied on object sp_helprolemember, databas
e
>master, owner dbo
>(The same thing happens in QA)
>In master, the public role has permission to execute sp_helprolemember and
>both of these users are members of the public role in master.
>I also tried adding them to the db_accessadmin and db_securityadmin roles i
n
>the database as well as making them members of the securityadmin server rol
e.
> None of this worked either.
>Any suggestions?|||That was it. Somehow the public role did not have permission to execute
sp_helprolemember. Once I granted those permissions everything worked.
"Sue Hoegemeier" wrote:

> Did you check for user, roles denied execute on the stored
> procedure?
> use master
> go
> sp_helprotect 'sp_helprolemember'
> -Sue
> On Wed, 27 Apr 2005 14:22:07 -0700, "AlexB_05"
> <AlexB_05@.discussions.microsoft.com> wrote:
>
>sql

Monday, March 12, 2012

MDX, can''t make correct totals at [(All)] level

Hi,

I'm trying to make a calculate member using this script:

Code Snippet

iif([Stores].[Store Name].CurrentMember.level is [Stores].[Store Name].[(All)],

sum(

(FILTER(

descendants([Stores].[Store Name], [Stores].[Store Name]),

(([Stores].[Store Name].currentmember, [Measures].[S v net price budget]) <> 0)

), [Measures].[S v net price disc])),

[Measures].[S v net price disc])

but the total generated is always the same as if I made a sum for the [Measures].[S v net price disc].

I checked folowing:

Code Snippet

with member measures.test1 as sum(FILTER(

descendants([Stores].[Store Name], [Stores].[Store Name]),

[Measures].[S v net price budget] <> 0)

, [Measures].[S v net price disc])

select

measures.test1 on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

Code Snippet

select

([Stores].[Store Name], [Measures].[S v net price disc]) on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

it gives the same result, but the:

Code Snippet

select

(FILTER(descendants([Stores].[Store Name], [Stores].[Store Name]), [Measures].[S v net price budget] <> 0), [Measures].[S v net price disc]) on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

has 92 colums, and:

Code Snippet

select

(descendants([Stores].[Store Name], [Stores].[Store Name]), [Measures].[S v net price disc]) on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

has 146 colums.

So the totals should be different.

I have been trying many different scripts and the result was always the same, so if You have any idea how to make it work, help me !!!

Thanks,

Micha?

Assuming you're using AS 2005, it may be worth explictly specifying member and level in Descendants(), rather than relying on hierarchy defaults - does that make any difference?

Descendants([Stores].[Store Name].CurrentMember, [Stores].[Store Name].[Store Name])

MDX, can''t make correct totals at [(All)] level

Hi,

I'm trying to make a calculate member using this script:

Code Snippet

iif([Stores].[Store Name].CurrentMember.level is [Stores].[Store Name].[(All)],

sum(

(FILTER(

descendants([Stores].[Store Name], [Stores].[Store Name]),

(([Stores].[Store Name].currentmember, [Measures].[S v net price budget]) <> 0)

), [Measures].[S v net price disc])),

[Measures].[S v net price disc])

but the total generated is always the same as if I made a sum for the [Measures].[S v net price disc].

I checked folowing:

Code Snippet

with member measures.test1 as sum(FILTER(

descendants([Stores].[Store Name], [Stores].[Store Name]),

[Measures].[S v net price budget] <> 0)

, [Measures].[S v net price disc])

select

measures.test1 on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

Code Snippet

select

([Stores].[Store Name], [Measures].[S v net price disc]) on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

it gives the same result, but the:

Code Snippet

select

(FILTER(descendants([Stores].[Store Name], [Stores].[Store Name]), [Measures].[S v net price budget] <> 0), [Measures].[S v net price disc]) on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

has 92 colums, and:

Code Snippet

select

(descendants([Stores].[Store Name], [Stores].[Store Name]), [Measures].[S v net price disc]) on 0,

[Dates].[Date].[Month Desc].&[09/2007] on 1

from sales;

has 146 colums.

So the totals should be different.

I have been trying many different scripts and the result was always the same, so if You have any idea how to make it work, help me !!!

Thanks,

Micha?

Assuming you're using AS 2005, it may be worth explictly specifying member and level in Descendants(), rather than relying on hierarchy defaults - does that make any difference?

Descendants([Stores].[Store Name].CurrentMember, [Stores].[Store Name].[Store Name])