Unhandled Exception: System.Net.SocketException

Periodically I receive the following exception: System.Net.SocketException: An existing connection was forcibly closed by the remote host.  After I receive the exception the Cassini application will not serve another page.  Can someone please tell me what may be causing the exception and if possible is there some way to recover from the exception.  Any help is greatly appreciated.

Sean Gahan
9/17/2004 6:20:10 PM
asp.net.cassini-web-server 484 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 32

Are you getting this message from the server itself or from the client(browser)?

Dave Legg
Dave Legg
9/17/2004 6:57:10 PM
I compiled the Cassini project and added a console appliation for the interface.  The Console application (Cassini) is reporting the exception.

Sean Gahan
9/17/2004 7:55:42 PM

This is what I did to fix this problem.. (it is not elegant)

private void OnSocketAccept(Object acceptedSocket) {
> try {
Connection conn = new Connection(this, (Socket)acceptedSocket);
> }
> catch {
> }

Wrapped a try/catch around the offending command.. it happens infrequently, the code
goes back.. waits 100ms gets another socket and eveything is fine..
Quick fixes are Always FREE...
1/6/2005 1:19:26 AM

Similar Artilces:

Exception while calling .NET web service | System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Hi,   We have written a .NET web service which retrieves an xml file from the database. This web service is SSL secured and requires client certificates for connection.   Problem: The web service is throwing an exception while retrieving large files. It works fine when the file size is around 1 MB, but fails with a file size of around 65 MB with the following exception: System.InvalidOperationException: There is an error in XML document (1, 38455668). ---> System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: ...

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
I'm getting this error when hitting a webservice thousands of times for a mass upload. I've researched on the web and added the suggested code but am still getting the error: protected override WebRequest GetWebRequest(Uri uri) { System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri); webRequest.KeepAlive = false; return webRequest; }  Are you receiving it on the client, or on the service?John Saunders | MVP – Connected System Developer...

System.NET.Mail cannot communicate to relay server through my .net server relay config
Environment: My PC – I’m testing the code from ServerA in debug mode using VS 2005 ServerA – my .Net Code server in which the code I’m testing resides and is running .NET version 2.0.50727 ServerB – An exchange server on our network   Problem & Info: I get this error no matter if I specify the exchange servername or my .net servername.  I want to use ServerB as the relay server in my System.NET.Mail but when I try that or try just using ServerA’s plain SMTP.  I've used the exchange server fine in other applications from other servers for my code so not sure why it'...

When runnig Web Service asynchronously
When I try to call web service asynchronousIy I am getting exception from CLR: System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced. (During VS.NET debugging the exception is wrapped as: Unable to connect to the remote server) When i call the service synchronously it works perfectly.  The service just convert strings to lower case. I'm using .NET Framework 2.0, here is the source code of form to call the service asynchronously:   Imports localhost Partial Class ChangeStrings Inherits System.Web.UI....

Is my web server 32bit .net or 64bit .net?
If I want to call some .net library to find out what version of .net I'm running, any suggestions on which call to make?Peter Kellnerhttp://73rdstreet.com and blogging athttp://PeterKellner.netMVP, ASP.NET Hi, Would this work for you: http://www.hanselman.com/blog/ProgrammaticallyDetermineWhatVersionOfASPNETYoureRunning.aspxDon't forget to click "Mark as Answer" on the post that helped you. this post does not tell me 32 or 64.Peter Kellnerhttp://73rdstreet.com and blogging athttp://PeterKellner.netMVP, ASP.NET I don't know of any assembly that will tell you that....

System.Net.Sockets.SocketException with MySQL Connector.NET
Hi. I already tried many things and spent already 2 days without any success. Please help or I'll hang myself.I am using MySql.Data.dll  ver. (runtime v2.0.50727) from my project (library). It works great if i use it from WindowsApplication but once i use it same way in WebApplication, it keeps throwing: The attempted operation is not supported for the type of object referencedException Details: System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced .. AsyncResult ias = socket.BeginConnect(endPoint, null, null);.. (or w...

Converting System.Exception to System.Web.HttpCompileException in global.asax Application_Error
Hello.  I am capturing an exception in the above event handler using Server.GetLastError().  I would like to access the Results and SourceCode properties of an inner exception of type System.Web.HttpCompileException, but cannot do so, and am unable to implicitly convert a general exception to System.Web.HttpCompileException.  Any ideas?  Thank you in advance, Chris. Solved my own problem via the following code.  Feeling kind of embarrassed over the simple fix. if (lastErr.InnerException.GetType().ToString() == "System.Web.HttpCompileException") { ...

Using the Cassini Web Server for .net
I've donwloaded the cassini.exe file for the cassini web server that I want to use with asp.net and WebMatrix editor. But I cannot see the files-executable to get it going. What is the scenario after downloading the .exe? Chum If you press F5 from WebMatrix, it should launch automatically.Bertrand----This posting is provided "AS IS" with no warranties, and confers no rights....

Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the Web Deve
I installed Visual Studio .NET 2003 on Windows Vista Home Premuim, but I'm unable to select "Web Development" item from "Server Components" during the installation. I installed all the pre-requisits but I can not see Front Page Server Extention in the programs. I can see also the IIS. Appreciate if any one can guide me with the solution.   Thanks.   FPSE is not included with Vista, it's a separate download.  See www.iis.net for this. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. Tha...

System.Exception: System.Web.HttpException: The transport failed to connect to the server. System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.
I have an application which creates about 50 XML packages and sends a notification about the success/failure of every package. I am running this code in threads and I have restricted maximum no. of threads that can be active at any time to 2.So the package generation and the notification would be performed for 2 packages in parallal. But while sending notifications to users, I am getting the below error only for very few packages[ 1 or 2 out of 50] . The same base code is used by all the packages but i am getting this error intermittently. System.Exception: Error sending mail to [So...

Bits of a .NET 1 web app crash on a server running both .NET 1 and 2
We have a a win2003 server with running mostly .NET 2 web applications but one .NET 1 project. We quickly realised after initial upload of the .NET 1 application that the two versions of .NET would have to run in separate application pools. So I set one up called DOTNET1, assigned my app to it and everything seemed to run swimmingly.  Then yesterday a client rang up to say that a single page of the site wasn't working, although the rest seemed fine when I checked. Then today they rang up again and said a different page wasn't working. Both times it showed me an page sugges...

Help for Visual web dev isolate system.web.mail to system.net.mail
Hi all,  I'm new user to visual web developer express software. Laterly i found this application isolate quite some of the component namespace, like system.web.mail to net.mail. I not well understand how system.net.mail functional?? Does it act same as system.web.mail?? My coding below: change system.web.mail to system.net.mail which causing a lot error... *****Can anybody correct me or advise me how to make this code work in system.net.mail?????? <%@import Namespace="System.net.Mail" %> <script runat="server">    Public FromAddress As String = "" .......

Difference from System.Web and System.Net
Excuse me, could anyone explain me a concept of the differnce between System.Web and System.Net? And how to use two of these? Thank you, Aom I believe you are on the wrong mailing list! On 2014-06-26, 5:49 AM, Alonze wrote: > Excuse me, could anyone explain me a concept of the differnce between System.Web and System.Net? > And how to use two of these? > > > Thank you, > > Aom > > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Exception Details: System.Net.WebException: The remote name could not be resolved: 'www.webservicex.net'
Hi , i gota error weni sued webservice the exception details is given as subject and here a giving the code i hav written i am beginner so pls help me out in this public partial class Weather : System.Web.UI.Page {string City; string Country;StockQuote stock = new StockQuote();  GlobalWeather oObj = new GlobalWeather();   string var;protected void Page_Load(object sender, EventArgs e) {       }protected void btnGo_Click(object sender, EventArgs e) {  var= stock.GetQuote("GVK");this.Response.Write("myQuote='" + var ...

------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Upgrading Sharepoint server with many net v1.1 web parts to net v3.5. Any advice, caveats?
Folks,I have been asked to upgrade the framwwork version of a server from v1.1 to v3.5. The server has a sharepoint 2003 instance with many v1.1 web parts.Can anyone give me some advice about what to watch out for etc in terms of the existing web parts on the server, and the affect of the framework upgrade on them. I cannot find too much material online. RegardsK ...

System.web.mail to System.net.mail
I converted a asp.net web app from VS 2003 to VS 2005. i now get error message when i build it  stating system.web.mail  is obsolute,  use system.net.mail i redefine to system.net.mail but now i get other error message such as smtpMail does not exist in the current context. cannot implicitly convert type string to System.Net.Mail.MailAddress   so System.Web.Mail want work in ASP.net web app convert to VS 2005 running on framework 2.0?           because if i change to System.Net.Mail  i am ...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses asp.net 1.1, i also have a new app that use ASP.net 2.0.  how can i set my new .NET 2.0 app to point to asp.net 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K which has IIS 5.0.  I do not see any default websites/virtual directories/ or any type of ASP.NET tab.  I just dont' know how to get my program to run using .NET framework 2.0. On win2k it is a mess sometimes to get this working, well first install .net framework 2.0 on the server, then see if iis mappings are correct. publish the website and then right click properties->select 2.0. from the dropdown.  Please Mark Post that helped you as answer, also include a summary of what solved the problem as it helps others in similar situations...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

What good is the file system web server in VS.NET 2005 if your database is on a remote box?
What's confusing about the new way of developing ASP .NET 2.0 apps is that if you are developing it on your local filesystem, and while the special local web server lets you run your code as if it were running on an IIS installation, what happens if your app needs to do queries against a database that's on a remote box, one that is not even on your network?In this case, how do you setup your project? Using HTTP and IIS I would imagine? And if doing this, the debugging feature will handle the debugging remotely? I maintain my own Web site as local file system Web with connection to remote S...

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
The following class throws an excpetion that is handled by Utilities.LogError(Ex) which in turn gives me the error with regards to send mail. However I am trying to figure out why is ExecuteSelectCommand() throwing an exception to begin with. Any help is very appreciated. I have attached the stack trace to get a better insight. Also I am a noob when it comes to oop, asp.net etc. Apologise is this is too silly a question. Thanks  :)public static DataTable ExecuteSelectCommand(DbCommand command) { //The DataTable to be returnedDataTable table; //Execute the command making sure the...

[:'(] system.net.mail with Exchange Server
Dear all,  I have been fighing this since this morning, somebody please help!! Here's my code, I get emailMessage.DeliveryNotificationOptions = 0 it goes to Catch block but all of the exceptions has this error ex.InnerException.InnerException' is not declared or the module containing it is not loaded in the debugging session. We are using Exchange Server 2003 SP2. 1 Dim emailMessage As MailMessage = New MailMessage() 2 Dim arRecipients() As String 3 Dim i As Integer 4 5 emailMessage.From = New MailAddress("email@domain.com") 6 ...

Error:Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio .NET setup and add the We
Hi, I installed the IIS 5.0 after VS.Net 2003 (1.1). after that I did run the aspnet_regiis -i at the visual studio command prompt. I am able to run local web application created on my PC. But when I tried to copy an web application created at shared PC into the wwwroot folder, I get the following error while trying to open the project in VS.Net. I've created the virtual directory for the project and also set the integrated windows authentication under the directory security tab in the IIS. Please help me resolving the problem. Thank You.   Do you have FrontPage Server Ext...

Web resources about - Unhandled Exception: System.Net.SocketException - asp.net.cassini-web-server

Singularity RDK - Source Code
Experimental verified OS


Issues - gdata-java-client - Google Data Java Client Library - Google Project Hosting
My favorites ▼ - Sign in gdata-java-client Google Data Java Client Library Project Home Downloads Wiki Issues Source New issue Search Search ...

Some of the incredible MINECON panels didn’t make it on the livestream due to time constraints. As of right now, they have all been uploaded ...

Java™ SE Development Kit 7 Update 40 Bug Fixes
Java™ SE Development Kit 7 Update 40 Bug Fixes

Syncplicity Installation fails with error code 0x80004005 – Support Home
Symptoms : 1. The Syncplicity installation never starts. 2. The Syncplicity.log file should have the matching error code: Unregistered, Syncplicity ...

Understanding and resolving app crashes and failures in Windows Store apps, part 2: JSON and tiles
... Exception type: System.Net.WebException Message: Unable to connect to the remote server InnerException: System.Net.Sockets.SocketException, ...

The Mono-list 2003-October Archive by Subject
2003-October Archives by Subject Messages sorted by: [ thread ] [ author ] [ date ] More info on this list... Starting: Wed Oct 1 00:04:11 2003 ...

jdk6/jdk6/jdk: log
log graph tags bookmarks branches changeset browse bz2 zip gz help OpenJDK / jdk6 / jdk6 / jdk log Find changesets by keywords (author, files, ...

RSA private key import from PEM format in C#
First of all, I want to apologies for not writing. From one hand, this is not a good think for me to disappeared from development community horizons, ...

Resources last updated: 3/9/2016 5:39:12 AM