using the HasAccess call but getting error in debug
Hi All,
I am using the unbraco.library:HasAccess() and when I add it the XSL editor and save it I get no errors, but when I run it on the page I get an error in debugMode
Input string was not in a correct format. Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options,
NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at umbraco.cms.businesslogic.web.Access.getProtectedPage(String Path) at umbraco.cms.businesslogic.web.Access.HasAccess(Int32 documentId, String path, MembershipUser member) at umbraco.library.HasAccess(Int32 NodeId, String Path)
This is my code I am using to check if the user HasAccess
using the HasAccess call but getting error in debug
Hi All,
I am using the unbraco.library:HasAccess() and when I add it the XSL editor and save it I get no errors, but when I run it on the page I get an error in debugMode
Input string was not in a correct format.
Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at umbraco.cms.businesslogic.web.Access.getProtectedPage(String Path)
at umbraco.cms.businesslogic.web.Access.HasAccess(Int32 documentId, String path, MembershipUser member)
at umbraco.library.HasAccess(Int32 NodeId, String Path)
This is my code I am using to check if the user HasAccess
Any help greatly appreciated
Cheers
Tom
Hi tom,
Not sure if this is the correct use of the HasAccess() method from within xslt?
Have you tried
as you're not using the second param in a correct way. It needs the actual path as in "-1,x,y" instead of the url you're passing in your example
Hope this helps.
Regards,
/Dirk
Dirk,
You have done it again mate!!! Thanks again...
The reason I did it that way was because of the path requirement said string, but it has just occoured to me that it would require a Uri instead.
I think I will post this in the Wiki as I think it would benefit the community
Tom
is working on a reply...