Solved

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

Posted on 2009-05-05
1
456 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error Receiving email 12 71
Validating textboxes in red square borders. 2 43
Validation for a field in asp.net 3 31
Ajax calendar distorted 4 23
To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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