473,409 Members | 1,943 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,409 software developers and data experts.

VS 2005 Com Interop Exception in Web Service

Hi,

I have a service, that runs perfectly when executed outside of the web
service environment. When called as a web service I get the exception
listed below sporadically. A call to the web method may succeed one time and
not another. I cannot find any reason why it would work one time and not
another. The exception occurs every two or three calls to the web method.

The service utilizes a COM component provided by PeopleSoft called a
Component Interface. That COM object then makes calls into a Java library.
Layers to the max I know but it is all I can work with right now till we
upgrade PSoft to a more recent version that has ws-i compliant web services.

To attempt to resolve the issue, I tried opening and closing the connection
to PeopleSoft with each invocation of the web method but that did not resolve
the issue or change the behavior of the problem in any way. I also tried
using ReleaseCOMObject but no luck there either. Nothing in the dispose call
has changed the behavior of the problem.

Since I am working with a third party COM object, I do not know much about
the internals of the COM object such as the threading model.

Beyond this specific problem, any general comments regarding my code/usage
are welcomed.

Thank you in advance for your help.
Rich
The exception is:

System.Web.Services.Protocols.SoapException was unhandled
Actor=""
Lang=""
Message="System.Web.Services.Protocols.SoapExcepti on: Server was unable to
process request. ---> System.Runtime.InteropServices.COMException
(0x80010105): The server threw an exception. (Exception from HRESULT:
0x80010105 (RPC_E_SERVERFAULT))
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at PeopleSoft_PeopleSoft.CUSTOMER.set_GetHistoryItems (Boolean )
at com.hsb.peoplesoftservices.CustomerDAO..ctor(Sessi on
oComponentInterfaceSession) in C:\Documents and Settings\rcollet\My
Documents\Visual Studio
2005\Projects\PeopleSoftComponentInterface\PeopleS oftComponentInterface\CustomerDAO.vb:line 23
at
com.hsb.peoplesoftservices.CustomerService.CreateO rUpdateCustomers(SessionContext
context, CustomerDTO[] customers) in C:\Documents and Settings\rcollet\My
Documents\Visual Studio
2005\Projects\PeopleSoftComponentInterface\PeopleS oftComponentInterface\CustomerService.vb:line 48
--- End of inner exception stack trace ---"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
com.hsb.PeopleSoftCustomerWebserviceTest.PeopleSof tCustomerService.PeopleSoftCustomerService.CreateO rUpdateCustomers(SessionContext
SessionContext, CustomerDTO[] Customers) in C:\Documents and
Settings\rcollet\My Documents\Visual Studio
2005\Projects\PeopleSoftService\PeopleSoftCustomer WebserviceTest\Web
References\PeopleSoftCustomerService\Reference.vb: line 82
at com.hsb.PeopleSoftCustomerWebserviceTest.Module1.M ain() in
C:\Documents and Settings\rcollet\My Documents\Visual Studio
2005\Projects\PeopleSoftService\PeopleSoftCustomer WebserviceTest\Module1.vb:line 79
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

-------------------------------------------------------------
The code calling the web service is below. The Web Service can be easily
replaced with the native service by swapping the imports statements and
changing the type in the "using service as ....." statement. The web
service and the native service share the same service interface which is also
included below.

Imports com.hsb.PeopleSoftCustomerWebserviceTest.PeopleSof tCustomerService
'Imports com.hsb.peoplesoftservices
Imports System.Collections.Generic

Module Module1
Sub Main()
Dim customers As New List(Of CustomerDTO)
Dim addresses As New List(Of CustomerAddressDTO)
Dim customer As New CustomerDTO
Dim address As New CustomerAddressDTO
Dim context As New SessionContext
Dim szCustomerNumber As String = ""
With context
.UserName = "username"
.Password = "password"
.Server = "//APPSRVD:9070"
.ThrowExceptions = True
End With
With address
.Address1 = "Ad 1"
.Address2 = "Ad 2"
.Address3 = "Ad 3"
.Address4 = "Ad 4"
.AlternateName = "Alt Name"
.City = "Waterbury"
.State = "CT"
.PostalCode = "06708"
.CountryCode3 = "USA"
.Description = "Description"
.IsTypeBilling = True
.IsTypeLegal = True
.IsTypeShipTo = True
.IsTypeSoldTo = True
.IsTypeCorrespondence = True
.IsTypePrimaryBilling = True
.IsTypePrimaryLegal = True
.IsTypePrimaryShipTo = True
.IsTypePrimarySoldTo = True
.IsModified = False
End With
addresses.Add(address)
Dim address2 As CustomerAddressDTO = CType(address.Clone(),
CustomerAddressDTO)
address2.Address1 = "second address"
With address2
.IsTypePrimaryBilling = False
.IsTypePrimaryLegal = False
.IsTypePrimaryShipTo = False
.IsTypePrimarySoldTo = False
.IsModified = False
End With
addresses.Add(address2)
With customer
.Name = "RC Test " + System.DateTime.Now.ToString
.SetID = "SHARE"
.Addresses = addresses.ToArray
'Web Service Proxy Data Contracts do not expose public
constants. The actual value must be used.
'.TypeCode = CustomerDTO.TYPECODE_FRONTEND
.TypeCode = "5"
.IsModified = False
End With
customers.Add(customer)
Dim customer2 As CustomerDTO
customer2 = CType(customer.Clone(), CustomerDTO)
customer2.Name = "RC Test2 " + System.DateTime.Now.ToString
With customer2.Addresses(0)
.SequenceNumber = 0
.IsModified = False
End With
With customer2.Addresses(1)
.SequenceNumber = 0
.IsModified = False
End With
customer2.IsModified = False
customers.Add(customer2)
'The service is disposable due to usage of COM Interop so use a
using block so that resources
'are properly disposed of (disconnected in this case).
Using service As PeopleSoftCustomerService.PeopleSoftCustomerServic e
= My.WebServices.PeopleSoftCustomerService
Dim match As New System.Predicate(Of CustomerDTO)(AddressOf
hasError)
Dim updatedCustomers() As CustomerDTO =
service.CreateOrUpdateCustomers(context, customers.ToArray)
If (updatedCustomers.Length > 0) Then
If (Array.FindAll(Of CustomerDTO)(updatedCustomers,
match).Length > 0) Then Stop
szCustomerNumber = updatedCustomers(0).Number
With updatedCustomers(0)
.Name = "Changed Name"
.IsModified = False
.Addresses(0).Address1 = "ad1b"
.Addresses(0).IsModified = False
.Addresses(1).Address1 = "ad1b"
.Addresses(1).IsModified = False
End With
End If
updatedCustomers = service.CreateOrUpdateCustomers(context,
updatedCustomers)
If (Array.FindAll(Of CustomerDTO)(updatedCustomers,
match).Length > 0) Then Stop
address = CType(address.Clone, CustomerAddressDTO)
With address
.SequenceNumber = 0
.Address1 = "third address "
.IsModified = False
End With
addresses = New List(Of CustomerAddressDTO)
addresses.Add(address)
customer = New CustomerDTO()
With customer
.Number = szCustomerNumber
.SetID = "SHARE"
.IsModified = False
.IsDirty = False
.Addresses = addresses.ToArray
End With
customers = New List(Of CustomerDTO)
customers.Add(customer)
updatedCustomers = service.CreateOrUpdateCustomers(context,
customers.ToArray)
End Using
End Sub

Private Function hasError(ByVal value As CustomerDTO) As Boolean
If Not value.DTOException Is Nothing Then
hasError = True
End If
End Function
End Module
-------------------------------------------------------
Service Interface

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.WsiProfiles
Imports System.Xml.Serialization

<WebServiceBinding(name:="CustomerService",
namespace:="http://hsb.com/peoplesoft", ConformsTo:=BasicProfile1_1)> _
Public Interface ICustomerService
<WebMethod(Description:="Creates or updates customers and their
addresses in PeopleSoft. New Customers and Addresses are returned so that
their key values (CustomerID or Sequence Number) can be retrieved. The
instance guid of the DTO's can be used to create an identifier for matching
up returned customers/addresses with the new customers or addresses that were
submitted.")> _
Function CreateOrUpdateCustomers(ByVal SessionContext As SessionContext,
ByVal Customers() As CustomerDTO) As CustomerDTO()
Function CreateOrUpdateCustomers(ByVal SessionContext As
ISessionContext, ByVal Customers() As ICustomerDTO) As ICustomerDTO()
Function CreateOrUpdateCustomers(ByVal SessionContext As
ISessionContext, ByVal Customer As ICustomerDTO) As ICustomerDTO
End Interface

---------------------------------------------------------------
Service Implementation. In this particular version, I have attempted to
resolve the issue by connecting and disconnecting (through self calling of
dispose) during each invocation of the web method.

Imports System.Web.Services
Imports System.Runtime.InteropServices

<WebService(name:="PeopleSoftCustomerService",
namespace:="http://hsb.com/PeopleSoftCustomerService", Description:="Creates
or updates PeopleSoft Customers and their Addresses")> _
Public Class CustomerService
Implements ICustomerService
Implements IDisposable
Private m_oCISession As PeopleSoft_PeopleSoft.Session
Private m_isConnected As Boolean

Public Sub New()

End Sub

Public Sub dispose() Implements IDisposable.Dispose
If (m_isConnected And Not m_oCISession Is Nothing) Then
Try
m_oCISession.Disconnect()
Catch ex As Exception
'TODO: log this exception but otherwise there is nothing
that can be done with it at this point.
Finally
m_isConnected = False
'explicitly release the underlying COM object to improve
performance
Marshal.ReleaseComObject(m_oCISession)
m_oCISession = Nothing
'Don't call finalize on this object to improve performance.
GC.SuppressFinalize(Me)
End Try
End If
End Sub

Public Function CreateOrUpdateCustomers(ByVal context As
ISessionContext, ByVal customer As ICustomerDTO) As ICustomerDTO Implements
ICustomerService.CreateOrUpdateCustomers
Call Me.CreateSession(context)
Dim oPSoftCustomerDAO As New CustomerDAO(Me.GetSession)
Return oPSoftCustomerDAO.CreateOrUpdateCustomer(customer,
context.ThrowExceptions)
End Function

Public Function CreateOrUpdateCustomers(ByVal context As
ISessionContext, ByVal customers() As ICustomerDTO) As ICustomerDTO()
Implements ICustomerService.CreateOrUpdateCustomers
Call Me.CreateSession(context)
Dim oPSoftCustomerDAO As New CustomerDAO(Me.GetSession)
Return oPSoftCustomerDAO.CreateOrUpdateCustomers(Customer s,
context.ThrowExceptions)
End Function

Public Function CreateOrUpdateCustomers(ByVal context As SessionContext,
ByVal customers() As CustomerDTO) As CustomerDTO() Implements
ICustomerService.CreateOrUpdateCustomers
Call Me.CreateSession(context)
Dim oPSOftCustomerDAO As New CustomerDAO(Me.GetSession)
Dim customersReturned() As ICustomerDTO =
oPSOftCustomerDAO.CreateOrUpdateCustomers(CType(cu stomers, ICustomerDTO()),
context.ThrowExceptions)
Me.dispose()
Dim customersToReturn() As CustomerDTO
customersToReturn =
System.Array.CreateInstance(GetType(CustomerDTO), customersReturned.Length)
customersReturned.CopyTo(customersToReturn, 0)
Return customersToReturn
End Function

Private Sub CreateSession(ByVal context As ISessionContext)
If (m_oCISession Is Nothing) Then
m_oCISession = New PeopleSoft_PeopleSoft.Session
If Not (m_oCISession.Connect(1, context.Server,
context.UserName, context.Password, 0)) Then
Throw New PeopleSoftServiceException("Could not connect to
server " + context.Server + " with username " + context.UserName)
End If
m_isConnected = True
End If
End Sub

Private Function GetSession() As PeopleSoft_PeopleSoft.Session
Return m_oCISession
End Function
End Class

Jun 28 '06 #1
2 4919
Dear Customer,

Based on my understanding, the COM object works in other environment than
the web service environment.

As you said, since this is a third party COM object, we can not make sure
what is the requirement by the COM object. To troubleshoot the issue, we
need the code of COM to see what may occur inside the object when the
exception occur.
I suggest you contact the COM Object development directly for detailed
information.

So far based on my knowledge, you may have a try to put the COM Object into
COM+ which may help to resolve the problem.
Or you may try to make a simple test reproduce COM object, e.g. a simple
com object which will return just a string and call it many times from you
web service to see if the problem occur, so that we will know if there is
any problem with the Web Service.

Thanks for your understanding!
Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 29 '06 #2
Hi,

I have a service, that runs perfectly when executed outside of the web
service environment. When called as a web service I get the exception
listed below sporadically. A call to the web method may succeed one time and
not another. I cannot find any reason why it would work one time and not
another. The exception occurs every two or three calls to the web method.

The service utilizes a COM component provided by PeopleSoft called a
Component Interface. That COM object then makes calls into a Java library.
Layers to the max I know but it is all I can work with right now till we
upgrade PSoft to a more recent version that has ws-i compliant web services.

To attempt to resolve the issue, I tried opening and closing the connection
to PeopleSoft with each invocation of the web method but that did not resolve
the issue or change the behavior of the problem in any way. I also tried
using ReleaseCOMObject but no luck there either. Nothing in the dispose call
has changed the behavior of the problem.

Since I am working with a third party COM object, I do not know much about
the internals of the COM object such as the threading model.

Beyond this specific problem, any general comments regarding my code/usage
are welcomed.

Thank you in advance for your help.
Rich
The exception is:

System.Web.Services.Protocols.SoapException was unhandled
Actor=""
Lang=""
Message="System.Web.Services.Protocols.SoapExcepti on: Server was unable to
process request. ---System.Runtime.InteropServices.COMException
(0x80010105): The server threw an exception. (Exception from HRESULT:
0x80010105 (RPC_E_SERVERFAULT))
at System.RuntimeType.ForwardCallToInvokeMember(Strin g memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData)
at PeopleSoft_PeopleSoft.CUSTOMER.set_GetHistoryItems (Boolean )
at com.hsb.peoplesoftservices.CustomerDAO..ctor(Sessi on
oComponentInterfaceSession) in C:\Documents and Settings\rcollet\My
Documents\Visual Studio
2005\Projects\PeopleSoftComponentInterface\PeopleS oftComponentInterface\CustomerDAO.vb:line 23
at
com.hsb.peoplesoftservices.CustomerService.CreateO rUpdateCustomers(SessionContext
context, CustomerDTO[] customers) in C:\Documents and Settings\rcollet\My
Documents\Visual Studio
2005\Projects\PeopleSoftComponentInterface\PeopleS oftComponentInterface\CustomerService.vb:line 48
--- End of inner exception stack trace ---"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at
com.hsb.PeopleSoftCustomerWebserviceTest.PeopleSof tCustomerService.PeopleSoftCustomerService.CreateO rUpdateCustomers(SessionContext
SessionContext, CustomerDTO[] Customers) in C:\Documents and
Settings\rcollet\My Documents\Visual Studio
2005\Projects\PeopleSoftService\PeopleSoftCustomer WebserviceTest\Web
References\PeopleSoftCustomerService\Reference.vb: line 82
at com.hsb.PeopleSoftCustomerWebserviceTest.Module1.M ain() in
C:\Documents and Settings\rcollet\My Documents\Visual Studio
2005\Projects\PeopleSoftService\PeopleSoftCustomer WebserviceTest\Module1.vb:line 79
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

-------------------------------------------------------------
The code calling the web service is below. The Web Service can be easily
replaced with the native service by swapping the imports statements and
changing the type in the "using service as ....." statement. The web
service and the native service share the same service interface which is also
included below.

Imports com.hsb.PeopleSoftCustomerWebserviceTest.PeopleSof tCustomerService
'Imports com.hsb.peoplesoftservices
Imports System.Collections.Generic

Module Module1
Sub Main()
Dim customers As New List(Of CustomerDTO)
Dim addresses As New List(Of CustomerAddressDTO)
Dim customer As New CustomerDTO
Dim address As New CustomerAddressDTO
Dim context As New SessionContext
Dim szCustomerNumber As String = ""
With context
.UserName = "username"
.Password = "password"
.Server = "//APPSRVD:9070"
.ThrowExceptions = True
End With
With address
.Address1 = "Ad 1"
.Address2 = "Ad 2"
.Address3 = "Ad 3"
.Address4 = "Ad 4"
.AlternateName = "Alt Name"
.City = "Waterbury"
.State = "CT"
.PostalCode = "06708"
.CountryCode3 = "USA"
.Description = "Description"
.IsTypeBilling = True
.IsTypeLegal = True
.IsTypeShipTo = True
.IsTypeSoldTo = True
.IsTypeCorrespondence = True
.IsTypePrimaryBilling = True
.IsTypePrimaryLegal = True
.IsTypePrimaryShipTo = True
.IsTypePrimarySoldTo = True
.IsModified = False
End With
addresses.Add(address)
Dim address2 As CustomerAddressDTO = CType(address.Clone(),
CustomerAddressDTO)
address2.Address1 = "second address"
With address2
.IsTypePrimaryBilling = False
.IsTypePrimaryLegal = False
.IsTypePrimaryShipTo = False
.IsTypePrimarySoldTo = False
.IsModified = False
End With
addresses.Add(address2)
With customer
.Name = "RC Test " + System.DateTime.Now.ToString
.SetID = "SHARE"
.Addresses = addresses.ToArray
'Web Service Proxy Data Contracts do not expose public
constants. The actual value must be used.
'.TypeCode = CustomerDTO.TYPECODE_FRONTEND
.TypeCode = "5"
.IsModified = False
End With
customers.Add(customer)
Dim customer2 As CustomerDTO
customer2 = CType(customer.Clone(), CustomerDTO)
customer2.Name = "RC Test2 " + System.DateTime.Now.ToString
With customer2.Addresses(0)
.SequenceNumber = 0
.IsModified = False
End With
With customer2.Addresses(1)
.SequenceNumber = 0
.IsModified = False
End With
customer2.IsModified = False
customers.Add(customer2)
'The service is disposable due to usage of COM Interop so use a
using block so that resources
'are properly disposed of (disconnected in this case).
Using service As PeopleSoftCustomerService.PeopleSoftCustomerServic e
= My.WebServices.PeopleSoftCustomerService
Dim match As New System.Predicate(Of CustomerDTO)(AddressOf
hasError)
Dim updatedCustomers() As CustomerDTO =
service.CreateOrUpdateCustomers(context, customers.ToArray)
If (updatedCustomers.Length 0) Then
If (Array.FindAll(Of CustomerDTO)(updatedCustomers,
match).Length 0) Then Stop
szCustomerNumber = updatedCustomers(0).Number
With updatedCustomers(0)
.Name = "Changed Name"
.IsModified = False
.Addresses(0).Address1 = "ad1b"
.Addresses(0).IsModified = False
.Addresses(1).Address1 = "ad1b"
.Addresses(1).IsModified = False
End With
End If
updatedCustomers = service.CreateOrUpdateCustomers(context,
updatedCustomers)
If (Array.FindAll(Of CustomerDTO)(updatedCustomers,
match).Length 0) Then Stop
address = CType(address.Clone, CustomerAddressDTO)
With address
.SequenceNumber = 0
.Address1 = "third address "
.IsModified = False
End With
addresses = New List(Of CustomerAddressDTO)
addresses.Add(address)
customer = New CustomerDTO()
With customer
.Number = szCustomerNumber
.SetID = "SHARE"
.IsModified = False
.IsDirty = False
.Addresses = addresses.ToArray
End With
customers = New List(Of CustomerDTO)
customers.Add(customer)
updatedCustomers = service.CreateOrUpdateCustomers(context,
customers.ToArray)
End Using
End Sub

Private Function hasError(ByVal value As CustomerDTO) As Boolean
If Not value.DTOException Is Nothing Then
hasError = True
End If
End Function
End Module
-------------------------------------------------------
Service Interface

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.WsiProfiles
Imports System.Xml.Serialization

<WebServiceBinding(name:="CustomerService",
namespace:="http://hsb.com/peoplesoft", ConformsTo:=BasicProfile1_1)_
Public Interface ICustomerService
<WebMethod(Description:="Creates or updates customers and their
addresses in PeopleSoft. New Customers and Addresses are returned so that
their key values (CustomerID or Sequence Number) can be retrieved. The
instance guid of the DTO's can be used to create an identifier for matching
up returned customers/addresses with the new customers or addresses that were
submitted.")_
Function CreateOrUpdateCustomers(ByVal SessionContext As SessionContext,
ByVal Customers() As CustomerDTO) As CustomerDTO()
Function CreateOrUpdateCustomers(ByVal SessionContext As
ISessionContext, ByVal Customers() As ICustomerDTO) As ICustomerDTO()
Function CreateOrUpdateCustomers(ByVal SessionContext As
ISessionContext, ByVal Customer As ICustomerDTO) As ICustomerDTO
End Interface

---------------------------------------------------------------
Service Implementation. In this particular version, I have attempted to
resolve the issue by connecting and disconnecting (through self calling of
dispose) during each invocation of the web method.

Imports System.Web.Services
Imports System.Runtime.InteropServices

<WebService(name:="PeopleSoftCustomerService",
namespace:="http://hsb.com/PeopleSoftCustomerService", Description:="Creates
or updates PeopleSoft Customers and their Addresses")_
Public Class CustomerService
Implements ICustomerService
Implements IDisposable
Private m_oCISession As PeopleSoft_PeopleSoft.Session
Private m_isConnected As Boolean

Public Sub New()

End Sub

Public Sub dispose() Implements IDisposable.Dispose
If (m_isConnected And Not m_oCISession Is Nothing) Then
Try
m_oCISession.Disconnect()
Catch ex As Exception
'TODO: log this exception but otherwise there is nothing
that can be done with it at this point.
Finally
m_isConnected = False
'explicitly release the underlying COM object to improve
performance
Marshal.ReleaseComObject(m_oCISession)
m_oCISession = Nothing
'Don't call finalize on this object to improve performance.
GC.SuppressFinalize(Me)
End Try
End If
End Sub

Public Function CreateOrUpdateCustomers(ByVal context As
ISessionContext, ByVal customer As ICustomerDTO) As ICustomerDTO Implements
ICustomerService.CreateOrUpdateCustomers
Call Me.CreateSession(context)
Dim oPSoftCustomerDAO As New CustomerDAO(Me.GetSession)
Return oPSoftCustomerDAO.CreateOrUpdateCustomer(customer,
context.ThrowExceptions)
End Function

Public Function CreateOrUpdateCustomers(ByVal context As
ISessionContext, ByVal customers() As ICustomerDTO) As ICustomerDTO()
Implements ICustomerService.CreateOrUpdateCustomers
Call Me.CreateSession(context)
Dim oPSoftCustomerDAO As New CustomerDAO(Me.GetSession)
Return oPSoftCustomerDAO.CreateOrUpdateCustomers(Customer s,
context.ThrowExceptions)
End Function

Public Function CreateOrUpdateCustomers(ByVal context As SessionContext,
ByVal customers() As CustomerDTO) As CustomerDTO() Implements
ICustomerService.CreateOrUpdateCustomers
Call Me.CreateSession(context)
Dim oPSOftCustomerDAO As New CustomerDAO(Me.GetSession)
Dim customersReturned() As ICustomerDTO =
oPSOftCustomerDAO.CreateOrUpdateCustomers(CType(cu stomers, ICustomerDTO()),
context.ThrowExceptions)
Me.dispose()
Dim customersToReturn() As CustomerDTO
customersToReturn =
System.Array.CreateInstance(GetType(CustomerDTO), customersReturned.Length)
customersReturned.CopyTo(customersToReturn, 0)
Return customersToReturn
End Function

Private Sub CreateSession(ByVal context As ISessionContext)
If (m_oCISession Is Nothing) Then
m_oCISession = New PeopleSoft_PeopleSoft.Session
If Not (m_oCISession.Connect(1, context.Server,
context.UserName, context.Password, 0)) Then
Throw New PeopleSoftServiceException("Could not connect to
server " + context.Server + " with username " + context.UserName)
End If
m_isConnected = True
End If
End Sub

Private Function GetSession() As PeopleSoft_PeopleSoft.Session
Return m_oCISession
End Function
End Class
Hi Peter,
I have an application developed in ASP.NET 2.0 running fine in the test system (Win 2k, IIS 5.0). The application calls a Win32 COM dll.

Although when we deployed the application in the production system runnin on Windows 2003 (IIS 6.0), it gave me an error

The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

Any help on how I can configure the IIS 6.0 for it to work?

Thanks
Adnan

Posted from http://www.topxml.com/renntp using reNNTP: the website based NNTP reader.
Aug 30 '06 #3

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

Similar topics

2
by: andrew lowe | last post by:
Hi there, We have to use a com interop library generated by tlbimp, where the orginal com object is written in uniface (a compuware language). The method we use and have the problem with has the...
0
by: Chris V | last post by:
Hello, I'm having problems sending MAPI Mail from an ASP.NET applcation (in VB) (which worked fine in traditional asp) When run on our test server, it returns an COMException (0x80010106): ]]...
0
by: MarkD | last post by:
I have an ASP.NET (VB.NET) application that calls all VB6 COM DLL via Interop. The DLL uses functionality contained in a Custom OCX Control (Also VB6) that in turn contains a standard TreeView...
1
by: Tory Collum | last post by:
My code works as a VB.NET executable file. So I'm trying to "adapt" it to a ..NET XML Web Service. As a VB.NET file, I used Microsoft.Office.Core as the reference, and everything was fine, but...
1
by: SQLJunkie | last post by:
Hi, I have installed SQL 2005 RTM on a new server and I keep getting this error (described below) quite frequently. Was wondering if anyone has a clue on what's happening here. I tried googling...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
0
by: bosky101 | last post by:
hi, im using VS 2005 ,and working on a windows applicaiton that opens powerpoint files. I ahve stumbled upon the folowing problems : 1. no pIA 's for office 2000 . what do i do ? 2. i managed...
2
by: RonS | last post by:
I am attempting to use a COM Interop inside my .NET Web Service. This same COM Interop works just fine in a VB.NET application. I've followed the guidance given in...
1
by: Reg | last post by:
Hello, I have a WCF Web Service using wsHttpDualBinding because I need a callback to Java client. I read Mr. A.Gupta's blog that if WCF Service uses wsHttpDualBinding for interop working is...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.