FaxDoc.Send : Access is denied

M

ma81x

I'm trying to send a fax from a ASP.NET web page using the following
code.

On development machine with WindowsXP sp2 this works correctly.

On the test machine (Windows 2000 server sp4) this code throws
a "UnauthorizedAccessException: Access is denied."
on the doc.Send() line.
The CreateObject(...) and the faxServ.Connect(...) works.

The file to send is a pdf and I installed latest acrobat reader on the
server (7.07).
In the Security tab of the fax I set all grants to Everyone.
Everyone has full control on the folder with temporary pdf files.

Please help me.


------------------------------------------------------------------------

Dim faxServ As Object 'FaxServer
Dim doc As Object 'FaxDoc

faxServ = CreateObject("FaxServer.FaxServer.1")
faxServ.Connect(Environment.MachineName)

doc = faxServ.CreateDocument(fileName)

doc.FaxNumber = sNum
doc.DisplayName = sNum
doc.FileName = fileName
doc.Send()

faxServ.Disconnect()
------------------------------------------------------------------------



In a vbs file i wrote the following, and it works
(but unfortunately an acrobat reader still remain visible)
------------------------------------------------------------------------

Dim faxServ
Dim doc

Set faxServ = CreateObject("FaxServer.FaxServer.1")
faxServ.Connect("<machine-name>")

Set doc = faxServ.CreateDocument("1.pdf")
doc.FaxNumber = "+391111"
doc.Send()

Set doc = Nothing
faxServ.Disconnect()
Set faxServ = Nothing
------------------------------------------------------------------------
 
A

Alex Feinman [MVP]

On Windows 2000 you might not be able to launch Acrobat from a web process.
You could try writing a .NET service that would submit documents to the fax
on behalf of your web site and give this service right to interact with the
desktop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top