Teething problems with .NET - Part 1 - Permissions

I've just converted the VB business class layer of an ASP/VB6/Sql application to .NET. The ASP pages are staying in ASP format, I am NOT moving to asp.net

Its set up to register the business class DLL as a com components and its able to create objects and retrieve data from objects back to the asp page

Permissions. First thing the VB.NET class does is open a reg key using system functions. That returns error code 1314 which means insufficient permissions
  1. I am a local and domain admin and a member of the Debugger Users group
  2. Application protection is set to high isolated
  3. Anonymous authentication is turned off, only Integrated Windows Security is turned on
  4. I made all users administrators including IWAM and IUSR - no effect

What can I do to give the debugging process the correct permissions so the app can run as usual
Who is Participating?
The way to host a dotNET component in Component Services or COM+ in Windows XP/ .NET Server 2003 is to inherit from the System.EnterpriseServices.ServicedComponent class.

Have a look at MSDN for an introduction and overiew:


Hi plq:
NOt sure if this helps, but you might use the "Microsoft .NET Framework 1.1 Wizards" which can be found under your Administrative Tools menu.
It includes certain .NET related security settings.
plqAuthor Commented:
I put in a call to GetUserName() and the value returned is my user name, which is an administrator on this box, and a member of domain admins

So why would a running administrator process not have permissions to the registry ? The process was created by IIS.

Its as if IIS limits what its own processes can do for security reasons. I never had this problem when the code was in VB6

I went through the .NET security wizard and trusted the assembly, but its still not working.

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

plqAuthor Commented:
OK I'm hoping some experts with experience of running ASP 3 (old ASP pages) against a .net backend can help me out here.

The scenario is:

- ASP pages -> COM -> VB.NET com enabled business class
- Need to sort out the permissions problem described above
- Would like a general guide to permissions
     (a) when debugging this scenario and
     (b) how to cater for COM enabled .NET classes in Component Services (for live running)
     (c) can you debug a DLL which is sitting in Component Services (should I be looking at component services at all ?)

plqAuthor Commented:
The registry problem is now fixed. I didn't realise the upgrade wizard would trash your code so much. It defined all my API constants as booleans and shorts, instead of integers. Thanks Mr Gates

I would still appreciate some expert input on using component services with .net com wrapped software though. ....
> upgrade wizard
That is a definite no-no.
The conventional wisdom is:
Keep old code in VB6.
Write new code in VB.NET
I assume something similar goes for ASP and ASP.NET

As suggested in your other question, I would suggest you place your questions in the .NET or ASP.NET areas.
I would suggest that you ask a moderator that you move this question there, but it will be aged and go unnoticed, hence a new question will be better

plqAuthor Commented:
yes but this is 100K lines of code. If I was going to rewrite it, I would do it in C++ and make it platform independant. ANyway, lets not go off topic

If anyone does find this Question...

I would appreciate some expert input on using component services with .net com wrapped software ...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.