Faxing from ASP.NET page using faxlibcom

dwadley_at_bigpond.net.au
Date: 12/10/04


Date: 10 Dec 2004 00:35:37 -0800

Hi There, I am trying to fax from a web page using asp.net and the
faxcomlib library. I have a windows 2003 box and a windows xp client.
I am getting an "access is denied" message when I try to call this
function. It has a problem with the following line

FaxServer.Connect("")

I have tried setting all sorts of file permissions on every part of the
hard disk drive.

I also tried the following with no success.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_running_asp_net_on_a_dc.asp

I tried impersonating I tried weak accounts SYSTEM all sorts of things.

Strange thing is when I build a Windows app with the same code it works
like a treat so I know there is nothing wrong with the code or the fax
service but simply some sort of permission problem. Can anyone point
me in the right direction as to how I can sort this out ?

Sub Sendfax(ByVal strTo As String, ByVal strFrom As String, ByVal
StrSubject As String, ByVal StrBody As String, ByVal strFileName As
String)
Dim lngSend As Long
Dim strComputer As String
Dim oFaxServer As FAXCOMLib.FaxServer
Dim oFaxDoc As FAXCOMLib.FaxDoc
Dim myFaxServer As String

oFaxServer = New FAXCOMLib.FaxServer
oFaxServer.Connect("")
oFaxServer.ServerCoverpage = 0
oFaxDoc = oFaxServer.CreateDocument(strFileName)
With oFaxDoc
.FaxNumber = strTo
.DisplayName = "Fax Server"
lngSend = .Send
End With
oFaxDoc = Nothing
oFaxServer.Disconnect()
oFaxServer = Nothing
End Sub

Thanks in Advance

Regards

David



Relevant Pages

  • RE: GetOpen filename to open files(Workbooks)
    ... As I said previously you can't circumvent the windows security protection ... Set FileNameXls = Workbooks.Open(_ ... Dim FileNameXls As Variant ... Dim ShName As String, PathStr As String ...
    (microsoft.public.excel.misc)
  • Re: function PlaySound does not work
    ... You need to use any of several methods to get the Windows directory. ... Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long ... Public Function GetWinDir() As String ... Dim sBuffer As String ...
    (microsoft.public.vb.winapi)
  • Re: RegOpenKeyEx() on 64 bit Windows
    ... I need my VB code to work on 32 bit Windows and 64 bit ... As String) As Long ... Dim hLib As Long ... > Dim sReturn As String ...
    (microsoft.public.win32.programmer.kernel)
  • Re: A very simple OCX Question for experts
    ... set up for ocxs iand dlls in the App directory and registering them ... > "GetWindowsDirectoryA" (ByVal lpBuffer As String, ... > Dim x As Long ... >> My specific problem is with the Windows Plattform: ...
    (microsoft.public.vb.general.discussion)
  • Re: impersonate user in windows forms
    ... > The following example demonstrates how to impersonate a user and then ... > Public Shared Function LogonUser(lpszUsername As String, ... > 'The Windows NT user token. ... > Dim token1 As Integer ...
    (microsoft.public.dotnet.languages.vb)