473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Central point to check for LAN disconnection in .NET

Hello,

We have an application that use data from our sql server.

We access this information trough TableAdapters, direct queries and
datacontextS (LINQ).

All these methods use the same CONNECTION STRING located on the application
settings.

We don't explicitly open or close connections on these objects as we let the
connection pool do the work.

The problem is that we have a lot of portable computers and external
workers, and they lost connection when they unplug their computers or the
remote connection fails.

Is there any way to control FROM A CENTRAL POINT (event) when the connection
is lost?

I was thinking if the connection pool have such an event, or similar.

I don't want to use a timer that "pings" the server: this seems to me kind
of ugly.

Thanks,
--
Roger Tranchez
MCTS
..NET and DB developer

Jul 8 '08 #1
2 1136
Hello Roger,

If I understand your request correctly, you meant to get notified of the
network connection change event without manually polling the network status.

" NetworkChange.N etworkAvailabil ityChanged" should be a useful event for
this scenario. It¡¯s triggered when the availability of the network changes.
The network is available when at least one network interface is marked "up"
and is not a tunnel or loopback interface.

NetworkChange.N etworkAvailabil ityChanged Event
http://msdn.microsoft.com/en-us/libr...tychanged.aspx

#NetworkChange Class
http://msdn.microsoft.com/en-us/syst...orkchange.aspx

#NetworkAvailab ilityChangedEve ntHandler Delegate
http://msdn.microsoft.com/en-us/syst...nthandler.aspx

#System.Net.Net workInformation Namespace
http://msdn.microsoft.com/en-us/syst...formation.aspx

Please let me know if you have any other concerns, or need anything else.

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove ¡®online.¡¯)
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

"Roger Tranchez" <ru*****@commun ity.nospamwrote in message
news:6E******** *************** ***********@mic rosoft.com...
Hello,

We have an application that use data from our sql server.

We access this information trough TableAdapters, direct queries and
datacontextS (LINQ).

All these methods use the same CONNECTION STRING located on the
application
settings.

We don't explicitly open or close connections on these objects as we let
the
connection pool do the work.

The problem is that we have a lot of portable computers and external
workers, and they lost connection when they unplug their computers or the
remote connection fails.

Is there any way to control FROM A CENTRAL POINT (event) when the
connection
is lost?

I was thinking if the connection pool have such an event, or similar.

I don't want to use a timer that "pings" the server: this seems to me kind
of ugly.

Thanks,
--
Roger Tranchez
MCTS
.NET and DB developer

Jul 9 '08 #2
Hello Roger,

I am writing to check the status of the issue on your side. Would you mind
letting me know the result of the suggestions? If you need further
assistance, feel free to let me know. I will be more than happy to be of
assistance.

Have a great day!

Regards,
Jialiang Ge (ji****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== ====
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=============== =============== =============== ====

Jul 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1907
by: Ray Lavelle | last post by:
I have an application which runs in many different stores. Stores that are within a chain want to be able to share their client lists. I want to implement a sync process where each application would ping a central server every 5-10 mins to check for changes made by any other store to the client list, if any changes are made it would download the new or modified clients then upload any clients that were modified localy. I want the stores...
9
2129
by: Heather | last post by:
I have created a database application consisting of a front end and backend file. Data entry and administration of the application are done at a central location. The next requirement is to be able to distribute the appllication each month to five remote sites by sending the sites a CD. The sites will only use the application to lookup data in the database and print reports. The sites will make no data entry. I need comments and suggestions...
7
2431
by: PC Datasheet | last post by:
Looking for suggestions ---- A database was designed for a national automobile inspection program. In it's simplest form, the database has two tables: TblOwner OwnerID <Year/Make/Model owned by owner, Owner name/address, etc) TblInspection InspectionID
5
2078
by: Hubert Hermanutz | last post by:
Hi, as yet i have readed in the MSDN about exception handling. The only references that i was founded, described try, catch, finally and throw objects. But I am searching about an occation to catch exceptions central, maybe, the framework call a central function of each class, when there is throw a exception. The reason is, that i do not need try, catch... blocks and therefore the sourcecode will be going to unreadable.
5
16947
by: Vijay | last post by:
Hi all, i have TCP client server application written in C# using async socket methods, eg BeginReceive(), BeginEnd() etc server is continuesly running in the background, client connect to server and recives data from server. If server application shuts down client immedeatly recieves disconnection or exception, but im not able to detect if some body removed network cable of node , where server is running. Client continuesly waits for...
1
1738
by: Mainak Sarcar | last post by:
Hi, I am writing an terminal app that would allow you to connect to POP3 server and receive mail data in raw format. Now the POP3 server expects a graceful disconnection by sending a "quit\r\n" command to it. The server then replies you with a "+OK ... Goodbye" message. Now I have a code as follows for the disconnect button:--- <pre> private void btnDisconnect_Click(object sender, System.EventArgs e) { if (serverSock != null)
1
1948
by: rolandsun | last post by:
we are designing a data collecting system, at each site we have a database and have a central database,we will write data to site's database, we want the site-database can publish the data to central-database Asynchronously, how could we do that? single replication sounds work,but it will replicate all update ,including delete ,we dont want that,we want only inserted data .
0
1255
by: myprotein | last post by:
if "all applications disconnection" is anathor tigger of page cleaner? hi all I discovered that when all application disconnect from the database, db2 will "truncate" current active log file and push forward a new log file either by reusing a exist log or by generating a new log file. when anather application get connected to current database, execute "db2 get db cfg for xxxxx", u should see that the first active log is just the file...
0
2171
by: kakamunnababloo | last post by:
Hi, I am trying to install WSS 3.0 on win2k8. Installation went successfull but when i browse Sharepoint central admin site from IIS Following error encountered: http://localhost:17012 This service is unavailable Error code 503 I noticed that whenever i browse Sharepoint central admin site, in application pool it autmatically stopped working. Can anyone have any clue why Sharepoint central admin pool getting stoped automatically...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.