Solved

COM+ permission denied message box

Posted on 2003-10-31
3
1,134 Views
Last Modified: 2009-07-29
i have a vb dll hosted in COM+.

I have set up role based security on COM+.

When a user trys to connect to the dll and they are not in the relevant group.

A message is generated to the client - "Permission Denied"


--------------------------------------------------------------
What i want to know is:

Can i Customise this message and the message box title?


thanks
0
Comment
Question by:MrKevorkian
  • 2
3 Comments
 
LVL 2

Expert Comment

by:cero
Comment Utility
Hi MrKevorkian,

The simplest method to personalize the message is:
1. Create a error handler (in the client of the component)
2. in the handler test if the err.number is 70 (permission denied), if this is the case
use a personalized message.




Private Sub Command1_Click()
    Dim obj As Object
    On Error GoTo errh
   
    Set obj = CreateObject("proyecto1.class1")
    obj.DemoMethod
 
    Set obj = Nothing
   
    Exit Sub
errh:
    MsgBox Err.Number & " " & "My personalized message"
End Sub


regards,
cero
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
I don't think this is an error you can handle in your component as the system has determined rights prior to launching the component.  This is a system generic prompt and I don't know of a way to change it.
0
 
LVL 2

Accepted Solution

by:
cero earned 100 total points
Comment Utility
AzraSound is right, you can't handle this in the component, but as I mention in my previous comment, you have to do that in the client of the component.

cero.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
DIR issue 7 46
bit defender blocks good applications 2 50
How to debug this code 7 49
Add a task in Outlook from access 11 32
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now