473,383 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

A socket operation encountered a dead network

Frinavale
9,735 Expert Mod 8TB
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 27229
sashi
1,754 Expert 1GB
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 Expert Mod 8TB
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 Expert 1GB
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 Expert Mod 8TB
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 Expert 1GB
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 Expert Mod 8TB
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
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...
2
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...
0
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 =...
4
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,...
11
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...
3
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...
2
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...
4
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:...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.