473,594 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

smtp error: unable to connect to remote server...No connection could be made because the target machine actively refused it

Hi,

I got "InnerException : Unable to connect to remote server"..."No
connection could be made because the target machine actively refused
it" when I attempted to send an email through my Intranet app that is
written in asp.net 2.0. The smtp server is a local server and it uses
Port 25. The Authentication is set to Anonymous Access. Here's my
code:

<system.net>
<mailSettings >
<smtp>
<network host="10.162.22 .72" />
</smtp>
</mailSettings>
</system.net>

Protected Sub SendEmail_Click (ByVal sender As Object, ByVal e As
System.EventArg s) Handles SendEmail.Click
Const ToAddress As String = "so*****@somewh ere.com"
Dim mm As New MailMessage(Use rsEmail.Text, ToAddress)
mm.Subject = Subject.Text
mm.Body = Body.Text
mm.IsBodyHtml = False
Dim smtp As New SmtpClient
smtp.Send(mm)
End Sub

In the <network host.. /section, I did not specify a username and
password because I set the smtp server authentication mode is set to
Anonymous Access. Can someone please tell me what I did wrong? I
couldn't find anything on the Web that could point me in the right
direction.

Thanks,
Jon

Aug 10 '07 #1
0 3211

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
25400
by: Alex Hunsley | last post by:
I am using the smtp module to send emails via a local SMTP server on our network. I am failing with "connection refused" error, even though we definitely have an smtp server running on port 25! the code is like this: me = 'ahunsley@companyname.com' you = 'someonelse@companyname.com' msg = '*** alert'
34
18205
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
3
11748
by: David++ | last post by:
Hi folks, I have built a VS2005 project which includes a C# Web Service, C# Windows Forms app (which uses the Web Service), and a C# PocketPC app (which also uses the web service). When I run the Windows Forms app from the desktop I am able to use the Web service with no problems. On the other hand, when I run the PocketPC app and use the Web Service itthrows the following Exception -
0
3010
by: Orbit | last post by:
Hi, I hope someone could help me. I have a simple web service that I developed on my laptop that resides within a large web application. It queries Northwind & presents the data in a grid in the asp.net client page that called it. I moved the whole app to a test server, & when I try to run it, I get the error "No connection could be made because the target machine actively refused it". It looks like the wsdl still points to my laptop...
7
7726
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee free edition for anti-virus. I use an ISP provider from my country and according to them I do not need to perform authentication while sending mails through their SMTP address. Thus I am using external SMTP server. I don't have IIS installed...
11
2872
by: Jay | last post by:
I have a socket listener and a test app. The socket listener app: opens up the port 51296 and listens. The test app - sends a message on port 51296. If the listener and test app are on the same box, all is well - everything works as expected. But when I move my test app to a remote box: I get the following error: "no connection could be made because the target machine actively refused it" --------------------------------------------------...
7
10852
by: GD | last post by:
Hi, I am trying to call a webservice from a windows service application. It works only if I launch the windows service app from VS.Net 2005 (Worked around from Main()) or from a winform test application. However, it generates a kind of security error after I install and start the service in my Window Server machine. I believe that it is related to authentication. The following is the sample code: HttpWebRequest obj =...
1
1325
by: urvika | last post by:
I have an ASP.NET 2.0 web application on a web server and a separate machine for SQL Server 2000 Database. I am using a Connectionstring based on Sql Authentication to connect to the the SQL 2000 Database. Now, When I open the web page on the Web Server itself, I am able to successfully connect to the Database which confirms that the connection string is correct. However when I open the same web page from another client machine other...
5
2520
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs and registration keys, so I'm certain that the two machines are as similar as they can be.
0
8253
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8009
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8240
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6661
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3867
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1216
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.