Skip to Content
0
Former Member
Jun 19, 2014 at 09:17 AM

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

847 Views

hi.

i am getting above error i am running my code in server 64 bit

in my addon simply i am doing one requirement

ie.

just browse the file from the system desktop and take the path copy to the matrix.

i had developed code in my system it is working

i can sure it is working fine.

but today i am checking in client server system

i am getting above error

exactly the below line i am getting the error.

i checked in net

it is telling that go to services.msc and

start rpc remote should be start

i checked in all scenarios but

still it is not working

giving the same error.

If MyTest.ShowDialog() = DialogResult.OK Then

Exactly above line b1 is closing and then the source code is running..

after than windows privacy statement is opening..


Public Sub ShowFolderBrowser()

Try

Dim MyTest As New OpenFileDialog

Dim MyProcs() As Process

Dim filename As String

MyProcs = Process.GetProcessesByName("SAP Business One")

If MyProcs.Length <> 0 Then

For i As Integer = 0 To MyProcs.Length - 1

Dim MyWindow As New WindowWrapper(MyProcs(i).MainWindowHandle)

MyTest.Filter = "Excel files (*.xls)|*.xls|Document files (*.doc)|*.doc"

MyTest.InitialDirectory = "C:\"

'Exit Sub

If MyTest.ShowDialog() = DialogResult.OK Then

'if(openFileDialog1.ShowDialog() == DialogResult.OK)

'Dim ret As DialogResult = MyTest.ShowDialog(MyWindow)

'If ret = DialogResult.OK Then

filename = MyTest.FileName

Dim f As New System.IO.FileInfo(filename)

If (oMatAttach.VisualRowCount > 0) Then

If (oMatAttach.Columns.Item("V_1").Cells.Item(oMatAttach.VisualRowCount).Specific.value <> "") Then

oMatAttach.AddRow()

End If

Else

oMatAttach.AddRow()

End If

'oMatAttach.AddRow()

oMatAttach.FlushToDataSource()

oDBs_Attach.Offset = oDBs_Attach.Size - 1

oDBs_Attach.SetValue("LineId", oDBs_Attach.Offset, oMatAttach.VisualRowCount)

oDBs_Attach.SetValue("U_path", oDBs_Attach.Offset, f.DirectoryName)

oDBs_Attach.SetValue("U_fname", oDBs_Attach.Offset, f.Name)

oDBs_Attach.SetValue("U_atdate", oDBs_Attach.Offset, DateTime.Today.ToString("yyyyMMdd"))

oMatAttach.SetLineData(oDBs_Attach.Size)

frmContractOrder.Items.Item("40").Enabled = True

frmContractOrder.Items.Item("118").Enabled = True

System.Windows.Forms.Application.ExitThread()

Else

System.Windows.Forms.Application.ExitThread()

End If

Next

Else

Console.WriteLine("No SBO instances found.")

End If

Catch ex As Exception

oApplication.StatusBar.SetText("ShowFolderBrowser Method Failed" & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)

Finally

End Try

End Sub

Sub xlwrdclose()

Try

If xlapp.Visible = True Then

xlapp.Quit()

ElseIf wrapp.Visible = True Then

wrapp.Quit()

End If

Catch ex As Exception

oApplication.StatusBar.SetText("XLWRDClose Method Failed" & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Medium, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)

Finally

End Try

End Sub