The parameter is incorrect error

  • Thread starter Thread starter radha0809
  • Start date Start date
R

radha0809

I have a VB6 COM object. The COM object is working fine when I use it
in VB.net. But when I use the same code in ASP.net 1.1 I am getting
"The parameter is incorrect" error.
I have the AspCompat="True" on my web page. Any help on this would be
appreciated.

Thanks in Advance
Anu
 
I have a VB6 COM object. The COM object is working fine when I use it
in VB.net. But when I use the same code in ASP.net 1.1 I am getting
"The parameter is incorrect" error.
I have the AspCompat="True" on my web page. Any help on this would be
appreciated.

Thanks in Advance
Anu

I think we need a little more information to solve this problem. But
parameter is incorrect implies that an API call failed.
 
I am not calling any API functions.
I have a com object which is created in VB6.
Now we are trying to migrate to ASP.net. I am trying to use the same
code. I migrated the com object to .net. Trying to use it in the
ASP.net application. It is giving parameter incorrect error. I tried
using the same code which i used in ASP.net in VB.net for testing
purpose and it works fine.

My questions is why the COM object is not working in ASP.net when it is
working fine in VB.net?


Here is the code which I am using on the web form.

Inherits System.Windows.Forms.Form
Public fobjXtrac As XTRACCOM.XTRACApplication
Public pobjWI As XTRACCOM.XTRACWorkItem

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load


Dim str As String
Dim strWI As String

fobjXtrac = New XTRACCOM.XTRACApplication

pobjWI = fobjXtrac.GetActiveWorkItem(&HDEADBEEF, False)


str = (pobjWI.WorkItemID)

Label1.Text = str
End Sub


XTRACCOM is my COM object.

I am using the same code in a button click event in the VB.net
application.
 
Back
Top