Unable to send fax using the IFaxServer interface

N

Nicolas Caron

Not sure if this is the right newsgroup to post this, if not where
should I post this?

Anyway here's the question... I have developped a service application
that needs to send faxes. I can connect to the local fax service with
IFaxServer.Connect, and then create a FaxDoc with
IFaxServer.CreateDocument.

The problem is when I try to send that document... I always get an
"Data is invalid" error. The data I try to send is a basic .tif file.
What baffles me is that when I take the exact same code and try to send
the exact same tif file from a normal application (as opposed to my
service) it works perfectly...

I tried configuring my service to use both LocalSystem and my own
account and it didn't work. Since connecting to the server works I
assume this is not a users rights issue...

Thanks for the help. As stated before if this is the wrong newsgroup
for this message tell me where I should be posting it...
 
R

R. Sridharan [MSFT]

Make sure you have Added the Fax printer. If it is local , then you should
see Fax as a printer. Also make sure you have the app associated with .tif
extension exists and working.

--
R. Sridharan [MSFT]
Microsoft Printing, Imaging and Fax Team

This posting is provided "AS IS" with no warranties, and confers no rights.

Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'
 
N

Nicolas Caron

R. Sridharan said:
Make sure you have Added the Fax printer. If it is local , then you
should see Fax as a printer. Also make sure you have the app
associated with .tif extension exists and working.

As I already said, on the same machine, with the exact same code and
the exact same tif file everything works perfectly when done from my
test application (which contains the exact same code as my test service)

That said here are the answers to your questions. It is local and yes I
see the "fax printer". I can connect to it, the probleme is when I try
to send my document I get the Invalid Data error... And yes I have a
working application associated to the .tif extension.
 
R

Raghavendra R [MSFT]

We just wrote a managed service that was successfully able to send a fax
using Windows 2000 Fax COM Object Model. We could send fax by configuring
the service to run both under 'Local System' & 'User account'.

Please let us know what's the exact error code you are getting & share out
the code if possible? Is there exactly no difference between your normal app
& service code as far as sending fax code segment is concerned.

Also please send us the output of 'sc qc <your_service_name>' so we know
what kind of service is yours? 'sc.exe' is a standard service controller exe
available on windows boxes though I am not sure if it's present on Windows
2000.

--
Raghavendra R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.

R. Sridharan said:
Make sure you have Added the Fax printer. If it is local , then you should
see Fax as a printer. Also make sure you have the app associated with .tif
extension exists and working.

--
R. Sridharan [MSFT]
Microsoft Printing, Imaging and Fax Team

This posting is provided "AS IS" with no warranties, and confers no rights.

Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'

Nicolas Caron said:
Not sure if this is the right newsgroup to post this, if not where
should I post this?

Anyway here's the question... I have developped a service application
that needs to send faxes. I can connect to the local fax service with
IFaxServer.Connect, and then create a FaxDoc with
IFaxServer.CreateDocument.

The problem is when I try to send that document... I always get an
"Data is invalid" error. The data I try to send is a basic .tif file.
What baffles me is that when I take the exact same code and try to send
the exact same tif file from a normal application (as opposed to my
service) it works perfectly...

I tried configuring my service to use both LocalSystem and my own
account and it didn't work. Since connecting to the server works I
assume this is not a users rights issue...

Thanks for the help. As stated before if this is the wrong newsgroup
for this message tell me where I should be posting it...
 
N

Nicolas Caron

Raghavendra said:
We just wrote a managed service that was successfully able to send a
fax using Windows 2000 Fax COM Object Model. We could send fax by
configuring the service to run both under 'Local System' & 'User
account'.

Please let us know what's the exact error code you are getting &
share out the code if possible? Is there exactly no difference
between your normal app & service code as far as sending fax code
segment is concerned.

Also please send us the output of 'sc qc <your_service_name>' so we
know what kind of service is yours? 'sc.exe' is a standard service
controller exe available on windows boxes though I am not sure if
it's present on Windows 2000.

Actually we just found what the problem was. The PC that was trying to
send fax is on a domain, so we tried logging the service either as a
user with admin rights granted by the domain OR as LocalSystem Account.
Neither worked as was mentionned in my original post. We tried to
change the service login to use a local user that has admin rights and
everything worked perfectly...

That said maybe you can clarify somethings for me. What is the exact
right that a user should have to be able to send faxes? Also, I thought
the LocalSystem account was like a beefed up Administrator... if that
is the case shouldn't he be able to send faxes? What rights is that
account missing?

Thanks in advance!
Nicolas Caron
 
M

Manoj K Jain

User needs to have "Print" access. Go to "Printers and Faxes", click on the
Fax icon and go to the security tab. All the access for users would be
listed there.

Also, I dont think LocalSystem is a beefed up administrator. You could check
MSDN documentation for more help on this.

--
Manoj K Jain[MSFT]
Microsoft Printing, Imaging and Faxing
This posting isprovided "AS IS" with no warranties and confers no rights.
Please do not send mail directly to this aloas. This alias is for newsgroup
purposes only.
 
C

Chandrasekar [MSFT]

That said maybe you can clarify somethings for me. What is the exact
right that a user should have to be able to send faxes? Also, I thought
the LocalSystem account was like a beefed up Administrator... if that
is the case shouldn't he be able to send faxes? What rights is that
account missing?

To send a fax the user should have permissions to "Submit Faxes" on the fax
server.
To view the security setting goto start->run->fxsadmin.msc. Right click on
the fax server and see properties.
In the security page you will see the security properties. Here make sure
that the user has rights to submit faxes.

Thanks,
Chandrasekar R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'
 
N

Nicolas Caron

Nicolas said:
Not sure if this is the right newsgroup to post this, if not where
should I post this?

Anyway here's the question... I have developped a service application
that needs to send faxes. I can connect to the local fax service with
IFaxServer.Connect, and then create a FaxDoc with
IFaxServer.CreateDocument.

The problem is when I try to send that document... I always get an
"Data is invalid" error. The data I try to send is a basic .tif file.
What baffles me is that when I take the exact same code and try to
send the exact same tif file from a normal application (as opposed to
my service) it works perfectly...

I tried configuring my service to use both LocalSystem and my own
account and it didn't work. Since connecting to the server works I
assume this is not a users rights issue...

Thanks for the help. As stated before if this is the wrong newsgroup
for this message tell me where I should be posting it...

Ok after much research I finally found the source of my problems. To be
able to fax properly a file through the Microsoft Faxing Service, a
file association must be made for that file type so that the OS can
identify what type of files it is. My guess is that whatever
application I had associated with the file type (TIFs in my case) was
not "service friendly" and that's why it didn't fax correctly as a
service...

After changing my application so it worked as a standard application
instead of a service, I sent it to my customer, confident that it would
work properly... it didn't. I talked on the phone to someone from
Microsoft (forgot his name but he confirmed to me the file association
thing) I went to further investigate the problem.

I sent a TIF file to my customer to see if TIFs were indeed associated
to an application on his PC. There were but to Microsoft Office
Document Imaging which is shipped with Office XP. Problem is that when
this application is installed, the file association created for TIFs
identifies them as MSPaper.Document or "Microsoft Office Document
Imaging Files". Guess the windows faxing service got confused by that
and didn't know how to send my TIFs since they were not identified as
TIFS!

I deleted this file association, recreated it but this time identifying
TIFs as Tif Images and it worked properly!! I don't know if anyone at
Microsoft is aware of this, but I guess it should get documented
somewhere.

All that brings me to another question! When testing, if I associated
the TIFs to a bogus application (test app that does absolutly
NOTHIGN... no code) it worked as long as TIFs were identified as Tif
Images... That I don't understand... COuld anybody explain??
 
R

Raghavendra R [MSFT]

That's because you only changed the application that opens the .tif files.
So the application that handles "printto" verb is still your "Windows
Picture & Fax Viewer". Note that its not possible to change the "printto"
association from UI.

--
Raghavendra R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
 

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