The only way I know to do this correctly is to use the AccessCheck Windows
API function via pinvoke. It is a bit of a pain to set it up, but it should
give you the most reliable results.
The other thing you might do is simply impersonate the user and try to
access the file via a System.IO class, catching the exception if it occurs.
That is less elegant and possibly slower, but probably a lot easier to
implement.
Joe K.
"Corno" <Corno@dds%FAKE%.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Yes, I'm using Windows ACL. The webserver runs in an active directory and
in the web.config of the pages I've configured access rights.
How would I do it in that case?
TIA,
Corno
"Joe Kaplan (MVP - ADSI)" <jo*************@removethis.accenture.com> wrote
in message news:e4****************@TK2MSFTNGP14.phx.gbl... It depends a great deal on how the authorization is being done. Are you
using Windows ACLs or a custom role-based mechanism or something else?
Joe K.
"Corno" <Corno@dds%FAKE%.nl> wrote in message
news:eN*************@TK2MSFTNGP10.phx.gbl... Hi all,
How do I find out if the current visitor of my page has enough rights to
open another page on the same server?
I need this to show a link to that page only when the visitor can
actually visit that page and will not get an 'access denied' message.
IOW, I'm looking for the implementation of the following function:
Public Function CurrentUserCanOpenPage(ByVal TheURL As String) As
Boolean
'determine if the current user can open the page with the given URL
End Function
TIA,
Corno