Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interop problem on webserver 1

Status
Not open for further replies.

sunaj

Technical User
Feb 13, 2001
1,474
DK
Hi everbody,

I'm using a thrid party COM dll. I've tested it in a VB.NET windows application and it works fine.
However, I need to use it in a ASP.NET application and when I do that I get either 'Interop.TimeSeries : Catastrophic failure' or 'WebApplication2 : Object reference not set to an instance of an object.' when I create the object.
I have tried setting the ASPNET, IUSR_MyPCName and IWAM_MyPCName to administrators - but it did not make any difference.

Any clues will be very welcoam, as I am stuck....
Code:
        Dim TS As TimeSeries.TSObject
        TS = New TimeSeries.TSObject 'here I get "Object reference not set to an instance of an object"
        TS.Connection.Bridge = "DIMS Timeseries Bridge"
        TS.Connection.FilePath = "Provider=SQLOLEDB.1;password=peterplys;Persist Security Info=False;user ID=dimsc;Initial Catalog=XDisp;data source=dataman"
        TS.Connection.UserName = "master"
        TS.Connection.UserPassword = "fnyt"
        TS.Connection.Specification = "shortname=GLBBEac01, STARTTIME=38596,ENDTIME=38627, QUALITY=ACTIVATED"

        TS.Connection.Open() 'here I get "Catastrophic failure"
        TS.Connection.Bridge = "dfs Timeseries Bridge"
        TS.Connection.FilePath = "c:\TSTest.dfs0"
        TS.Item(1).DataType = TimeSeries.ItemDataType.Type_Float
        TS.Item(1).Name = "Mylegend"
        TS.Connection.Save()

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
It could be a problem with the DCOM permissions for the component. Check if there is an entry for this component in Component Services and if there is, add launch and execute permissions for the ASPNET user.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
There is no entry for this component in the Component services...

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Any idea on how I can get deeper into the problem? How can I narrow down exactly what fails?
I figure it must be a permission problem because it works in a windows application. There are no entries in the event log...

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
What version of windows are you running it on?



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
MS windows XP professional Version 2002, SP 2

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
OK, I only asked as if it was windows 2003 you may have had to add permissions for the Network Service account. I can't think of any other things to check at the moment but I'll keep thinking!


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thanks for your suggestions so far ca8msm. If you think of anything let me know.

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Are there any entries in the event log for this error?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
No, no entries in the event log.
I've also tried to catch the exception and look around in all the properteis, but I don't know what to look for, and there is an inifinite number of properties in there...

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Hi again,

The COM dll has a GUI dialog embedded (which I'm not using). I read somewhere that that might be a problem, but found no solution. Does that tell you anything?

Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Phyy tough nut to crack, but I finally got it. The 3dr party COM dll does not support multithreading and by default the threading model is 'multithread'. By setting the ASPCompat attribute of the page object to 'true' the application runs as 'singlethread' and that solved my problem.
By he way, Microsoft recommenda alwaya to do this when you are using COM components in an asp.net project:
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Thanks for posting your solution sunaj. It's sometimes hard to figure out these errors (especially when it's a 3rd part component over which you have no control) but hopefully this post will help someone in the future.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top