A socket operation encountered a dead network

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    A socket operation encountered a dead network

    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
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Originally posted by Frinavale
    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

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by sashi
      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

      Comment

      • sashi
        Recognized Expert Top Contributor
        • Jun 2006
        • 1749

        #4
        Originally posted by Frinavale
        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.

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by sashi
          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

          Comment

          • sashi
            Recognized Expert Top Contributor
            • Jun 2006
            • 1749

            #6
            Originally posted by Frinavale
            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.

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Originally posted by sashi
              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

              Comment

              Working...