Solved

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

Posted on 2009-05-05
1
455 Views
Last Modified: 2013-11-30
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
0
Comment
Question by:THBA
1 Comment
 
LVL 1

Accepted Solution

by:
THBA earned 0 total points
ID: 24309182
OK. I understand. The function is calling the webservice.
in the web.config file for the web application site (the ASP .NET application),  there is supposed to be an entry for the web service.

<add key="POWebService.PurchaseOrders" value="https://webservices.myCo.com/PO.asmx"/>
Because there was no entry, it takes the default in the Webreference, PO.disco. On the test server (not personal, localhost), it tries to call the service. Hence, target machine actively refused it. (no connection can be made).
 

 Dim vendorRulesEmailData As POWebService.VendorRulesEmail() = POService.GetVendorRulesEmailByBbrAndType(vendorRuleNum, "V")
 
Where POService is the web service
POService  = New POWebService.PurchaseOrders
 
It is actually erring out on that call, not Client.send

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Usenet? There are many different opinions on exactly what Usenet is an isn't. Many opinions are incorrect simply out of ignorance. The Wikipedia listing about Usenet does a good job of explaining it, so instead of repeating it all here I wi…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question