| Author |
Message |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
resource size and permissions |
|
|
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 |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
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 |
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
Just checked, the subscribers group definitely has access to all
galleries.
Chandy |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | Just checked, the subscribers group definitely has access to all
galleries.
Chandy
|
|
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
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 |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 1:50 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
Except why then would it work okay on the edit site for the same
resource??
Chandy |
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | 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:
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
|
|
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
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:
| Quote: | 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
|
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | Except why then would it work okay on the edit site for the same
resource??
Chandy
|
|
|
| Back to top |
|
 |
Stefan [MSFT]
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
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...
| Quote: | 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
|
|
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
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 |
|
| Back to top |
|
 |
Chandy
Guest
|
Posted:
Thu Nov 10, 2005 5:51 pm Post subject:
Re: resource size and permissions |
|
|
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 |
|
| Back to top |
|
 |
|
|
|
|