?
Solved

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

Posted on 2007-12-05
3
Medium Priority
?
971 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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 Month12 days, 20 hours left to enroll

777 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