473,614 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A socket operation encountered a dead network

Frinavale
9,735 Recognized Expert Moderator Expert
Hi there,

I'm not sure if anyone here can help me but I'm pretty desperate at this point.

I've developed a web application that sends emails periodically. Everything works fine in the test environment (Visual Studio 2005's server emulator) but not when I publish it to the real IIS server. The IIS server is on the same machine that I am developing on.

After reviewing the Windows Event log I discovered that our WinSock firewall is preventing my application from sending emails. There is no way to turn off this firewall so I have to work around it.

Since the web-app works in the test environment, I'm sure there's a way to get it to work on the real server as well. I assumed that the test environment doesn't use the ASPNET user account; but instead uses the account credentials that I'm logged into while developing and so it has permissions to send emails. So I've tried to impersonate a user that has authority to send emails (by using the same account that I'm assuming is used in the testing environment) but only get the error:
"A socket operation encountered a dead network"

Could someone please point me in the right direction?
Is this error being caused by my WinSock Proxy Server?
How do I get around this?

Any help would be appreciated.
Thanks in advanced,
-F
Dec 27 '06 #1
6 27263
sashi
1,754 Recognized Expert Top Contributor
Hi there,

I'm not sure if anyone here can help me but I'm pretty desperate at this point.

I've developed a web application that sends emails periodically. Everything works fine in the test environment (Visual Studio 2005's server emulator) but not when I publish it to the real IIS server. The IIS server is on the same machine that I am developing on.

After reviewing the Windows Event log I discovered that our WinSock firewall is preventing my application from sending emails. There is no way to turn off this firewall so I have to work around it.

Since the web-app works in the test environment, I'm sure there's a way to get it to work on the real server as well. I assumed that the test environment doesn't use the ASPNET user account; but instead uses the account credentials that I'm logged into while developing and so it has permissions to send emails. So I've tried to impersonate a user that has authority to send emails (by using the same account that I'm assuming is used in the testing environment) but only get the error:
"A socket operation encountered a dead network"

Could someone please point me in the right direction?
Is this error being caused by my WinSock Proxy Server?
How do I get around this?

Any help would be appreciated.
Thanks in advanced,
-F
Hi there,

According to Microsoft, this error (Error No. 10050) is caused an inactive network path. Kindly refer to below attached link for further reading & understanding, hope it helps. Good luck & Take care.

Windows Sockets Error Codes
Dec 28 '06 #2
Frinavale
9,735 Recognized Expert Moderator Expert
Hi there,

According to Microsoft, this error (Error No. 10050) is caused an inactive network path. Kindly refer to below attached link for further reading & understanding, hope it helps. Good luck & Take care.

Windows Sockets Error Codes
I had found that site before but didn't find it very useful. I'm not much of a networking person and don't know what measures I should take to fix the problem. The description that they give on that site is very vague:
Network is down.
A socket operation encountered a dead network. This could indicate a serious failure of the network system (that is, the protocol stack that the Windows Sockets DLL runs over), the network interface, or the local network itself.
Could you possibly help me understand how to go about fixing the problem?

I don't think its a serious failure of the network system because the whole network doesn't go down...I might not be understanding what this discription really means though.

I'm not sure how the network interface could suddenly encounter an error just when sending an email... I'm able to connect to the server and do other stuff on it...just not send an email.

The local network itself?


Thanks a lot for your help.

-F
Dec 28 '06 #3
sashi
1,754 Recognized Expert Top Contributor
I had found that site before but didn't find it very useful. I'm not much of a networking person and don't know what measures I should take to fix the problem. The description that they give on that site is very vague:


Could you possibly help me understand how to go about fixing the problem?

I don't think its a serious failure of the network system because the whole network doesn't go down...I might not be understanding what this discription really means though.

I'm not sure how the network interface could suddenly encounter an error just when sending an email... I'm able to connect to the server and do other stuff on it...just not send an email.

The local network itself?


Thanks a lot for your help.

-F
Hi there,

Which SMTP port number does you firewall use to send out mail? The default is port 25. Get your IS administrator to check on this.

What is the OS of you mail server? Firewall? Are the firewall and mail server running on the same machine? Please provide these details, i hope & wish to provide much better solution. Good luck & Take care.
Dec 29 '06 #4
Frinavale
9,735 Recognized Expert Moderator Expert
Hi there,

Which SMTP port number does you firewall use to send out mail? The default is port 25. Get your IS administrator to check on this.

What is the OS of you mail server? Firewall? Are the firewall and mail server running on the same machine? Please provide these details, i hope & wish to provide much better solution. Good luck & Take care.

The port that the SMTP uses is 26.

I'm not sure if the mail server has a firewall (I'm assuming it does) because its remote and hosted by someone else.

I hadn't changed any code dealing with sending emails, but yesterday I unexpectedly encounter a new error while running my web-application on the emulated server (provided by Visual Studio for testing these sorts of applications).. ..my application normally works perfectly (sends emails) on the test server.

The error was "Connection refused because because dictionary attack detected" (or something like that). I only saw it briefly and it disappeared after I re-published the site to see if I got that same error on the real IIS. When testing the site on the real IIS, I was not surprised to see the same old error I've been posting about.

I thought I was getting somewhere (even if it was magically because I haven't changed anything)...but I'm still stuck in the same place.

Thanks a lot for your help!

-F
Dec 29 '06 #5
sashi
1,754 Recognized Expert Top Contributor
The port that the SMTP uses is 26.

I'm not sure if the mail server has a firewall (I'm assuming it does) because its remote and hosted by someone else.

I hadn't changed any code dealing with sending emails, but yesterday I unexpectedly encounter a new error while running my web-application on the emulated server (provided by Visual Studio for testing these sorts of applications).. ..my application normally works perfectly (sends emails) on the test server.

The error was "Connection refused because because dictionary attack detected" (or something like that). I only saw it briefly and it disappeared after I re-published the site to see if I got that same error on the real IIS. When testing the site on the real IIS, I was not surprised to see the same old error I've been posting about.

I thought I was getting somewhere (even if it was magically because I haven't changed anything)...but I'm still stuck in the same place.

Thanks a lot for your help!

-F
Hi there,

Which OS is being used as firewall? I think this error have something to do with firewall inbound / outbound connection on TCP/UDP packets on port 26.

Are you on fixed IP address? Hope you IP is not blacklisted by your firewall, you need to ask you IS Administrator to check the the existing firewall rules, hope it helps. Good luck & Take care.
Dec 30 '06 #6
Frinavale
9,735 Recognized Expert Moderator Expert
Hi there,

Which OS is being used as firewall? I think this error have something to do with firewall inbound / outbound connection on TCP/UDP packets on port 26.

Are you on fixed IP address? Hope you IP is not blacklisted by your firewall, you need to ask you IS Administrator to check the the existing firewall rules, hope it helps. Good luck & Take care.
I don't think an OS is actually being used for the firewall. I'm connecting to a WinSock Proxy Server and have no idea how that thing works. I think this proxy, along with each individual user's Windows Firewall are being used for security.

I've made sure that my Windows firewall allows information to be passed port 26...and have even tried turning off the firewall.

I am going to try to port my web-application to a server that is outside of this proxy server.

If I still have problems I'll let you know.

You've been a great help!

-F
Jan 2 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2925
by: | last post by:
Hi all, I have a simple .aspx page running on net 2.0 that is trying to do a http post to a remote server. Here is the code Private Function ProcessRequests(ByVal strbody As String) As String Dim returnstr As String Dim URL As String = "http://www.dydomain.com/test.asp"
2
4146
by: Nuno Magalhaes | last post by:
I've got a simple problem I guess. How do I know when a connection is terminated without losing any data? I do something like the code below, but sometimes between socket.Receive and socket.Send I get the last chunk of data and am not able to retrieve it anymore cause the socket will be dead. Loop: { socket.Receive <----------- data arrives
0
2271
by: crescent_au | last post by:
Hi all, I am having problem with the file() function. In my code, I have file() function like this: $url = "http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=$frompcode&Destination_Postcode=$topcode&Country=AU&Weight=$sweight&Service_Type=STANDARD&Height=$sheight&Width=$swidth&Length=$slength&Quantity=$shipping_num_boxes"; $myfile = file($url); when I run my file in localhost, I get the following:
4
24175
by: Rollasoc | last post by:
Hi, We have a range of four products that can talk to our software (Written in C# & managed C++) via ethernet. Using standard socket class. This has all been working fine for a long time now, under DotNet 1.1. We have now converted the project to DotNet 2.0 Unfortunetely, the code no longer works for one of the products. The
11
4568
by: weird0 | last post by:
I am a beginner to socket programming to in c#. I know the concepts as to how to program them. I get the above exception when i tried writing the code for the server side on the line tcpListener.Start() when i passed the localhost ip and port no. 4000: Please help... namespace Server { class Server
3
6195
by: Don Hanlen | last post by:
IDLE internal error in runcode() Traceback (most recent call last): File "C:\PYTHON25\lib\idlelib\rpc.py", line 235, in asyncqueue self.putmessage((seq, request)) File "C:\PYTHON25\lib\idlelib\rpc.py", line 332, in putmessage n = self.sock.send(s) error: (10035, 'The socket operation could not complete without blocking') Does this look familiar to anyone? I can't figure out what to do
2
4253
by: Nick Toop | last post by:
Hi, I have a Java application which runs a server socket on a PC. Various sensors (using microprocessors) can call it up and each gets its own thread running the socket connection. The sensors send in data at random times. This all works OK. Sometimes one of the sensors fails or goes off-line. How can I tell from the server end? If they fail I would like to close the link down.
4
6726
by: aMerkert17 | last post by:
I'm trying to write a Silverlight client that communicates with a server on a virtual machine over sockets. The service works as expected for several minutes before throwing the following exception: "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full" I can't figure out what it is I'm doing that depleting resources. ... while (true) { ...
0
8176
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8120
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8620
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
8571
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
8265
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,...
1
6085
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
4048
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...
1
2560
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1705
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.