使用Asp.net发送传真 [英] Sending FAX using Asp.net

查看:86
本文介绍了使用Asp.net发送传真的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个人都有一个



我有一个网络应用程序,我们要求通过该应用程序发送传真

。 />


我使用了以下代码(如下所示)。它可以在我的本地系统中正常工作。即,当我将传真机连接到我的系统并且应用程序在我的系统中时。



但是当我将传真机连接到服务器上安装了应用程序的服务器时,我收到错误错误HRESULT E_FAIL已从调用COM组件返回。



我们的局域网中使用了Web应用程序因此,尝试发送传真的用户将与连接传真的网络服务器系统进行网络连接。



请帮我解决一下有什么变化在代码或配置设置中工作。

 Public Sub fnSendFax()

尝试
Dim faxServer作为新的FAXCOMLib.FaxServer '=新的FAXCOMLib.FaxServerClass
faxServer.Connect(Environment.MachineName)

Dim faxDoc作为FAXCOMLib.FaxDoc = CType(faxServer.CreateDocument(Server.MapPath(FaxPath // TestFax.txt) )),FAXCOMLib.FaxDoc)
faxDoc.RecipientName =ReceiptName
faxDoc.FaxNumber =3,123456
faxDoc.DisplayName =测试传真
faxDoc.RecipientTitle =传真发送报告
faxDoc.SenderFax =DOTNET
faxDoc.SenderName =从ASP.NET(SSD)传真测试
Dim Response As Integer = faxDoc.Send
faxServer.Disconnect()
Catch Ex作为例外
Response.Write(Ex.Message)
结束尝试

结束子

解决方案

您是否还有正在使用的对象的许可证组件?您可能需要加载它并调用方法来运行。



或者,有一个帖子here [ ^ ]带有一些良好的故障排除和副作用,围绕使用模拟来使COM正常运行。



干杯。


浏览以下链接..,



这可以帮到你



这里 [ ^ ]


我在我的服务器上安装了Windows传真服务。

获得所有权限。

我不想使用许可软件发送传真。

所以请建议我一个解决方案。


Hii every one

I have a web application in which we have a requirement of sending fax
through the application.

I used the following code (given below) . It works fine from my local system. i.e.., when I connected FAX machine to my system and application is in my system.

But when I connect the FAX machine to my server with application installed on server , I get an error as Error HRESULT E_FAIL has been returned from a call to a COM component.

The web application is used in our LAN itself.So the user trying to send fax will be in network connection with the web server system to which FAX is connected.

Please help me out as what are the changes in code or configuration settings to be made to work.

Public Sub fnSendFax()

        Try
            Dim faxServer As New FAXCOMLib.FaxServer ' = New FAXCOMLib.FaxServerClass
            faxServer.Connect(Environment.MachineName)
         
            Dim faxDoc As FAXCOMLib.FaxDoc = CType(faxServer.CreateDocument(Server.MapPath("FaxPath//TestFax.txt")), FAXCOMLib.FaxDoc)
            faxDoc.RecipientName = "ReceiptName"
            faxDoc.FaxNumber = "3,123456"
            faxDoc.DisplayName = "Testing Fax"
            faxDoc.RecipientTitle = "Fax Send for Reports"
            faxDoc.SenderFax = "DOTNET"
            faxDoc.SenderName = "Fax Testing from ASP.NET(SSD)"
            Dim Response As Integer = faxDoc.Send
            faxServer.Disconnect()
        Catch Ex As Exception
            Response.Write(Ex.Message)
        End Try

    End Sub

解决方案

Do you have a licence component also for the object you are using? It's possible that you may need to load that up and call a method to get that running.

Alternatively, there is a post here[^] with some good troubleshooting and side effects around using impersonation to get running properly with COM.

Cheers.


Go through the below link ..,

this may helps you

Here[^]


I have installed windows fax service in my server.
Gave all the permissions.
I Dont want to use licensing software to send fax.
So please suggest me a solution.


这篇关于使用Asp.net发送传真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆