ASP.NET Fax - Setting Up Your VB.NET Environment

This section describes how to set up a VB.NET environment to work with the InterFAX Web service and send ASP.NET faxes using VB.NET. It includes creating a proxy class with the .NET SDK, compiling the proxy class, and referencing the proxy class.

For more general information, see Setting Up ASP.NET Environment.

If you are working with C#, learn how to set up your C# fax environment, or see the C# fax examples. Alternatively, see additional fax VB.NET or ASP.NET fax examples.

ASP.NET Fax - Creating Proxy Class with Microsoft .NET Framework SDK

In this section, you create source code for the proxy class in VB.NET (.vb). Please note that the wsdl.exe utility is typically located under C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\.

For the outbound service (sending a fax):


Wsdl.exe http://ws.interfax.net/dfs.asmx?WSDL /l:vb  /n:InterfaxOut /out:c:\temp\Interfax\Out.vb

This creates a source file named Out.vb.

For the inbound service (receiving a fax):


Wsdl.exe http://ws.interfax.net/inbound.asmx?WSDL /l:vb  /n:InterfaxIn /out:c:\temp\Interfax\In.vb

This creates a source file name In.vb.

For administration services (administering accounts):


Wsdl.exe http://ws.interfax.net/admin.asmx?WSDL /l:vb  /n:InterfaxAdmin /out:c:\temp\Interfax\Admin.vb

This creates a source file name Admin.vb.

Compiling Proxy Class

You should use the VB.NET compiler (vbc.exe), located under C:\WINDOWS\Microsoft.NET\Framework\.

For sending a fax (outbound service):


Vbc.exe c:\temp\Interfax\Out.vb /out:InterfaxOut.dll /target:library /reference:System.dll  /reference:System.Web.dll  /reference:System.Web.Services.dll  /reference:System.Xml.dll

This creates a file named InterfaxOut.dll.

For receiving faxes (inbound service):


Vbc.exe c:\temp\Interfax\In.vb /out:InterfaxIn.dll /target:library /reference:System.dll  /reference:System.Web.dll  /reference:System.Web.Services.dll  /reference:System.Xml.dll

This creates a file named InterfaxIn.dll.

For receiving a fax (administration service):


Vbc.exe c:\temp\Interfax\Admin.vb /out:InterfaxAdmin.dll /target:library /reference:System.dll  /reference:System.Web.dll  /reference:System.Web.Services.dll  /reference:System.Xml.dll

This creates a file named InterfaxAdmin.dll.

Copy the desired assembly DLL file or files to the folder C:\temp\interfax\bin folder.

ASP.NET Fax - Referencing Proxy Class

Simply add a reference to the required classes within the proxy class to your VB.NET code. Example (for inbound):

<

pre><code type="vb>
Dim objInterfax as new InterfaxIn.Inbound
Dim objItem as InterfaxIn.MessageItem

When you're done, continue to the ASP.NET fax samples, or see the fax VB.NET examples.

Contact us today

Talk to a member of our team about the benefits InterFAX can bring to your organization's communications processes.

Contact us today