A COM was used in VBscript and worked fine.
Now I try to use C# to call it with following code:
Type myType = Type.GetTypeFromProgID("MyProgID");
object myObj = Activator.CreateInstance(myType);
Object myResult = myType.InvokeMember("MyFunction",
BindingFlags.DeclaredOnly | BindingFlags.Public |
BindingFlags.NonPublic | BindingFlags.Instance |
BindingFlags.InvokeMethod, null, myObj,
new Object[] {myParam});
The 3rd line code got an error: "Permission denied".
Any idea, how fix it?
Thanks,
FD 3 3497
Try to play with different sets of BindingFlags. I wonder if removing
"NonPublic" would help...
Val.
"FD" <fd***@allstate.com> wrote in message
news:0a****************************@phx.gbl... A COM was used in VBscript and worked fine. Now I try to use C# to call it with following code:
Type myType = Type.GetTypeFromProgID("MyProgID"); object myObj = Activator.CreateInstance(myType); Object myResult = myType.InvokeMember("MyFunction", BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, myObj, new Object[] {myParam});
The 3rd line code got an error: "Permission denied".
Any idea, how fix it? Thanks, FD
FD wrote:
|| A COM was used in VBscript and worked fine.
|| Now I try to use C# to call it with following code:
||
|| Type myType = Type.GetTypeFromProgID("MyProgID");
|| object myObj = Activator.CreateInstance(myType);
|| Object myResult = myType.InvokeMember("MyFunction",
|| BindingFlags.DeclaredOnly | BindingFlags.Public |
|| BindingFlags.NonPublic | BindingFlags.Instance |
|| BindingFlags.InvokeMethod, null, myObj,
|| new Object[] {myParam});
||
|| The 3rd line code got an error: "Permission denied".
||
|| Any idea, how fix it?
|| Thanks,
|| FD
What's the identity/security context of the user running this code (aspnet or other)?
What does MyProgID refer to (exec server or a DLL)?
Willy. -----Original Message----- FD wrote: || A COM was used in VBscript and worked fine. || Now I try to use C# to call it with following code: || || Type myType = Type.GetTypeFromProgID("MyProgID"); || object myObj = Activator.CreateInstance(myType); || Object myResult = myType.InvokeMember("MyFunction", || BindingFlags.DeclaredOnly | BindingFlags.Public | || BindingFlags.NonPublic | BindingFlags.Instance | || BindingFlags.InvokeMethod, null, myObj, || new Object[] {myParam}); || || The 3rd line code got an error: "Permission denied". || || Any idea, how fix it? || Thanks, || FD
What's the identity/security context of the user running
this code (aspnet or other)?What does MyProgID refer to (exec server or a DLL)?
Willy.
.
This is a aspnet app to call "MyProgID" - which is a VB6
dll and was registered.
Did I miss some setting?
Thanks,
FD This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Yitzhak |
last post by:
I am having "Permission denied" error while calling
LogEvent method of WScript.Shell component.
Basically, ASP page calls Windows Script Host Shell
component to log events to the OS Application...
|
by: Elie Grouchko |
last post by:
Hi
I am trying to shutdown a COM+ application from an ASP page implemented
using VBScript.
I get:
Err.Number=0x46
Err.Source=Microsoft VBScript runtime error
Err.Description=Permission...
|
by: John Mack |
last post by:
Intermittently I get the following error on Firefox:
"Error: uncaught exception: Permission denied to get property
HTMLDocument.window"
What can cause this error? I do an image switch via JS...
|
by: dx27s |
last post by:
Hi all,
I'm working with the XMLHttpRequest object. I receive the following
error message: "Permission denied to call method XMLHttpRequest.open"
This occurs in Firefox only. IE works fine.
...
|
by: Mark E. Hamilton |
last post by:
Sorry, I probably should have re-stated the problem:
We're using Python 2.3.5 on AIX 5.2, and get the follow error messages
from some of our code. I haven't yet tracked down exactly where it's...
|
by: Vlad de Mille IV |
last post by:
Well, as the subject says....
Briefly, when I try to run *any* wizard, I get a simple dialog, stating
"Permission Denied", to which I can only click "OK".
I suspect this is a windows (XP)...
|
by: Jake Barnes |
last post by:
I can not figure out the meaning of this error:
Error: " nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::
http://www.bluecasts.com/pdsIncludes/pdsAjax.js ::...
|
by: Russell Warren |
last post by:
I've been having a hard time tracking down a very intermittent problem
where I get a "permission denied" error when trying to rename a file to
something that has just been deleted (on win32).
...
|
by: Charlie |
last post by:
I am trying to make an XMLHttpRequest which violates the default "same-
origin"policy in Firefox. I checked the archives and found a method
that should work but it does not. Below is the test code...
|
by: shriyer |
last post by:
Hey..
, when i try single stepping through the code, after a long time, it abruptly gives the error message .." permission denied ".. ??? what is it for?
If i run it without singlestep, it gives...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| | |