473,382 Members | 1,424 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,382 software developers and data experts.

permissions problem createing a COM object in ASP.NET after upgrade to 2

I am upgrading an existing .NET 1.1 project to 2.0. (yes the project
continues to work perfectly in 1.1). The project includes a reference to an
assembly that manages communication to several databases and COM objects.
Since we need to be able to update the COM objects, the COM interop is hand
coded and is "late bound". That is so say, the progID is interograted to
create the object and the instances of the object are invoked by
InvokeMethod. (see snippet below). The Activator.CreateInstance always
throws a COM 80070005 error (which is an access denied). The DCOM
permissions are set so that everyone and anyone (including anonymous, guest,
IUSR... etc) has local permission on the COM object. A VBScript test running
from the console will work fine, the .NET 1.1 site works fine. I have tried
putting the assembly in the GAC and playing with the trust level of the web
site, but no matter what combination I use, I get the error.
Any help or thoughts on the matter are appreciated.

-robert
// in the constuctor ask for permissions and get our type from our PROGID
constant
SecurityPermission oSP = new
SecurityPermission(SecurityPermissionFlag.Unmanage dCode);
oSP.Demand();
m_TMType = Type.GetTypeFromProgID(PROGID); // this works and returns a
correct type

// in the method call

try {
object oTMObject = Activator.CreateInstance(m_TMType); // this always
throws an error
object [] oParms = new Object[4];
oParms[0] = UserName;
oParms[1] = Password;
oParms[2] = bResult;
oParms[3] = bPWIsExpired;

ParameterModifier oByRefFlag = new ParameterModifier(4);
oByRefFlag[0]=false;
oByRefFlag[1]=false;
oByRefFlag[2]=true;
oByRefFlag[3]=true;

ParameterModifier[] oPMods= {oByRefFlag};
bReturn = (bool)
m_TMType.InvokeMember("TestUserCredentials",Bindin gFlags.InvokeMethod,null,oTMObject,oParms,oPMods,
null,null);
if (bReturn) {
bReturn = (bool) oParms[2];
PWIsExpired = (bool) oParms[3];
}
oTMObject = null;

}
catch(Exception ERR) {
System.Diagnostics.Debug.Write(ERR.Message);
}
return bReturn;


Jan 2 '06 #1
0 1258

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

Similar topics

0
by: Praveen | last post by:
Hello. I am writing some code that accepts a DFS Link and Username and grants that User permissions to the physical directory that the DFS Link corresponds to. I am using the System.Management...
9
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
1
by: MSDN Account | last post by:
We have web site that used the IIS ResKit tool MSWC.PermissionChecker to check file permissions. The web site has been upgraded and that upgrade included changing the default server side language...
4
by: Dave Kolb | last post by:
If I make ASPNET a member of the admins group it can launch my COM+ object but I do not want to do that. What permissions do I need to set for the lowly ASPNET user so that it can launch a COM+...
2
by: Yogesh Pancholi | last post by:
For some unexplained reason, I am suddenly unable to browse to a virtual directory on my laptop. I have a number of sample websites to which I could happliy browse up until last week. As of Monday,...
3
by: rick baker | last post by:
I have two projects in a solution and have recently upgraded to Net Framework 1.1. It's not clear if the problem is directly related to the upgrade or not. One of my directories returns an error...
5
by: David Thielen | last post by:
Hi; I am creating png files in my ASP .NET app. When I am running under Windows 2003/IIS 6, the file is not given the security permissions it should have. It does not have any permission for...
13
by: MLH | last post by:
Invalid qualifier error displays at compile time on this A97 example from Permissions Property HELP. What's wrong with the strContainerName assignment line? (6th line) Sub...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.