473,324 Members | 2,548 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,324 software developers and data experts.

COM object with CLSID is either not valid or not registered

I have a asp.net web application executing on a windows 2003 Server. I make a
reference in the project to a COM object and the Interop gets created
successfully. When the application executes I create a instance of the COM
object as such (c#):
XMLAPI.GMDataClass gdc;
gdc = new XMLAPI.GMDataClass();
I then receive the above mentioned error message. The strange thing is when
I do the same thing in a Windows Forms.net application it works fine!!
Can anyone help me here please?
Any suggestions are highly appreciated.

Nov 19 '05 #1
3 19454
To use COM, an app must have permission to read the System Registry.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Joel" <Jo**@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
I have a asp.net web application executing on a windows 2003 Server. I make
a
reference in the project to a COM object and the Interop gets created
successfully. When the application executes I create a instance of the COM
object as such (c#):
XMLAPI.GMDataClass gdc;
gdc = new XMLAPI.GMDataClass();
I then receive the above mentioned error message. The strange thing is
when
I do the same thing in a Windows Forms.net application it works fine!!
Can anyone help me here please?
Any suggestions are highly appreciated.

Nov 19 '05 #2
Kevin,

When I debug/execute the application I am logged on as Administrator of the
machine and if the app requires access to the registry does that mean I need
to give one of the asp.net user accounts on the system access rights to the
registry and if so how do I do that?

Thanks,
Joel

"Kevin Spencer" wrote:
To use COM, an app must have permission to read the System Registry.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Joel" <Jo**@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
I have a asp.net web application executing on a windows 2003 Server. I make
a
reference in the project to a COM object and the Interop gets created
successfully. When the application executes I create a instance of the COM
object as such (c#):
XMLAPI.GMDataClass gdc;
gdc = new XMLAPI.GMDataClass();
I then receive the above mentioned error message. The strange thing is
when
I do the same thing in a Windows Forms.net application it works fine!!
Can anyone help me here please?
Any suggestions are highly appreciated.


Nov 19 '05 #3
Well I finally found a solution to the problem. I will share my findings as
many times you look for people who had similar issues than yourself and they
never share their solution after they solved it.

The issue here is that I can access a component through my winforms app but
not through my asp.net app. The program that installed the component did not
register the component in the DCOM or COM+ sections of my Windows 2003 Server
but only registered its own main executable in the DCOM section. When I then
went and made a reference to the main executable in my asp.net app instead of
the dll I wanted it worked fine. So the conclusion here is to not forget to
go look at what is actually available in the COM+ and DCOM sections of the
machine which you are hosting/developing on.

Hope this helps someone in future.

Until we meet again.

Joel
"Joel" wrote:
Kevin,

When I debug/execute the application I am logged on as Administrator of the
machine and if the app requires access to the registry does that mean I need
to give one of the asp.net user accounts on the system access rights to the
registry and if so how do I do that?

Thanks,
Joel

"Kevin Spencer" wrote:
To use COM, an app must have permission to read the System Registry.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Joel" <Jo**@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com...
I have a asp.net web application executing on a windows 2003 Server. I make
a
reference in the project to a COM object and the Interop gets created
successfully. When the application executes I create a instance of the COM
object as such (c#):
XMLAPI.GMDataClass gdc;
gdc = new XMLAPI.GMDataClass();
I then receive the above mentioned error message. The strange thing is
when
I do the same thing in a Windows Forms.net application it works fine!!
Can anyone help me here please?
Any suggestions are highly appreciated.


Nov 19 '05 #4

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

Similar topics

2
by: Lady_A | last post by:
I have created a basic COM in-proc server and a client. The registration of my server succeeds according to regsvr32. I can see it in the registry, having the ProgID and the InProcServer32...
2
by: anand | last post by:
Hi, We have developed a web application, which uses Interop.Word.dll to read from word documents and write to word documents. Problem is that our client is persisting that we develop the...
0
by: VB Programmer | last post by:
I tried to make a VB.NET version of this: http://neevia.com/ex036csharp.htm I keep getting this error: Server Error in '/ProposalGenerator' Application....
4
by: c.verma | last post by:
I am stuck on one silly thing.It is just about calling unmanaged code in the C# win/web application. This is what I did: 1) Created a VB dll xyz.dll. 2) Since this is unmanaged dll, I used...
1
by: Daryl Zavier | last post by:
Hi Guys, Paradon my ignorance on this issue. I've done up a simple VB.net windows application which when executed from a client PC, is suppose to execute a DTS job on my server. When I...
2
by: Juan Dent | last post by:
Hi, I have a client application in unmanaged C++ that currenly interacts with a COM object. Yet, I need this object to be returned by a Web Service and I was wondering whether: 1) the COM...
11
Frinavale
by: Frinavale | last post by:
Hi guys, I've created a VB.Net project and have compiled it, run it, tested it on a machine that has a 32bit processor. I am now trying to move this project onto a 64bit processor server that is...
3
by: abhimanyu | last post by:
I have a method Marshal.IsComObject(...) that returns TRUE if an object is a COM object. I have an object of Excel.Worksheet that I released using Marshal.ReleaseComObject(...). I want to iterate...
1
by: mthorpe | last post by:
I am pretty new to all of this and am working on a macro to transfer some data. I am using "Select Case" and when it reaches .Paramater.Append prm(i) is throws the "Invalid Object error". I don't...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.