Solved

COM+ permission denied message box

Posted on 2003-10-31
3
1,142 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
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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

820 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