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

InvalidCastException from ComObject to IRemoteDispatch

I had built a COM+ object in VB.Net using EnterpriseServices. The COM+
object runs fine and interacts with the ASP.Net pages fine. I do get a weird
error about once a day:
System.InvalidCastException: Unable to cast object of type
'System.__ComObject' to type 'System.EnterpriseServices.IRemoteDispatch'.
at System.EnterpriseServices.RemoteServicedComponentP roxy.Invoke(IMessage
reqMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at BethelWeb_BO.clsBO.GetUserId(String email, String localIndexPath,
String page)
at ASP.forgotpassword_aspx.btnEMailPassword_Click(Obj ect sender,
EventArgs e) in D:\Bethel Woods Live\ForgotPassword.aspx:line 19
We have 2 load balanced web servers both running Windows Server 2003. We
have the COM+ component located on another machine with Windows Server 2003
(the component is installed as a remote component on both the web servers).
We are using Visual Studio 2005 for both the ASP.Net pages (writen in VB.Net)
and the COM+ component (also VB.Net).

This isn't the only place we get the error. The error is always the same,
but the place where the error occurs changes. The error always occurs in the
first method call into the COM+ component though. I am unable to find an
exact scenario to be able to reproduce the problem (I was able to reproduce
it once, but it must have been a fluke because I can't do it again).

Here is the partial method that the above error is coming from (the last
line is line 19 where the error occurs.
Protected Sub btnEMailPassword_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim bo As clsBO = Nothing
Dim userID As Integer = 0

Try
bo = New clsBO

If Page.IsValid Then
userID = bo.GetUserId(txtEMail.Text,
Server.MapPath("index.html"), Request.Path)
...
Any help would be appreciated.
Thanks,
Devin
Nov 27 '06 #1
0 1046

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

Similar topics

2
by: Mauro Baraldi | last post by:
Hello! Someone can helpe-me how to get the name of a COMObject by it CLSID. Example: A object got a number CLSID ({CA8A9783-280D-11CF-A24D-444553540000}). It name is Acrobat Control for...
0
by: Johan Appelgren | last post by:
Hi, I'm trying to serialize a class hierarchy using System.Xml.Serialization.XmlSerializer from a class that is loaded as a Com object. But it fails with a InvalidCastException. I don't know...
1
by: bob scola | last post by:
I have a csharp, VS 2003 solution for a winform application The application uses an object called a "matter" and the class is defined in matter.cs. I can load matter objects into a combobox ...
11
by: Roy Lawson | last post by:
I have no idea what is going on here. I wrote a simple application in VB.NET to generate a Crystal Report, and I am now trying to move it to ASP.NET with Crstal Enterprise. I wish I could tell...
4
by: DOTNET | last post by:
Hi, Anybody help me regarding this error: I am assigning the values to the session variables when the button is clicked and passing these session variables to the next page and when I am...
0
by: QA | last post by:
I am using a Business Scorecard Accelarator in a Sharepoint Portal 2003 using SQL Server 2005 I am getting the following error: Error,5/7/2005 10:50:14 AM,580,AUE1\Administrator,"Specified cast is...
8
by: Gamma | last post by:
I'm trying to inherit subclass from System.Diagnostics.Process, but whenever I cast a "Process" object to it's subclass, I encounter an exception "System.InvalidCastException" ("Specified cast is...
4
by: rsdev | last post by:
Hi, I have an InvalidCastException which is completely puzzling me. I have checked all the members in the stored procedure against my data provider and seems to be ok. Also in the stack trace it...
8
by: Joe HM | last post by:
Hello - I was wondering that the "cleanest" way is to determine whether a CType() will throw an InvalidCastException? I have data I receive as an Object and I want to convert it to a String...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.