H
Highlander
Hello all. I'm a systems admin and not a developer. I work in a large
IT department with teams of developers. Currently we are asking them to
develop a utility for us that will migrate code, among other things.
It's going to be written in .NET code, and is meant to replace our
current code migration utility which was written in VB6.
One of the functions we are asking for is the ability to send an e-mail
and a page to indicate success of failure of a code migration. The
developer is pushing back. Here's the exchange between the developer
and myself.
DEVELOPER: For an application to send an e-mail, SMTP services need to
be installed and running. To send a page, permissions need to be
implemented for internet access. Ports outside the firewall would be
needed to send pages. This creates a security issue.
ME: There is a workaround. The following script will send e-mail
without SMTP services. And as for sending a page, you use the same
e-mail script, and include a skytel e-mail address:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sendFrom = "(e-mail address removed)"
SendTo = "(e-mail address removed); (e-mail address removed)"
strSubj = "NO SMTP service needed."
strContents = "Testing e-mail script."
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "mail.allstate.com"
'.Item(sch & "smtpserverport") = 25 ' if you need to set a port
number
.update
End With
Set cdoMessage = CreateObject ("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = sendFrom
.To = sendTo
.Subject = strSubj
.TextBody = strContents
.Send
End With
Set cdoConfig = nothing
Set cdoMessage = nothing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DEVELOPER: This VB6 script is and its related calls to WMI are not
supported in .NET 1.1 or .NET 2.0 framework. The idea is to move away
from old technologies not to keep supporting them.
ME: If you can't run a script such as this one within .NET, then you
can run the script via command line. That would allow it to be used in
the .NET 1.1 or .NET 2.0 framework.
DEVELOPER: Just because it can be run via a command line does not mean
it is a part of .NET. If you check the .NET framework reference there
is no use of WMI interfaces. It is old technology that, through the
..NET framework, is not supported.
ME: When the code migration has completed, then the new utility
launches an executable from the command line. That's all the
functionality it needs. That's where it stops. No other requirements
for working within the .NET framework are needed - other than the
ability for the new utility to launch an executable from the command
line, and pass it a couple parameters.
The rest is done by the executable that is launched - the VBScript
above.
....
I don't follow what his points are exactly. I don't see any references
to WMI in this VBScript. But that's really a moot point anyway - since
all we need the .NET utility to do is run an executable from the
command line. I would imagine that writing the code in .NET to run an
executable from the command line is a relatively simple task.
I would imagine that writing the code in .NET to UnZip a file is also
is a relatively simple task. And this UnZip functionality is something
else we're requesting, and the developer is pushing back on this as
well - claiming that it's too complex - which increases the cost and
man-hours of the project.
Am I missing something here? Does this developer have a valid argument?
Thanks.
- Dave
IT department with teams of developers. Currently we are asking them to
develop a utility for us that will migrate code, among other things.
It's going to be written in .NET code, and is meant to replace our
current code migration utility which was written in VB6.
One of the functions we are asking for is the ability to send an e-mail
and a page to indicate success of failure of a code migration. The
developer is pushing back. Here's the exchange between the developer
and myself.
DEVELOPER: For an application to send an e-mail, SMTP services need to
be installed and running. To send a page, permissions need to be
implemented for internet access. Ports outside the firewall would be
needed to send pages. This creates a security issue.
ME: There is a workaround. The following script will send e-mail
without SMTP services. And as for sending a page, you use the same
e-mail script, and include a skytel e-mail address:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sendFrom = "(e-mail address removed)"
SendTo = "(e-mail address removed); (e-mail address removed)"
strSubj = "NO SMTP service needed."
strContents = "Testing e-mail script."
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "mail.allstate.com"
'.Item(sch & "smtpserverport") = 25 ' if you need to set a port
number
.update
End With
Set cdoMessage = CreateObject ("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = sendFrom
.To = sendTo
.Subject = strSubj
.TextBody = strContents
.Send
End With
Set cdoConfig = nothing
Set cdoMessage = nothing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DEVELOPER: This VB6 script is and its related calls to WMI are not
supported in .NET 1.1 or .NET 2.0 framework. The idea is to move away
from old technologies not to keep supporting them.
ME: If you can't run a script such as this one within .NET, then you
can run the script via command line. That would allow it to be used in
the .NET 1.1 or .NET 2.0 framework.
DEVELOPER: Just because it can be run via a command line does not mean
it is a part of .NET. If you check the .NET framework reference there
is no use of WMI interfaces. It is old technology that, through the
..NET framework, is not supported.
ME: When the code migration has completed, then the new utility
launches an executable from the command line. That's all the
functionality it needs. That's where it stops. No other requirements
for working within the .NET framework are needed - other than the
ability for the new utility to launch an executable from the command
line, and pass it a couple parameters.
The rest is done by the executable that is launched - the VBScript
above.
....
I don't follow what his points are exactly. I don't see any references
to WMI in this VBScript. But that's really a moot point anyway - since
all we need the .NET utility to do is run an executable from the
command line. I would imagine that writing the code in .NET to run an
executable from the command line is a relatively simple task.
I would imagine that writing the code in .NET to UnZip a file is also
is a relatively simple task. And this UnZip functionality is something
else we're requesting, and the developer is pushing back on this as
well - claiming that it's too complex - which increases the cost and
man-hours of the project.
Am I missing something here? Does this developer have a valid argument?
Thanks.
- Dave