Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Go Back  Xtreme Visual Basic Talk > > > Problem with sending Fax from VB.NET Windows Service


Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2011, 12:12 AM
deveshwani deveshwani is offline
Newcomer
 
Join Date: Jul 2011
Posts: 1
Question Problem with sending Fax from VB.NET Windows Service


I am trying to send the fax from my windows service which is written in vb.net. I am facing problem with windows 7 and windows 2008 Server. It works fine with Windows XP

Fax is not getting visible in fax console's outbox. I saw three files in "C:\ProgramData\Microsoft\Windows NT\MSFax\Queue" for every sent fax but this is not visible in fax queue.

I also observed that, when i am trying to send the fax from windows application then it works but anyhow it is getting failed when i am trying to send that from windows service.

I have following code :

Dim oFaxSvrType As Type = Type.GetTypeFromProgID("FaxcomEx.FaxServer")
Dim oFaxSvr As Object = Activator.CreateInstance(oFaxSvrType)
Dim oFaxDocType As Type = Type.GetTypeFromProgID("FaxcomEx.FaxDocument")

Dim sFaxServerName As String

Try
sFaxServerName = Environment.MachineName.Trim

oFaxSvr.Connect(sFaxServerName)
oFaxSvr.Connect(sFaxServerName)

Dim oFaxDoc As Object = Activator.CreateInstance(oFaxDocType)
With oFaxDoc
.Sender.FaxNumber = "1112223333"
.Body = asfilename
.Sender.Name = "test recipient"
.Sender.OfficePhone = "123456789"
.Recipients.add("1113332222")
End With

Dim sFaxJobIds() As String = oFaxDoc.ConnectedSubmit(oFaxSvr)
oFaxDoc = Nothing

Catch ex As Exception
Throw New Exception(ex.Message)
Finally
' clean up com components
Try
oFaxSvr.Disconnect()
Catch ex As Exception
End Try
oFaxSvr = Nothing
End Try


I observed that in task manager, rundll32.exe is getting started when i tried to run this code from windows application but this rundll32.exe is not getting started when i am trying to run this code from windows service.

I am not getting any exception after executing this code but not able to see the fax on outbox.

I ensured that allow service to interact with desktop in service console is checked for fax service and my own windows service.

I need this little bit urgent. Any help ?
Reply With Quote
Reply

Tags
fax from windows service


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
 
Problem with sending Fax from VB.NET Windows Service
Problem with sending Fax from VB.NET Windows Service
 
-->