473,320 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Why "Permission denied", How to fix it?

FD
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

Nov 15 '05 #1
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

Nov 15 '05 #2
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.
Nov 15 '05 #3
FD
-----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
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
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...
1
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...
2
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...
2
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. ...
1
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...
12
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)...
1
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 ::...
4
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). ...
1
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...
0
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...
0
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
1
isladogs
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...
0
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...
1
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.