Solved

COM+ permission denied message box

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 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…

803 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