Solved

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

Posted on 2009-05-05
1
450 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Replacing HTML tags in Textarea/Textbox 5 46
dynamic menu in asp.net c# 11 57
SQL best practice question 3 36
How do ASP.NET and MVC work together? 4 25
New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013.  There was huge research been done and found solution for the duplicate mails. Especially when the user gets  duplicate mails.
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…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now