Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

COM+ permission denied message box

Posted on 2003-10-31
3
Medium Priority
?
1,156 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:cero
ID: 9660355
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
ID: 9660411
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 400 total points
ID: 9660485
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 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