General discussion


RPC server unavailable , creating COM object

By dbrown ·
RPC server unavailable
im trying to create a COM object from a webservice running on IIS 6.0 win2003 server. I followed the previous article, and spawned a new single apartment thread from the webmethod, and passed it the object. that seems to work correctly. however, when i try to create the COM object, im getting a "RPC Server is unavailable." I was getting this same error prior to incorporating the thread design. any ideas why I would get this message? might be a win2003 server error.

here is my webmethod code...

Dim myThread As System.Threading.Thread

Dim myFax As New FaxingWrapper(FaxNumber, EPDealerNum, p_RemotePath)

myThread = New System.Threading.Thread(AddressOf myFax.Send)

myThread.ApartmentState = System.Threading.ApartmentState.STA


If myThread.IsAlive Then
End If

p_message = myFax.Message

here is my FaxWrapper class code...

ublic Class FaxingWrapper

Private rfFaxAPI As RFCOMAPILib.FaxServer
Private newFax As RFCOMAPILib.Fax
Private p_message As String
Private p_FaxNumber As String
Private p_EPDealernum As String
Private p_FilePath As String

Public Sub New(ByVal FaxNumber As String, ByVal EPDealernum As Integer, ByVal FilePath As String)
p_FaxNumber = FaxNumber
p_EPDealernum = EPDealernum
p_FilePath = FilePath
End Sub

Public Sub Send()
End Sub

ReadOnly Property Message() As String
Return p_message
End Get
End Property

Private Sub DoFax()

rfFaxAPI = New RFCOMAPILib.FaxServer

newFax = rfFaxAPI.CreateObject(RFCOMAPILib.CreateObjectType.coFax)

rfFaxAPI.ServerName = "fax"
rfFaxAPI.UseNTAuthentication = True
rfFaxAPI.AuthorizationUserID = "faxacct"
rfFaxAPI.AuthorizationUserPassword = "faxpassword"
rfFaxAPI.Protocol = RFCOMAPILib.CommunicationProtocolType.cpTCPIP

newFax.ToFaxNumber = "18889999999" 'p_faxnumber
newFax.ToName = "testname"

p_message = newFax.StatusDescription

Catch ex As Exception
p_message = ex.Message
End Try

End Sub
End Class

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums