Hi,
I am creating a remoting server.
In my project reference I have System.Web.dll. I am able to compile and run
it successfully, BUT when I try to create a dll using SoapSuds I am getting
an exception.. Here is my very simple Code:
Console App:
===============================================
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Http
Class TestObjects : Inherits MarshalByRefObject
Public Function SendEmail(ByVal MailMessage As
System.Web.Mail.MailMessage) As Boolean
Try
System.Web.Mail.SmtpMail.SmtpServer = "mail.myserver.com"
System.Web.Mail.SmtpMail.Send(MailMessage)
SendEmail = True
Catch ex As Exception
MsgBox(ex.Message)
SendEmail = False
End Try
End Function
End Class
Module Module1
Sub Main()
Console.WriteLine("ServerStartup.Main(): Server Initializing...")
Dim chn1 As New HttpChannel(8000)
ChannelServices.RegisterChannel(chn1)
RemotingConfiguration.RegisterWellKnownServiceType (GetType(TestObjects),
"remoteOBJ", WellKnownObjectMode.Singleton)
Console.WriteLine("ServerStartup.Main(): Server Started")
Console.ReadLine()
End Sub
End Module
================================================== ===========
When I try go create a dll :
SoapSuds -url:http://MyMachine:8000/remoteOBJ?wsdl -oa:server.dll
================================================== ===========
Exception I get:
c:\Documents and Settings\MyMachine\Local
Settings\Temp\SS180F.tmp\Server.cs(22,45): error CS0234: The type or
namespace name 'Mail' does not exist in the class or namespace 'System.Web'
(are you missing an assembly reference?)
Please help me, I am struck.
Richard