Microsoft Content Management Server - resource size and permissions

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > November 2005 > resource size and permissions





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author resource size and permissions
Chandy

2005-11-10, 7:50 am

Hi all,

Does anyone know what ACL permissions are required for MCMS to be able
to retrieve the Size property of a resource? I have some code which
pulls out the size and this worked all the time in development but
sometimes on the production server it fails (and I don't have access to
see what the error is). When this happens the resource in question
also fails to be accessible anonymously.

This all sounds like ACLs to me, but what should they be set to and
where? How does MCMS resolve the resource request into an object in
rdonlyres? I am assuming also that this can only be a problem once
there has been an initial request for the resource so that it is pulled
from the db onto the server filesystem but cannot test it as the
problem is only on live.

Thanks,

Chandy

Stefan [MSFT]

2005-11-10, 7:50 am

Hi Charndy,

only subscriber permissions on the resource gallery are required.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131619249.768140.176840@z14g2000cwz.googlegroups.com...
> Hi all,
>
> Does anyone know what ACL permissions are required for MCMS to be able
> to retrieve the Size property of a resource? I have some code which
> pulls out the size and this worked all the time in development but
> sometimes on the production server it fails (and I don't have access to
> see what the error is). When this happens the resource in question
> also fails to be accessible anonymously.
>
> This all sounds like ACLs to me, but what should they be set to and
> where? How does MCMS resolve the resource request into an object in
> rdonlyres? I am assuming also that this can only be a problem once
> there has been an initial request for the resource so that it is pulled
> from the db onto the server filesystem but cannot test it as the
> problem is only on live.
>
> Thanks,
>
> Chandy
>



Chandy

2005-11-10, 7:50 am

Hi Stefan,

I am assuming that this is nothing to do with MCMS premissions but
Filesystem permissions as the problem only occurs with single files and
not an entire gallery. Will check though.

Chandy

Chandy

2005-11-10, 7:50 am

Just checked, the subscribers group definitely has access to all
galleries.

Chandy

Stefan [MSFT]

2005-11-10, 7:50 am

Hi Chandy,

MCMS does not use the file system to determine the size of a resource in the
resource gallery.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131622877.382206.27860@o13g2000cwo.googlegroups.com...
> Hi Stefan,
>
> I am assuming that this is nothing to do with MCMS premissions but
> Filesystem permissions as the problem only occurs with single files and
> not an entire gallery. Will check though.
>
> Chandy
>



Stefan [MSFT]

2005-11-10, 7:50 am

Hi Chandy,

please show me the relevant parts of your code.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131622965.907006.32810@o13g2000cwo.googlegroups.com...
> Just checked, the subscribers group definitely has access to all
> galleries.
>
> Chandy
>



Chandy

2005-11-10, 7:50 am

Hi Stefan,

Here is the code that fetches the filesize as a string..it's pretty
basic though and works most of the time so I don't see it as the issue?

Dim rs As Resource
Dim fileSize As Decimal
Dim strFileSize As String = String.Empty
Dim strGuid As String = Me.getGuidFromString(strUrl)
rs = CType(CmsHttpContext.Current.Searches.GetByGuid(strGuid),
Resource)
fileSize = rs.Size
strFileSize = CType(Math.Round(fileSize / 1024, 2), String)

I should also add that the code works fine for all resources when
editing, it's only on the readonly site that there are any issues.
Again this says to me 'ACL on a file'.

Chandy

Stefan [MSFT]

2005-11-10, 7:50 am

Hi Chandy,

please step through the code and check if you get the resource object.
If yes, which value is returned for rs.Size?

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131629230.283794.83010@o13g2000cwo.googlegroups.com...
> Hi Stefan,
>
> Here is the code that fetches the filesize as a string..it's pretty
> basic though and works most of the time so I don't see it as the issue?
>
> Dim rs As Resource
> Dim fileSize As Decimal
> Dim strFileSize As String = String.Empty
> Dim strGuid As String = Me.getGuidFromString(strUrl)
> rs = CType(CmsHttpContext.Current.Searches.GetByGuid(strGuid),
> Resource)
> fileSize = rs.Size
> strFileSize = CType(Math.Round(fileSize / 1024, 2), String)
>
> I should also add that the code works fine for all resources when
> editing, it's only on the readonly site that there are any issues.
> Again this says to me 'ACL on a file'.
>
> Chandy
>



Chandy

2005-11-10, 6:00 pm

I get the resouce, the size is returned as 128195 or whatever is
relevant, which then becomes 128195D when it's the decimal and "128.95"
when a string. As I said, this all works fine but for some resources
on the public site it fails, but only on the public site. I cannot
replicate it yet in development.

Chandy

Stefan [MSFT] wrote:
[vbcol=seagreen]
> Hi Chandy,
>
> please step through the code and check if you get the resource object.
> If yes, which value is returned for rs.Size?
>
> Cheers,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
> ----------------------
>
>
> "Chandy" <chandy@totalise.co.uk> wrote in message
> news:1131629230.283794.83010@o13g2000cwo.googlegroups.com...

Stefan [MSFT]

2005-11-10, 6:00 pm

Hi Chandy,

what do you mean "for some resources on the public site it fails".
Please debug this on the public site and for the affected resources.
Are you getting the resource object for these affected resource?
What is returned for the size for the affected resources?

Thanks,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131633233.484680.306840@z14g2000cwz.googlegroups.com...
>I get the resouce, the size is returned as 128195 or whatever is
> relevant, which then becomes 128195D when it's the decimal and "128.95"
> when a string. As I said, this all works fine but for some resources
> on the public site it fails, but only on the public site. I cannot
> replicate it yet in development.
>
> Chandy
>
> Stefan [MSFT] wrote:
>
>



Chandy

2005-11-10, 6:00 pm

Hi Stefan,

Debugging on the public site is not possible - it is a public site and
uses release binaries. By 'fails' I mean that the control page does not
render from the point at which the function to calculate the size of
the resource is called, indicating that the function call failed. An
HTTP request for the affected resource also prompts for authentication.
I have run the code on a readonly development site and there are no
problems, even using the same actual resource files. The only thing I
can think is that there is an ACL issue somewhere on the live
production server for some reason but I do not know where that would be
and what it needs to be set to in order to result in this behaviour.

Chandy

Stefan [MSFT]

2005-11-10, 6:00 pm

Hi Chandy,

the instrument that code to write out the content of the rs object and the
content of the size property.
Btw: if an authentication prompt occurs then either the user does not have
rights on this resource or it has been deleted.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131634706.804956.68990@z14g2000cwz.googlegroups.com...
> Hi Stefan,
>
> Debugging on the public site is not possible - it is a public site and
> uses release binaries. By 'fails' I mean that the control page does not
> render from the point at which the function to calculate the size of
> the resource is called, indicating that the function call failed. An
> HTTP request for the affected resource also prompts for authentication.
> I have run the code on a readonly development site and there are no
> problems, even using the same actual resource files. The only thing I
> can think is that there is an ACL issue somewhere on the live
> production server for some reason but I do not know where that would be
> and what it needs to be set to in order to result in this behaviour.
>
> Chandy
>



Chandy

2005-11-10, 6:00 pm

Hi Stefan,

Sorry, I don't know what you mean by your first sentence (btw, you
sound tired?). If the only way to be prompted for a resource is MCMS
permissions or it's deleted (and an ACL -cannot- be involved) then
that's what I needed..I will persue the 'deleted' option, and see why
it's even trying to get the size of a deleted resource!

Thanks,

Chandy

Chandy

2005-11-10, 6:00 pm

Except why then would it work okay on the edit site for the same
resource??

Chandy

Stefan [MSFT]

2005-11-10, 6:00 pm

Hi Chandy,

maybe the user on the edit site is an administrator?
An administrator can access deleted objects.
Or it is a different database?

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131635867.045206.175930@o13g2000cwo.googlegroups.com...
> Except why then would it work okay on the edit site for the same
> resource??
>
> Chandy
>



Stefan [MSFT]

2005-11-10, 6:00 pm

Hi Chandy,

instrument means add debug code that writes the content of these objects to
a file.
That's what you usually need to do if debugging is not an option.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131635718.332441.31370@g44g2000cwa.googlegroups.com...
> Hi Stefan,
>
> Sorry, I don't know what you mean by your first sentence (btw, you
> sound tired?). If the only way to be prompted for a resource is MCMS
> permissions or it's deleted (and an ACL -cannot- be involved) then
> that's what I needed..I will persue the 'deleted' option, and see why
> it's even trying to get the size of a deleted resource!
>
> Thanks,
>
> Chandy
>



Chandy

2005-11-10, 6:00 pm

Hi Stefan,

This gets weirder yet. I wrote a quick console app to run on the box.
Simply calls AuthenticateAsGuest against a new CmsApplicationContext
and gets the resource names and sizes form a specified gallery. Runs
fine on my development server but on the production box
AuthenticateAsGuest fails!

Unhandled Exception:
Microsoft.ContentManagement.Publishing.CmsAccessDeniedExcep
tion: The CMS Server license has expired. --->
System.Runtime.InteropServices.CO
MException (0x80041C00)
at
Microsoft.ContentManagement.Interop.Publishing.CmsApplicationContextClass.
AuthenticateAsGuest(RcwPublishingMode Mode, String ClientAccountName,
String aut
henticationType, String remoteMachineAddress)
at
Microsoft.ContentManagement.Publishing.CmsApplicationContext.AuthenticateA
sGuest()
--- End of inner exception stack trace ---
at
Microsoft.ContentManagement.Publishing.CmsApplicationContext.AuthenticateA
sGuest()
at ResourceCheck.Module1.Main()

'licence has expired'??
The only thing I can think is that the production box is running
Standard Edition whereas this was built and run on a development
install??

Chandy

Stefan [MSFT]

2005-11-13, 5:51 pm

Hi Chandy,

The message 'The CMS Server license has expired' will show up for a non-eval
edition of MCMS if a problem when reading the registry occurs. This can be
caused by permission problem when accessing the registry. Please check the
permissions on the \HTKLM\Software\NCompass registry key.

Cheers,
Stefan


"Chandy" <chandy@totalise.co.uk> schrieb im Newsbeitrag
news:1131641702.963921.201010@g47g2000cwa.googlegroups.com...
> Hi Stefan,
>
> This gets weirder yet. I wrote a quick console app to run on the box.
> Simply calls AuthenticateAsGuest against a new CmsApplicationContext
> and gets the resource names and sizes form a specified gallery. Runs
> fine on my development server but on the production box
> AuthenticateAsGuest fails!
>
> Unhandled Exception:
> Microsoft.ContentManagement.Publishing.CmsAccessDeniedExcep
> tion: The CMS Server license has expired. --->
> System.Runtime.InteropServices.CO
> MException (0x80041C00)
> at
> Microsoft.ContentManagement.Interop.Publishing.CmsApplicationContextClass.
> AuthenticateAsGuest(RcwPublishingMode Mode, String ClientAccountName,
> String aut
> henticationType, String remoteMachineAddress)
> at
> Microsoft.ContentManagement.Publishing.CmsApplicationContext.AuthenticateA
> sGuest()
> --- End of inner exception stack trace ---
> at
> Microsoft.ContentManagement.Publishing.CmsApplicationContext.AuthenticateA
> sGuest()
> at ResourceCheck.Module1.Main()
>
> 'licence has expired'??
> The only thing I can think is that the production box is running
> Standard Edition whereas this was built and run on a development
> install??
>
> Chandy
>



Chandy

2005-11-14, 7:48 am


Hi Stefan,

There are quite a lot of users, groups and individual permissions
options. Can you tell me a minimum that is required? Unfortunately I
can't run regmon on the server!

Chandy

Stefan [MSFT] wrote:
[vbcol=seagreen]
> Hi Chandy,
>
> The message 'The CMS Server license has expired' will show up for a non-eval
> edition of MCMS if a problem when reading the registry occurs. This can be
> caused by permission problem when accessing the registry. Please check the
> permissions on the \HTKLM\Software\NCompass registry key.
>
> Cheers,
> Stefan
>
>
> "Chandy" <chandy@totalise.co.uk> schrieb im Newsbeitrag
> news:1131641702.963921.201010@g47g2000cwa.googlegroups.com...

Stefan [MSFT]

2005-11-14, 7:48 am

Hi Chandy,

sorry I don't have such information available.
You could try to use Windows security auditing if regmon is not an option.

Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
Check out the new book as well: Advanced MCMS development:
http://tinyurl.com/8ugwj
----------------------


"Chandy" <chandy@totalise.co.uk> wrote in message
news:1131966260.070338.42690@f14g2000cwb.googlegroups.com...
>
> Hi Stefan,
>
> There are quite a lot of users, groups and individual permissions
> options. Can you tell me a minimum that is required? Unfortunately I
> can't run regmon on the server!
>
> Chandy
>
> Stefan [MSFT] wrote:
>
>



Chandy

2005-11-14, 7:48 am

Hi Stefan,

Sadly I don't even have access to the security event log, and auditing
is also minimal! I will throw this back to the host.

Thanks,

Chandy

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com