Link to home
Start Free TrialLog in
Avatar of THBA
THBAFlag for United States of America

asked on

what does .net web service not having web.config entry has to do with sending emails?

I am getting the following errors:
No connection could be made because the target machine actively refused it 127.0.0.1:4455
WebException: Unable to connect to the remote server
 The explanation I got from the seniors is that there is a web service used by the web application. That web service did not have an entry in the web.config file for a specific port. Therefore, in the disco file the web service defaults to 4455.

Why does no web.config entry in a web service manifest itself in a send email problem?
Why does the email target itself to port 4455?  (there is not specific code or config entry to use port 4455).  


Dim client As New SmtpClient
           ' SmtpClient is from System.Net.Mail
 
           ' client.Host = "smtpmail.wegmans.com"
            client.Host = "localhost"
            ' I tried both smtpmail.wegmans.com and localhost. both gave me the same error
             client.Send(myMessage)
            'in the try catch, client.Send result in the error. See attachment for error info
 
PO.disco (sample entry)
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
  <contractRef ref="http://localhost:4455/PO.asmx?wsdl" docRef="http://localhost:4455/PO.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
  <soap address="http://localhost:4455/PO.asmx" xmlns:q1="http://webservices.myCOM.com/PO/" binding="q1:POSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
  <soap address="http://localhost:4455/PO.asmx" xmlns:q2="http://webservices.myCOM.com/PO/" binding="q2:POSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

Open in new window

emailProblem.bmp
ASKER CERTIFIED SOLUTION
Avatar of THBA
THBA
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial