Theomax
Theomax

Reputation: 6792

How to fix System.Net.Sockets.SocketException

I'm working on an ASP.NET MVC website, it has been installed on three different servers (the same code version), it works on two of the servers i.e the user can login, but on one server after the user has submitted their username and password, the following server error is displayed in the browser:

Security Exception

System.Security.SecurityException: Token not found

The event viewer for the environment the error is occuring on shows the following two error messages at the point where th euser attempts to login:

Could not init pool.
System.Net.Sockets.SocketException (0x80004005): 
A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because 
connected host has failed to respond (server ip address)

And this error:

Error: System.Security.SecurityException: Token not found

Which is the server error displayed in the browser. This has in the past been resolved by deleting an authentication cookie, but that doesn't work for this error.

I have tried setting the trust level in the web.config to full which didn't work. I have tried restarting IIS.

Has anyone else come accross a similar problem? Could this problem be caused because a service of some kind isn't running? Any suggestions will be appreciated.

Upvotes: 7

Views: 120253

Answers (3)

Ajay Munugala
Ajay Munugala

Reputation: 1

We were getting this error when one of a third party API hosted on of our server(Azure) was not able to communicate with one of our web services on a different machine(iNetU). Options were to open ports so that these machines could talk or to move the web service to the machine hosting the third party API.

Upvotes: 0

Raj Kumar - rajkrs
Raj Kumar - rajkrs

Reputation: 1363

I was getting 0x80004005 & The requested name is valid, but no data of the requested type was found. My complete error

Check You have proper internet connection are there on your machine or not. And you are able to ping the remote server or not. I solved by checking both.

Upvotes: 0

Sharon Harvey
Sharon Harvey

Reputation: 136

Most of the time these are connectivity timeouts due to different IP protocols (IPV4/IPV6) between the two server/computers trying to communicate or extra authentication rules setup on one of the computers for outgoing or incoming connectivity. Ways to troubleshoot the issue:

  1. Review IIS logs
  2. Review EventLogs
  3. Try adjusting TCP/IP parameters in the registry to increase the time allowed to connect

http://msdn.microsoft.com/en-us/library/aa560610(d=printer,v=bts.20).aspx

Even though the above article references Windows 2003, I've discovered it applies to some 2008 environments.

Upvotes: 7

Related Questions