This is quite interesting to know that who is accessing your shared folder in network. We can easily get the information of that user and even you can track what is the activity he is doing in your system. We can achieve this using WMI (Windows Management Instrumentation) and MQL ( Management Query Language ) .
For using WMI you need to add one DLL called System.Management.dll and add the namespace as
[sourcecode language="csharp"]
using System.Management
[/sourcecode]
Now Read the current Session of your system.
[sourcecode language="csharp"]
private void Read_Current_Session()
{
try
{
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\CIMV2",
"SELECT * FROM Win32_ServerConnection");
foreach (ManagementObject queryObj in searcher.Get())
{
String RemoteIPAddress = queryObj["ComputerName"].ToString();
String RemoteUserName = queryObj["UserName"].ToString();
String RemoteActiveTime = queryObj["ActiveTime"].ToString();
}
}
catch (ManagementException e)
{
MessageBox.Show("WMI Error: " + e.Message);
}
}
[/sourcecode]
Few Years back I have developed one Open Source Tool (NetSpY) based on WMI and MQL. NetSpy (NetWorkSpy) is an Small Windows based application which will continiouly monitor your shared folder in the network and will generate the complete log of the accessing user activities. This can show you the immidiate popup message that who is accessing right now.
If you are interested please have a look over here,
Net Spy: Your Network Spy That Monitor Your System In Network And Generate Log For Any Changes
skip to main |
skip to sidebar
RSS Feeds
Abhijit's World of .NET Blog
Wednesday, October 21, 2009
Monday, October 19, 2009
Beginners Guide’s to ASP.NET MVC Framework – Part 1 of n
CodeProject
This article describes overview of ASP.NET MVC Framework , MVC Control Flow etc.
This article is the Part 1 of the ASP.NET MVC Framework series. In this article I have describes very basic over view of MVC Framework and the control flow of MVC. I will write a few articles in this series which will help all the beginners to move ahead. This article is only about what MVC is.
The Model-View-Controller (MVC) design pattern is an architectural design patterns for any standard development that separates the components of an application. This allows application to handle very flexible and extensible and easy to handle. ASP.NET MVC Framework is also one of the standard web development frameworks which separate the components of web development application different components.
ASP.NET MVC Framework having three main components
Model: The model manages the behavior and data of the application domain, responds to requests for information about its state from the view, and responds to instructions to change state (usually from the controller).
View: This represent the presentation layer of the web application. The view manages the display of information based on the data of model that is requested by controller.
Controller: Controller handles the user interaction with the web application. User request comes through controller to model and manipulate the records from it and then render the data using View to UI.
Below diagram showing the overview of these three components
Above picture showing you the actual flow of ASP.NET MVP Framework. Request comes from client to Controller and controller decided which model to used and based on that data rendered into browser.
Now, just have a closer look into to the MVC Flow,
In the next article I will give the explanation of each of every step. You just need to remember these are the basic flow of an MVC Application.
MVC is not a replacement if ASP.NET Web Form based development. This seats on the top of ASP.NET Development. MVC Framework simply divides the overall application architecture into three components.
For More information on the basic of MVC Framework please read :
ASP.NET MVC Overview (C#)
This is the startup article for MVC beginners. Many more to come. Where I will explain details of each of them with sample application. Finally there would be a complete ASP.NET project on MVC Framework. Hope this series will be helpful for all.
This article describes overview of ASP.NET MVC Framework , MVC Control Flow etc.
This article is the Part 1 of the ASP.NET MVC Framework series. In this article I have describes very basic over view of MVC Framework and the control flow of MVC. I will write a few articles in this series which will help all the beginners to move ahead. This article is only about what MVC is.
Overview
The Model-View-Controller (MVC) design pattern is an architectural design patterns for any standard development that separates the components of an application. This allows application to handle very flexible and extensible and easy to handle. ASP.NET MVC Framework is also one of the standard web development frameworks which separate the components of web development application different components.
ASP.NET MVC Framework having three main components
- Model
- View
- Controller
Model: The model manages the behavior and data of the application domain, responds to requests for information about its state from the view, and responds to instructions to change state (usually from the controller).
View: This represent the presentation layer of the web application. The view manages the display of information based on the data of model that is requested by controller.
Controller: Controller handles the user interaction with the web application. User request comes through controller to model and manipulate the records from it and then render the data using View to UI.
Below diagram showing the overview of these three components
Request Flow for ASP.NET MVC Framework
- Request comes from User to Controller
- Controller processes request and forms a data Model
- Model is passed to View
- View transforms Model into appropriate output format
- Response is rendered to Browser
Above picture showing you the actual flow of ASP.NET MVP Framework. Request comes from client to Controller and controller decided which model to used and based on that data rendered into browser.
Now, just have a closer look into to the MVC Flow,
In the next article I will give the explanation of each of every step. You just need to remember these are the basic flow of an MVC Application.
ASP.NET Web Forms and MVC
MVC is not a replacement if ASP.NET Web Form based development. This seats on the top of ASP.NET Development. MVC Framework simply divides the overall application architecture into three components.
For More information on the basic of MVC Framework please read :
ASP.NET MVC Overview (C#)
Summary
This is the startup article for MVC beginners. Many more to come. Where I will explain details of each of them with sample application. Finally there would be a complete ASP.NET project on MVC Framework. Hope this series will be helpful for all.
Labels:
.NET,
ASP.Net,
C# 4.0,
codeproject,
MVC,
MVC Framework
Saturday, October 10, 2009
Using Bookmark in Visual Studio
CodeProject
As name suggests, bookmarking speedup your code navigation in visual studio. There may be some portion of code where we need to move very frequently. Generally we scroll the page and move to that section, but Visual studio provides great features by which we can move to a particular section very quickly using some shortcut keys. This is called Bookmarking of Code.
Below are the set of Icons which are used to navigate the code using Bookmark.
We can place the bookmark by clicking on Bookmark icon or using keys
Now we can easily navigate among those breakpoint using
This is very much easy to use and its give you very fast navigation throughout the code.
Visual Studio provides you Bookmark window where you can get list of all bookmarked section.
Now, by selecting particular bookmark from the Bookmarks list we can easily move to the particular section.
For easy reference we can also rename bookmark so that we can easily identify them. This helps us to easily move to particular code block based on the name given. This is useful when we are having many bookmarks in the bookmark list.
As I have renamed my bookmark list as below
This may not be new to many of us, but it may helpful for some beginners. Using this features we can navingate our code very easily. Please provide your valuable suggestion and feedback.
Introduction
As name suggests, bookmarking speedup your code navigation in visual studio. There may be some portion of code where we need to move very frequently. Generally we scroll the page and move to that section, but Visual studio provides great features by which we can move to a particular section very quickly using some shortcut keys. This is called Bookmarking of Code.
Below are the set of Icons which are used to navigate the code using Bookmark.
How To Use
We can place the bookmark by clicking on Bookmark icon or using keys
Ctrl + K, Ctrl + K.
Below is the sample code where I have putted two bookmarks in different section of code.Now we can easily navigate among those breakpoint using
Ctrl + K, Ctrl + N
for Next Bookmark and Ctrl + K , Ctrl + p
for Previous mark. We can achieve the same using following toolbar icon.This is very much easy to use and its give you very fast navigation throughout the code.
Using Bookmark Window:
Visual Studio provides you Bookmark window where you can get list of all bookmarked section.
Now, by selecting particular bookmark from the Bookmarks list we can easily move to the particular section.
Renaming BookMarks
For easy reference we can also rename bookmark so that we can easily identify them. This helps us to easily move to particular code block based on the name given. This is useful when we are having many bookmarks in the bookmark list.
As I have renamed my bookmark list as below
Summary
This may not be new to many of us, but it may helpful for some beginners. Using this features we can navingate our code very easily. Please provide your valuable suggestion and feedback.
Labels:
General,
My Articles
Labels
- .NET (1)
- .NET 4.0 (10)
- ASP.Net (2)
- ASP.NET (12)
- asp.net 4.0 (2)
- ASP.NET 4.0 (1)
- Awards (2)
- C# (8)
- C# 4.0 (3)
- code (1)
- codeproject (5)
- Debugging (2)
- Enterprise Library 4.1 (1)
- General (21)
- IIS (1)
- IntelliTrace (2)
- Microsoft ASP.NET Web Site (4)
- MSDN (1)
- Multithreaded Debugging (1)
- MVC (1)
- MVC Framework (1)
- MVP (3)
- My Articles (15)
- Parallel Debugging (1)
- RenderingMode (1)
- SQL Server 2005 (6)
- VideoTutorial (1)
- View State (1)
- Visual Studio 2010 (9)
- VS 2010 (1)
- VSX (1)
- Web Services (1)
- WPF (1)
ASP.NET Books
Copyright 2009
Abhijit's Blog. Powered by Blogger
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5