473,587 Members | 2,580 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vb SMTP Server - Huge Problem. Please help

Hi

I am writing an SMTP server in VB.Net using the as Async
Socket Server Code in MSDN as the base. My problem is that
the port 25 socket Listener just stops accepting
connections after 10 to 20 secs.My listener loop is as
follows :

Public Shared Sub StartListening( )
Dim localEndPoint As New IPEndPoint(ipAd dress.Any, 25)

Dim f_oListener As New Socket(AddressF amily.InterNetw ork,
SocketType.Stre am, System.Net.Sock ets.ProtocolTyp e.Tcp)
Try
f_oListener.Bin d(localEndPoint )
f_oListener.Lis ten(100)
allDone.Reset()
While g_oServer.MainL oopRunning
f_oListener.Beg inAccept(New AsyncCallback(A ddressOf
AcceptCallback) , f_oListener)
allDone.WaitOne ()
End While

f_oListener.Clo se()
f_oListener = Nothing
End Try
End Sub 'StartListening

Am I running out of threads from the thread pool ? If so
how can I control that value. My SMTP server gets a lot of
traffic.

The exact same code works perfectly in my POP Server

Thanks for any input

Ajay
Nov 20 '05 #1
2 1304
Hi Ajay,

Have you put any debug variables to count things?

This isn't my area but when I see something like New AsyncCallback inside a loop it gets the old "how many oif these at once?"
question ringing.

Might it be useful to those that know more about these things to show what allDone is?

Regards,
Fergus
Nov 20 '05 #2
Hi Fergus

Thanks for the suggestion. alldone is a ManualresetEven t

-Ajay
-----Original Message-----
Hi Ajay,

Have you put any debug variables to count things?

This isn't my area but when I see something like New AsyncCallback inside a loop it gets the old "how many oif
these at once?"question ringing.

Might it be useful to those that know more about these things to show what allDone is?
Regards,
Fergus
.

Nov 20 '05 #3

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

Similar topics

2
4687
by: Mike Obiku | last post by:
First of all, I'm new to PHP. For my website I have some PHP scripts to run a photo database. New users have to register them selfs. After registring the new user is getting an e-mail maid by an php script. But if the user clicks on the button to sent his info, so the PHP can sent him an e-mail, it always results in this error Warning:...
1
8035
by: bivin | last post by:
hai i am requesting your technical support. please help me. i have been working with this for five days. the problem is relating with the smtp. i am trying to send an email from the asp.net page. earlier it was showing send using not find error.
4
2463
by: Tushar | last post by:
Please help: I found some of the following information in messeges in this group but I would like someone to confirm them please. I would like to use the following web-services / ASP.Net code to be used in an intranet environment: MailMessage Message = new MailMessage(); Message.To = ... .... SmtpMail.SmtpServer = ...
6
3777
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps...
34
18203
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,
1
3178
by: oliu321 | last post by:
Hi, I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket programming and SMTP protocol, a VB version using CDO and a C# version using System.Net.Mail. Now all of them works great with any email account but hotmail. So here is the C# code: MailAddress from = new...
2
3607
by: oliu321 | last post by:
Hi, First I am not trying to write a client to talk with hotmail straightly. I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket programming and SMTP protocol, a VB version using CDO and a C# version using System.Net.Mail. Now all of them works great with any email account but ...
7
7725
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...
232
13195
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
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. ...
0
8340
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...
1
7967
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...
0
6621
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.