com objects (in C++) not working with .net?

I have the following code in a .asp file

Dim obj1
obj1 = CreateObject("MYOBJ")
The same code in a page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim obj1
obj1 = CreateObject("MYOBJ")
End Sub
returns the error:
"Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request"
"aspnet_wp.exe (PID=3768) stopped unexpectedly"
and this is a very bad error ,only in .NET, which does not provide any clue. The event log shows: . I've tried everything, including changes threads in .NET setup files, reinstalled the framework. Nobody seems to have a clue.
Any help will be appreciated. I could provide the dll containing the COM object, if someone
is interested, but if you have one in C++, you can test with that. It is happening for every COM.
Any help will be appreciated.

3/1/2005 1:18:36 AM 91979 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 11

This is not the right way to interoperate with COM objects in .NET. CreateObject is really only here for backwards compatibility with ASP classic.

Read this for the right way to do COM interop in .NET:
This posting is provided "AS IS" with no warranties, and confers no rights.
3/1/2005 2:17:04 AM

Similar Artilces:

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Call to non .net COM not working after .NET
I have developed small samples of ASP.NET and one of them I tried to call a standard COM (non .NET). I took the code out for now, but a call to that COM from traditional ASP application now does not work. Does anyone have an idea how to correct this?...

Type.GetType does not work in VB.NET but works in C#. VB.NET gurus Please help
Friends,   I am an experienced C# programmer who is working on a VB.NET project now. I am writing different methods covering the following functionalities 1) Take a datareader as input and return an arraylist of class object2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object. The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially. The schema of class object matches with the input (datareader or xmlnode)In C# I used to do th...

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

converting to from offered me some sample code when I signed up with them the only problem is the sample code is in but my page that they type all of their credit card into is <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage(""); } private String readHtmlPage(string url) { ...

get Subreport object in
i have a collection of reports and i want to distinguish the subreport from that collection and want to display that subreport.. Hi, You can't show the subreport alone, to display the subreport, a parent report must be exited and only in this way does it make sense, and it belongs to the parent report file. Thanks.Michael Jin.Microsoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help....

COM works in, not C#??
I am converting a site from asp to  This site uses a COM object and I would like to use C#.  I've included aspcompat=true in my page directive. In, it works great.......Dim oLDS as ObjectoLDS = Server.CreateObject("ldswebapi.Lookup")oLDs.Initialize("C:\LDSDATA")In C#, not so great........Object oLDS = new Object();    // or Object oLDS;oLDS = Server.CreateObject("ldswebapi.Lookup");oLDs.Initialize("C:\LDSDATA");I get error "object does not contain a definition Initialize" I don't get it.  Can I not use C# for this?  jepatte Yeah yo...

Developed WebService 1.1 for Client 1.1. Getting error "Server was unable to process the Request" Pls Help
Hi., I developed Microsoft Web Services2003 for the Client Application 2003. When it runs in 5 machines it gives good performance and has no errors. But if i run the same application in about 80 client machines. Getting error "Server was unable to process the request". I use Sql Server 2005 as my database. I get error even when i login at a time for about 25 users. Tried modifying machine.config too. But went unsuccessful. Live Server is 2003 using IIS 6.0 I use very expensive data handling.  Its very urgent pls help. Have to post in Live Server. Thank u., ... vs vs
just out of curiousity which looks, acts most like java? i'm still learning trying to used to but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

used a to converter and am now getting a syntax error.
ok I used a cool utility at to convert some to and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

COM .NET Interop
Hi, I need help here.. I have this problem.I have COM VB6 that call a .NET class library, and this class library use the .NET SAP Conector to extract the information from SAP. I receive the information from SAP in a DataTable, the problem here is that I dont how to return this DataTable to VB6 COM. I made a test, and I can return a String to COM and basic types, but I dont know how to do it with this DataTable.Thanks for your helpI really appreciate. One alternative might be to add the DataTable to a DataSet and then convert the DataSet to an XML string using WriteXml(). That said, quic...

.NET to COM question ( Dictionary in COM and .NET dictionary)
 I need to write a data access code to replace the method of GetPerson() in COM data access, since the existing method is too slow. .NET can reduce the database round trips by using the dataset. The existing COM data access will stay except the GetPerson() method. So I am going to call the .NET getPerson() mehtod from the COM,  The original GetPerson() method in COM just go to data base, pull data from 7 tables and write to dictionary.  If the .NET getPerson() can populate the COM Dictionary, that would be great! I know .NET object can be directly assign t...

what lang does everyone prefer? Thanks, Peter Iuvara, MCP It's a very famous debatable question in forums! I would say if you are from Java/C/C++, then C# would be easy to use for you. If you are from ASP/VB, then VB.NET would be easy for you! As long as if you follow CLS, then what ever the language you use, it's going to be the same for CLR!Sreedharhttp://www.w3coder.orgweblog I would agree with that ... just curious as to what user's on this forum predominantly code in?Thanks, Peter Iuvara, MCP I came from no real programming background, started i...

Web resources about - com objects (in C++) not working with .net? -

Smart Personal Objects Technology - Wikipedia, the free encyclopedia
Smart Personal Object Technology (SPOT) was developed by Microsoft to personalize household electronics and other everyday devices, through "smart" ...

Review: Encounters: Revealing stories of Aboriginal and Torres Strait Islander objects from the British ...
This show will have a strong impact on viewers who pause to hear the voices of the assembled objects.

The Safety of Objects
The Safety of Objects Artforum WITH BLOCKBUSTER BIENNIALS increasingly wedded to the galleries underwriting them, the term “biennial art”—the ...

Boston Police detonate suspicious object; looking for man who left it behind
Boston Police's bomb squad detonated a suspicious object on Atlantic Avenue after shutting down access to vehicles and pedestrians in the area, ...

UK trio GoGo Penguin releasing 'Man Made Object' on Blue Note, making NYC debut at Winter Jazzfest
by Andrew Sacher It's probably not a coincidence that UK jazz trio GoGo Penguin's promo photo (above) looks an awful lot like the cover of James ...

Divers pull objects from lake in San Bernardino investigation - Videos - CBS News
In a murky lake, divers looking for clues pulled what looked like a CD or DVD out of the water. The lake is less than three miles from the Inland ...

Chicken Of The Sea, Bumble Bee Abandon Plan To Unite As One Giant Can Of Tuna After DOJ Objects
Chicken of the Sea and Bumble Bee will be leaving their underwater wedding separately despite going steady since 2014 : the two tuna companies ...

Turkish Fans Throw Objects At Israeli Basketball Team During Anthem
'This was a complex experience with a hostile arena,' Eden Inbar, coach of the Isareli national told Sport 5.

Pluto Probe Spies Object Lurking in the Kuiper Belt
Although Pluto is a distant memory to NASA's New Horizons mission, which flew past the dwarf planet in July, it doesn't mean its voyage of discovery ...

This is your closest look yet at a Kuiper Belt object
... you see in the picture above may not seem like much at first glance, but it's a pretty big deal it's humanity's closest-ever look at an object ...

Resources last updated: 12/14/2015 5:27:36 PM