Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error accessing VB dll(com interop)  in asp.net application

Posted on 2007-12-05
3
Medium Priority
?
978 Views
Last Modified: 2013-11-25
I am referencing a VB6.0  DLL in an asp.net project via com interop.
When accessing the application locally on my machine (windows XP Pro) , it executes fine without any issues.

But when it was deployed on a windows 2003 server, I get the following exception:

System.UnauthorizedAccessException: Creating an instance of the COM component with CLSID {4E42032F-D910-4B4E-A627-7216892D07AC} from the IClassFactory failed due to the following error: 80070005. at _Default.btnProcess_Click(Object sender, EventArgs e)

This looks to be a  permissions issue and so I tried granting access to the ASPNET user on the com DLL to see if that resolved the issue  but that did not fix it either.
I then tried granting full permission to ASPNET user on the dll but after that I was getting the following error message&

System.Security.SecurityException at SIBS_BHIS_History.clsHistoryClass.GetLynchHistory(String& varAcct, String& varWkID, String& strXMLValue, Boolean& varDebug) at _Default.btnProcess_Click(Object sender, EventArgs e) The Zone of the assembly that failed was: MyComputer

Any help on how to resolve this problem is appreciated...
0
Comment
Question by:lavan_8
3 Comments
 
LVL 27

Expert Comment

by:Sammy Ageil
ID: 20417432
The only way I got issues like this resolved is by impersonating a user
try something like this in web.config and see if that helps

<identity impersonate = "true" userName = "Domain_Name\IWAM_SERVER" password
="***********************"/>

hope this helps
0
 
LVL 37

Accepted Solution

by:
samtran0331 earned 2000 total points
ID: 20420809
>>I then tried granting full permission to ASPNET

Just to note, an ASP.Net 2.0 application on IIS6 runs under the "NETWORK SERVICE" account; not ASPNET.
0
 
LVL 1

Author Comment

by:lavan_8
ID: 20428525
Setting execute permissions on the folder for the NETWORK SERVICE account fixed the issue. Thank you for helping me out on this.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
Suggested Courses
Course of the Month21 days, 4 hours left to enroll

810 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