Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faxing through ASP.Net using Microsoft Fax Service

Status
Not open for further replies.

davetwooh

Programmer
Feb 16, 2004
6
US
Has anyone successfully faxed through an ASP.Net web page using the Microsoft Fax service on the web server (IIS 6 Windows 2003 Enterprise Server).

I have a Windows 2003 IIS6 web server. And keep getting an Access is denied error. . i've given full rights access to aspnet account, iusr_machinename account, my own account, nothing works. I cannot change the identity impersonate to true, this would make the rest of my application not work correctly because i use windows authentication, and every user would be using the same id which defeats the purpose


Im using the code thats all over the internet, there doesn't seem to be a true .Net namespace for fax services, unfortunately, so im using old school COM object ....

Dim FaxServer As Object
Dim FaxDoc As Object
FaxServer = server.createobject("Faxserver.FaxServer")
'Create FaxServer object...

FaxServer.Connect("servername") <---This line produces an error.

'For servername i've put the computer name of the web server, i've left it blank, i put the unc \\computer name of the web server, i've put "." all get the same error: Access is Denied

' I've also added a reference to fxscom.dll and used an import statement at the top of code and created the faxserver object like this: Dim FaxServer As New FAXCOMLib.FaxServer, still doesn't work

'Create document
FaxDoc = FaxServer.CreateDocument("c:\inetpub\
FaxDoc.FaxNumber = "8604293542"
FaxDoc.RecipientName = "John Doe"
FaxDoc.Send()
FaxDoc = Nothing
FaxServer.Disconnect()
FaxServer = Nothing

I've given full access rights to the fxstmp directory in system32 folder, that didn't do it either, I no longer believe that this is a file system permission, but more of something that has to with the COM Object itself. Any ideas would be great, because im fresh out of em!

Dave in CT
 
We're in the same boat.

I figured a workaround for the "access denied" problem.

Here is how to solve it (XP/2003):
In the management console, find the fax service and open it's properties. On the Log On tab, select an administrator account for login.

This is better than giving asp.net administrator privileges.


But unfortunatly, it comes to another problem:
The code now raises a new exeption on the same exact line:

System.Runtime.InteropServices.COMException: Unspecified error

Any tips or workarounds on how to solve this problem is more than welcome.


Hope it helps

SC
 
In order to do server side Office tasks, you must configure the DCOM permissions of an object. I'm not sure that this is your problem, but it sounds like it might be.

To do so,

Start --> Run --> Type 'dcomcnfg'

Component Services --> Computers --> My Computer --> DCOM Config

Answer no to any popups that occur. Find the component you want to configure, and set its permissions.

To do so, dbl click the component you want (sorry I don't have this installed, so I have no idea which it would be... if any) and go to the launch/access permissions.

Hope that helps.

-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top