Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-12-05
3
Medium Priority
?
975 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

636 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