.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

C# SocketException was unhandled - Chat Server

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :.NET Framework
 

Hello all,

I have got a huge problem with my chat program. Below you can find the code where I got a error. There are no errors in the code or with compiling. But only when the program is running and going to that peace...

Some extra information:

ipAddress is set when you press the button "start listening". The Ip Address that you fill in in a textbox, is set in ipAddress.

Here my error:

System.Net.Sockets.SocketException was unhandled
 Message="Het aangevraagde adres is niet geldig in de context van het adres"
 Source="System"
 ErrorCode=10049
 NativeErrorCode=10049
 StackTrace:
    bij System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
    bij System.Net.Sockets.Socket.Bind(EndPoint localEP)
    bij System.Net.Sockets.TcpListener.Start(Int32 backlog)
    bij Chat_Server.Chatserver.StartListening() in C:\Users\Pascal Griep\Documents\Visual Studio 2008\OwnProjects\Chat Server\Chat Server\ChatServer.cs:regel 190
    bij Chat_Server.Form1.btnListen_Click(Object sender, EventArgs e) in C:\Users\Pascal Griep\Documents\Visual Studio 2008\OwnProjects\Chat Server\Chat Server\Form1.cs:regel 34
    bij System.Windows.Forms.Co


View Complete Post


More Related Resource Links

An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll

  
Additional information: 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 respondThis error occurs when i was executing a vc++.net program implementing ICMP....Error occurs when executing this statement... iRet=st->ReceiveFrom(RecvByte,RecvByte->Length,SocketFlags::None,&senderRemote);How to solve this problem????

Unhandled exception when installing SQL Server 2008 R2

  
I tried to download SQL Server 2008 R2 Express it ran for about 30 minutes and then gave a Net Framework error stating that "an Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue....." Once I clicked Continue and it did continue to run and then brought up an info screen with no semblance of the download having worked. I had successfully installed SQL Server 2005 Express previously. I uninstalled it along with the Studio Manager. Do I need to uninstall .NET Framework 3.5 SP1 and  .NET Framework 4 Client Profile which are still currently installed before I can install 2008? 

CommunicationException was unhandled by user code;The remote server returned an error: NotFound

  
Hi ,

Getting an err :CommunicationException was unhandled by user code;The remote server returned an error: NotFound.

scenario:

1. we are sending large amount of data from Silverlight client to wcf svc and storing in DB.
2. when the data size is less its working fine.
3. But when we send large data we get an err like

CommunicationException was unhandled by user code

The remote server returned an error: NotFound

4. we also increased the Buffer Sizes in the binding part in the config files.


most of the google results , forums are saying to increase the Buffer Sizes, but still we face the same proble.


Any clues on how to overcome this err will be a gr8 help!

Thanks
Senthil

http://dotnetcrunch.blogspot.com


Gmail internal chat like message box

  
This article provides you with the multi-functional message box window through which the usability of the web-site or any web application increases.

Features
.Configurable MessageBox window with AJAX Support
.can set maximum number of message boxes to be visible
.can define the auto reload time, for single message, for all messages or no reload
.can create messages through a single function call
.can define auto hide time for each messages

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

  
In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.


jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

  
If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

call JavaScript - jQuery code from ASP.NET Server-Side

  
jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

  
We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

CLR Integration With Microsoft SQL Server

  
Transact-SQL provides as much flexibility as possible but, because it is not a real programming language, it has some shortcomings about many issues (memory management, exception handling, debugging, file processing (or streaming), object-orientation (classes), or thread management). Transact-SQL also lacks features of normal libraries (arrays, collections, serialization, expressions, or string manipulations, etc).

IP Address Blocking or Restriction in SQL Server

  
"is it possible to block connections to SQL Server based on IP address". As far as now there is no official way in SQL Server to block the connections in SQL Server based on IP address. However this can be done from the OS end, we have the following three options available, refer HERE for more.


.Firewall
.IPSec
.RRAS IP Filter

Determine whether Forms Server is installed on a server

  
Check whether the Microsoft.Office.InfoPath.Server.dll and FormServer.aspx files are installed on the server.

Connestion string create any database server

  
This links important to how to create connection string to any data base sever.

SQL Server Database Transaction

  
A transaction is a group of SQL commands executed together as a single component of work to be accomplished. If all of these commands succeed, then a transaction is committed - the changes to the data are made final. If any of the commands within a transaction fail, then the entire transaction is cancelled, or in SQL Server terms, the transaction will be rolled back.

Transactions are one of the things that keep your data safe, but they're not necessarily easy to understand. Here's some help:

SQL Server Backup and Restore (video)

  
Restore your full backup, then run a few queries before you keep restoring transaction logs. Brent shows how to use the Standby option for restores.

In this five minute video, Brent demonstrates how to do it by creating a database, populating data, and then showing what disaster recovery is like by doing RESTORE WITH STANDBY.

SQL Server 2005 Try and Catch Exception Handling

  
I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend