<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1793938015693798312</id><updated>2011-12-23T19:20:16.048+05:00</updated><category term='C#'/><category term='progaming'/><category term='techbreeds'/><category term='java'/><category term='c++'/><category term='html'/><category term='free codes'/><category term='coding'/><category term='c'/><title type='text'>techbreeds</title><subtitle type='html'>Techbreeds is about free programming material and programming tutorials for programmers and IT professionals, on this blog you will find many helpful and easy learning projects by different IT professionals. We will really appreciate those friends and IT professionals who send there Stuff on this blog that they think, may help other professionals and specially beneficial for students.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3944340025643201386</id><published>2011-12-23T12:24:00.001+05:00</published><updated>2011-12-23T12:26:34.143+05:00</updated><title type='text'>Using UAC with C#</title><content type='html'>&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;User Account Control (UAC) is a new technology introduced by Microsoft in Windows Vista and most of the time it is misunderstood by users and developers. It’s main purpose is to protect the operating system by running applications with reduced privileges.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;Why should we use this? Most applications DO NOT require full privileges. Think to the applications you have written and ask yourself if most of the job can be done without full writes (if you write to disk think if you could write in the user’s folder or an isolated storage, if writing in registry to HKLM think if you could write to HKLU, etc). The answer is mostly sure “Yes”.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;So why run applications with full privileges when they can be run with limited? Running with more privileges than required is just a security vulnerability -  If an attacker exploits a vulnerability in your application he will gain more control.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;There are two mistakes developers tend to do:&lt;img class="size-full wp-image-649 alignright" title="unidentified_uac" src="http://victorhurdugaci.com/wp-content/uploads/2009/03/unidentified_uac.png" alt="unidentified_uac" width="322" height="258" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); float: right; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; margin-top: 0px; margin-right: 0px; margin-bottom: 2px; margin-left: 7px; display: inline; " /&gt;&lt;/p&gt;&lt;ol style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;&lt;li&gt;Request the end-user to run an application with full rights even though this is not necessarily (most of the time because of bad design practices)&lt;/li&gt;&lt;li&gt;Do not request to user to run the application elevated but try to perform operations that require more rights&lt;/li&gt;&lt;/ol&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;By design UAC can only elevate code at process level and only at process’ startup (means that a running process cannot be elevated). In the .NET world this also means that you cannot elevate code running in another app domain because the app domain is part of a running process. In order to elevate an existing application this must be closed and reopen with more privileges.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;There are two types on UAC dialogs: blue and yellow. When you see a blue dialog you can be sure that the application requesting privileges is signed and trusted. The yellow dialog shows for any application that is not digitally signed and is not fully trusted.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;User Account Control also prevents a lower privilege process to do the following (list below taken from MSDN):&lt;/p&gt;&lt;ul style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;&lt;li&gt;Perform a window handle validation of higher process privilege.&lt;/li&gt;&lt;li&gt;&lt;em&gt;SendMessage &lt;/em&gt;or &lt;em&gt;PostMessage &lt;/em&gt;to higher privilege application windows. These Application Programming Interfaces (APIs) return success but silently drop the window message.&lt;/li&gt;&lt;li&gt;Use thread hooks to attach to a higher privilege process.&lt;/li&gt;&lt;li&gt;Use Journal hooks to monitor a higher privilege process.&lt;/li&gt;&lt;li&gt;Perform DLL injection to a higher privilege process.&lt;/li&gt;&lt;/ul&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;Let’s see how an UAC aware application should look.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;&lt;span id="more-638"&gt;&lt;/span&gt;It should be composed of two executables (one that will be run with limited privileges and another one that will be started only with needed and with full rights) or two working modes (a mode for limited rights and another one for full rights). Either way you must remember that once you elevated the application and finalized the administrative tasks, the process should be destroyed in order to reduce an attacker’s privileges.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;In order to launch an elevated process in Windows Vista the process must be started with the “&lt;em&gt;runas&lt;/em&gt;” verb. The &lt;em&gt;Verb &lt;/em&gt;property is part of System.Diagnostics.Process.StartInfo class. The code snippet that launches “notepad.exe” with full rights is showed below:&lt;/p&gt;&lt;div class="wp_codebox" style="color: rgb(17, 0, 0); width: 725px; background-color: rgb(249, 249, 249); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: silver; border-right-color: silver; border-bottom-color: silver; border-left-color: silver; margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; overflow-x: auto; overflow-y: auto; font-family: verdana; font-size: 13px; text-align: -webkit-auto; "&gt;&lt;table style="border-collapse: collapse; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; width: 725px; "&gt;&lt;tbody&gt;&lt;tr id="p6381"&gt;&lt;td class="code" id="p638code1" style="vertical-align: top; padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; "&gt;&lt;pre class="csharp" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: auto; float: none; clear: none; overflow-x: visible; overflow-y: visible; font-size: 12px; line-height: 1.333; text-align: left; "&gt;    ProcessStartInfo processInfo &lt;span style="color: rgb(0, 128, 0); "&gt;=&lt;/span&gt; &lt;a href="http://www.google.com/search?q=new+msdn.microsoft.com" style="color: rgb(49, 130, 192); text-decoration: none; "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;new&lt;/span&gt;&lt;/a&gt; ProcessStartInfo&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;     processInfo&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;Verb&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); "&gt;"runas"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;     processInfo&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;FileName&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0); "&gt;=&lt;/span&gt; &lt;span style="color: rgb(102, 102, 102); "&gt;"notepad.exe"&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;     Process&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;Start&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;processInfo&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;If you choose to have only one executable file that acts differently based on permissions you should check if the user is part of the administrative group. In Vista even if your user is part of the Administrators group it runs with reduced privileges by default and gains his full rights on demand. The code below stores &lt;em&gt;true&lt;/em&gt; in the&lt;em&gt;hasAdministrativeRight&lt;/em&gt; boolean variable if the user’s privileges are administrative and &lt;em&gt;false&lt;/em&gt; otherwise.&lt;/p&gt;&lt;div class="wp_codebox" style="color: rgb(17, 0, 0); width: 725px; background-color: rgb(249, 249, 249); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: silver; border-right-color: silver; border-bottom-color: silver; border-left-color: silver; margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; overflow-x: auto; overflow-y: auto; font-family: verdana; font-size: 13px; text-align: -webkit-auto; "&gt;&lt;table style="border-collapse: collapse; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; width: 725px; "&gt;&lt;tbody&gt;&lt;tr id="p6382"&gt;&lt;td class="code" id="p638code2" style="vertical-align: top; padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; "&gt;&lt;pre class="csharp" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: auto; float: none; clear: none; overflow-x: visible; overflow-y: visible; font-size: 12px; line-height: 1.333; text-align: left; "&gt;    WindowsPrincipal pricipal &lt;span style="color: rgb(0, 128, 0); "&gt;=&lt;/span&gt; &lt;a href="http://www.google.com/search?q=new+msdn.microsoft.com" style="color: rgb(49, 130, 192); text-decoration: none; "&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;new&lt;/span&gt;&lt;/a&gt; WindowsPrincipal&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;WindowsIdentity&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;GetCurrent&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;     &lt;span style="color: rgb(102, 102, 204); font-weight: bold; "&gt;bool&lt;/span&gt; hasAdministrativeRight &lt;span style="color: rgb(0, 128, 0); "&gt;=&lt;/span&gt; pricipal&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;IsInRole&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;WindowsBuiltInRole&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;Administrator&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;To elevate the current application you must create a process with elevated rights and close the existing instance. However you cannot start a process with limited privileges – I couldn’t find a solution. Anyone knows how to start a less privilege process from a higher privilege one? The sample creates an elevated instance of the current executable and closes the existing one.&lt;/p&gt;&lt;div class="wp_codebox" style="color: rgb(17, 0, 0); width: 725px; background-color: rgb(249, 249, 249); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: silver; border-right-color: silver; border-bottom-color: silver; border-left-color: silver; margin-top: 0px; margin-right: 0px; margin-bottom: 0.5em; margin-left: 0px; overflow-x: auto; overflow-y: auto; font-family: verdana; font-size: 13px; text-align: -webkit-auto; "&gt;&lt;table style="border-collapse: collapse; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; width: 725px; "&gt;&lt;tbody&gt;&lt;tr id="p6383"&gt;&lt;td class="code" id="p638code3" style="vertical-align: top; padding-top: 2px; padding-right: 4px; padding-bottom: 2px; padding-left: 4px; "&gt;&lt;pre class="csharp" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; width: auto; float: none; clear: none; overflow-x: visible; overflow-y: visible; font-size: 12px; line-height: 1.333; text-align: left; "&gt;    RunElevated&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;Application&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;ExecutablePath&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;     &lt;span style="color: rgb(6, 0, 255); font-weight: bold; "&gt;this&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); "&gt;Close&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0); "&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;&lt;em&gt;RunElevated&lt;/em&gt; is a method that takes the name of an executable and spawns it in a new elevated process (see the attached code).&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;I have created a sample application that illustrates all the things written so far: it displays the user’s rights, elevates the current application and starts a process with more privileges. In order to see all features of the application you must have UAC enabled. You can download the code from &lt;a href="http://victorhurdugaci.com/wp-content/uploads/2009/03/uacapp.zip" style="color: rgb(49, 130, 192); text-decoration: none; "&gt;this link&lt;/a&gt;.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;Please note that here I recommend to run applications with limited privileges but there are situations when applications need to run unrestricted – this is the case of system configuration utilities or other special applications. What I want to say is that you should run applications in an unprivileged environment when possible.&lt;/p&gt;&lt;p style="font-family: verdana; font-size: 13px; text-align: justify; "&gt;This is part one of the tutorial. Part 2 will explain how to use the manifest file to specify that an executable must be always run with full privleges.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3944340025643201386?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3944340025643201386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2011/12/using-uac-with-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3944340025643201386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3944340025643201386'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2011/12/using-uac-with-c.html' title='Using UAC with C#'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-7224699132393051323</id><published>2011-05-29T00:16:00.000+05:00</published><updated>2011-05-29T00:24:41.081+05:00</updated><title type='text'>New Features Announced for Silverlight 5</title><content type='html'>Improved media support and rich UI capabilities&lt;br /&gt;&lt;br /&gt;Hardware Decode and presentation of H.264 improve performance for lower-power devices to render high-definition video using GPU support.&lt;br /&gt;TrickPlay allows video to be played at different speeds and supports fast-forward and rewind. At up to twice the speed, audio pitch correction allows users to watch videos while preserving a normal audio pitch.&lt;br /&gt;Improved power awareness prevents the screen saver from being shown while watching video and allows the computer to sleep when video is not active.&lt;br /&gt;Remote-control support allows users to control media playback.&lt;br /&gt;Digital rights management advancements allow seamless switching between DRM media sources.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Building next-generation business applications&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Silverlight 5 text (bottom) has improved clarity.&lt;br /&gt;&lt;br /&gt;Fluid user interface enables smoother animation within the UI. Inter-Layout Transitions allow developers to specify animations to apply when elements are added, removed or re-ordered within a layout. This provides smoother user experiences when, for example, items are inserted into a list.&lt;br /&gt;&lt;br /&gt;Text improvements make it possible to build rich magazine-style text layouts:&lt;br /&gt;&lt;br /&gt;Multicolumn text and linked text container allow text to flow around other elements.&lt;br /&gt;Tracking/leading set precisely how far apart each character is for full creative control.&lt;br /&gt;Text clarity is improved with Pixel Snapping.&lt;br /&gt;Text layout performance is significantly improved.&lt;br /&gt;OpenType support has been enhanced.&lt;br /&gt;Support for Postscript vector printing enables users to create reports and documents, including the ability to create a virtual print view different from what is shown on the screen.&lt;br /&gt;Added support for double-click and Combobox type ahead.&lt;br /&gt;Model View ViewModel (MVVM) and Databinding enhancements allow more work to be done more easily via XAML:&lt;br /&gt;&lt;br /&gt;Debugging support now allows breakpoints to be set on a binding, so you can step through binding failures.&lt;br /&gt;Implicit DataTemplates allow templates to be created across an application to support a particular type by default.&lt;br /&gt;Ancestor RelativeSource allows, for example, a DataTemplate to bind to a property on the control that contains it.&lt;br /&gt;Binding in style setters allows bindings to be used within styles to reference other properties.&lt;br /&gt;The DataContextChanged event is being introduced. Markup extensions allow code to be run at XAML parse time for both properties and event handlers, enabling cutting-edge MVVM support.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Silverlight 5 performance improvements&lt;br /&gt;&lt;br /&gt;Reduced network latency by using a background thread for networking.&lt;br /&gt;XAML parser improvements that speed up startup and runtime performance.&lt;br /&gt;Support for 64-bit operating systems.&lt;br /&gt;Reduced network latency by using a background thread for networking.&lt;br /&gt;&lt;br /&gt;Graphics improvements&lt;br /&gt;&lt;br /&gt;Graphics Processing Unit (GPU) accelerated 3-D application programming interface (API) provides rich graphics on the Web for building advanced data visualizations and rich user experience (UI).&lt;br /&gt;Immediate mode graphics API allows direct rendering to the GPU.&lt;br /&gt;Hardware acceleration is enabled in windowless mode with Internet Explorer 9.&lt;br /&gt; &lt;br /&gt;Silverlight 5 extends features of the "Trusted Application" model&lt;br /&gt;&lt;br /&gt;Silverlight 5 extends features of the ‘Trusted Application’ model to the browser for the first time. These features, when enabled via a group policy registry key and an application certificate, mean users won’t need to leave the browser to perform complex tasks:&lt;br /&gt;&lt;br /&gt;Host HTML content as a Web browser control within the Silverlight application. HTML pages, such as help content or e-mail, can be integrated within the application.&lt;br /&gt;Read and write files to the user’s My Documents folder, making it easier to find media files or create local copies of reports.&lt;br /&gt;Launch Microsoft Office and other desktop programs. Users can open Microsoft Outlook and create an e-mail message, or send a report to Word utilizing the power of Office.&lt;br /&gt;Access devices and other system capabilities by calling into application COM components. Users can access a USB security card reader or a bar-code scanner.&lt;br /&gt;Enjoy full keyboard support in full screen, which enables richer kiosk and media viewing applications.&lt;br /&gt;Call existing unmanaged code directly from within Silverlight with PInvoke.&lt;br /&gt;Tools improvements&lt;br /&gt;&lt;br /&gt;Microsoft Visual Studio profiling support including CPU, memory, thread contention.&lt;br /&gt;Visual Studio Team Test support.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Features included in the final release are dependent on feedback and testing that comes from close communications with partners and customers that participate in the beta process&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-7224699132393051323?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.microsoft.com/silverlight/future/' title='New Features Announced for Silverlight 5'/><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/7224699132393051323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2011/05/new-features-announced-for-silverlight.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7224699132393051323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7224699132393051323'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2011/05/new-features-announced-for-silverlight.html' title='New Features Announced for Silverlight 5'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-7720352390448227261</id><published>2009-04-09T14:54:00.001+05:00</published><updated>2009-04-09T14:54:48.164+05:00</updated><title type='text'>Profile Management in ASP.NET 2.0</title><content type='html'>A good web site will remember me. Perhaps the site will remember my favorite color scheme, or my preferred shipping address. Either way, if a site makes me feel like I’m not just another IP address on the web, I’m more likely to return in the future. Adding a personal touch for your end-users can make a difference.&lt;br /&gt;&lt;br /&gt;Personalization requires a bit of work, however. We need to track users and save their preferences between visits. We need database tables, SQL queries, and some well designed classes. Fortunately, ASP.NET 2.0 saves us from all the grunge work by giving us built-in profiling features we can use.&lt;br /&gt;A Simple Profile&lt;br /&gt;&lt;br /&gt;The Profile provider in ASP.NET stores and retrieves information about our site’s users. The default profile provider keeps data in SQL Server tables. All we need to provide is a definition of the user profile. The profile definition lives in the application’s web.config file. The following is a simple profile with name and age properties.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;br /&gt;&lt;br /&gt; &lt;system.web&gt;&lt;br /&gt; &lt;anonymousidentification enabled="true"&gt;  &lt;br /&gt; &lt;trust level="Medium"&gt;  &lt;br /&gt;   &lt;profile&gt;&lt;br /&gt;     &lt;properties&gt;&lt;br /&gt;       &lt;add name="Name" allowanonymous="true"&gt;&lt;br /&gt;       &lt;add name="Age" allowanonymous="true" type="System.Int16"&gt;&lt;br /&gt;     &lt;/add&gt;&lt;br /&gt;   &lt;/add&gt;&lt;br /&gt;   &lt;compilation debug="true"&gt;&lt;br /&gt; &lt;/compilation&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/properties&gt;&lt;br /&gt;&lt;br /&gt;Using the profile we’ve defined is straightforward. The following is a content page that will read the current user’s profile settings into TextBox controls, and update the profile if the user clicks an update button. Notice we don’t need to use any database access code or explicitly load or save profile settings – ASP.NET takes care of all this work in the background.&lt;br /&gt;&lt;br /&gt;&lt;%@ Page Language="C#" MasterPageFile="~/Layout1.master" %&gt;&lt;br /&gt;&lt;br /&gt;&lt;script runat="server"&gt;&lt;br /&gt;  &lt;br /&gt;  protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;    if (!IsPostBack)&lt;br /&gt;    {&lt;br /&gt;      nameTextBox.Text = Profile.Name;&lt;br /&gt;      ageTextBox.Text = Profile.Age.ToString();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  protected void updateProfileButton_Click(object sender,&lt;br /&gt;                                           EventArgs e)&lt;br /&gt;  {&lt;br /&gt;    Profile.Name = nameTextBox.Text;&lt;br /&gt;    Profile.Age = Int16.Parse(ageTextBox.Text);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;asp:content id="Content1" contentplaceholderid="main" runat="Server"&gt;&lt;br /&gt; &lt;hr /&gt;&lt;br /&gt; &lt;asp:textbox runat="server" id="nameTextBox"&gt;&lt;br /&gt;&lt;br /&gt; &lt;asp:textbox runat="server" id="ageTextBox"&gt;&lt;br /&gt;&lt;br /&gt; &lt;asp:button runat="server" id="updateProfileButton" text="Save Preferences" onclick="updateProfileButton_Click"&gt;&lt;br /&gt;&lt;/asp:button&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above sample works even for anonymous users. We will take a look later in the article how the system tracks unnamed users, but for now let’s introduce the software behind the curtain.&lt;br /&gt;The Profile Provider&lt;br /&gt;SqlProfileProvider&lt;br /&gt;&lt;br /&gt;The ASP.NET team implemented the profile management features using a provider model. A base ProfileProvider class defines the interface, or contract, that all profile providers must implement. ASP.NET 2.0 ships with an implementation of the ProfileProvider that uses SQL Server – the SqlProfileProvider class. SqlProfileProvider implements the ProfileProvider methods (like FindProfilesByUserName) by executing stored procedures in SQL Server.&lt;br /&gt;&lt;br /&gt;The provider model is extensible. If you don’t want to use SQL Server, but want to use an XML file or a different relational database engine, you can define your own class derived from the ProfileProvider class and implement all the Profile features using a different data store. The beauty of the provider model is how you can plug your own implementation of a feature into the system, and the runtime and application continue to work without knowing the details of the implementation. Later in the article, we will discuss the provider configuration. For now, let’s take a closer look at configuring Profile properties in web.config.&lt;br /&gt;Profiles, Users, Values&lt;br /&gt;&lt;br /&gt;Let’s extend our Profile settings with the following web.config.&lt;br /&gt;&lt;br /&gt;&lt;profile&gt;&lt;br /&gt; &lt;properties&gt;&lt;br /&gt;   &lt;add name="Name" allowanonymous="true"&gt;&lt;br /&gt;   &lt;add name="Age" allowanonymous="true" type="System.Int16"&gt;&lt;br /&gt;    &lt;group name="UI"&gt;&lt;br /&gt;       &lt;add name="MasterPage" defaultvalue="layout1.master"&gt;&lt;br /&gt;       &lt;add name="Theme" defaultvalue="Red"&gt;&lt;br /&gt;    &lt;/add&gt;&lt;br /&gt; &lt;/add&gt;&lt;br /&gt;&lt;/group&gt;&lt;br /&gt;&lt;br /&gt;The above configuration demonstrates several features. First, Profile properties use the String type by default. We can change the default with the type attribute, as we do with the Age property (typed as Int16). We can define a default value for a profile property with the defaultValue attribute. The provider will use the default value when a property value does not yet exist in the data store.&lt;br /&gt;The Unidentified User&lt;br /&gt;&lt;br /&gt;By default, Profile properties are only available for authenticated users. If we want a property to be available for an anonymous user, we need to add allowAnonymous=”true” to the property. Without the attribute, the runtime will throw an exception if the current user is anonymous and we write to the property.&lt;br /&gt;&lt;br /&gt;In order for allowAnonymous to work, we need to configure ASP.NET to track anonymous users. We configure tracking using the anonymousIdentification section of web.config. Anonymous user tracking is off by default, but enabled=”true” will tell the ASP.NET runtime to load an AnonymousIdentificationModule into the HttpModule request pipeline. When an anonymous user makes a request, this module creates a globally unique identifier using the System.Guid class, and writes the GUID into a persistent cookie named .ASPXANONYMOUS. The GUID will be the anonymous user’s “name”. Using a persistent cookie means the user’s GUID will be available between visits. The cookie name, cookie timeout, and other characteristics of anonymous user tracking are configurable in the anonymousIdentification configuration element.&lt;br /&gt;Groupings&lt;br /&gt;&lt;br /&gt;We can create a hierarchy of profile properties using the group element. Grouping allows us to categorize properties, which can be helpful when there are a large number of profile properties. We can specify more than one property group, but we cannot nest a group beneath another group element. As you may have noticed in our first code sample, the ASP.NET compiler generates a class with strongly typed profile properties. A grouping adds an additional layer in the generated class, as can be seen in the following code snippet.&lt;br /&gt;&lt;br /&gt;Profile.Name = "scott";&lt;br /&gt;Profile.UI.Theme = "Reddish";&lt;br /&gt;Profile.UI.MasterPage = "layout1.master";&lt;br /&gt;&lt;br /&gt;Profiles At Compilation and Runtime&lt;br /&gt;&lt;br /&gt;Where does the strongly typed Profile come from? The ASP.NET compiler parses web.config to uncover the profile schema defined inside, and then code-generates a class in the Temporary ASP.NET Files directory. The following class is an excerpt of the class generated from the web.config in this article.&lt;br /&gt;&lt;br /&gt;public class ProfileCommon : System.Web.Profile.ProfileBase {&lt;br /&gt;&lt;br /&gt;   public virtual short Age&lt;br /&gt;   {&lt;br /&gt;       get&lt;br /&gt;       {&lt;br /&gt;           return ((short)(this.GetPropertyValue("Age")));&lt;br /&gt;       }&lt;br /&gt;       set&lt;br /&gt;       {&lt;br /&gt;           this.SetPropertyValue("Age", value);&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;   // other properties ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The above class (ProfileCommon) will compile into the App_Code assembly, meaning the class is visible to all of our web forms, user controls, master pages, and to any classes in the App_Code directory. We can use the Profile object from a base page class in App_Code:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;&lt;br /&gt;public class BasePage : Page&lt;br /&gt;{&lt;br /&gt;   public BasePage()&lt;br /&gt;   {&lt;br /&gt;       PreInit += new EventHandler(BasePage_PreInit);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   void BasePage_PreInit(object sender, EventArgs e)&lt;br /&gt;   {&lt;br /&gt;       ProfileCommon profile = HttpContext.Current.Profile&lt;br /&gt;                                  as ProfileCommon;&lt;br /&gt;&lt;br /&gt;       if (!String.IsNullOrEmpty(profile.UI.MasterPage))&lt;br /&gt;       {&lt;br /&gt;           MasterPageFile = profile.UI.MasterPage;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       if (!String.IsNullOrEmpty(profile.UI.Theme))&lt;br /&gt;       {&lt;br /&gt;           Theme = profile.UI.Theme;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The above class sets the layout and look of a page based on a user’s preferences. Notice we can pull the Profile object out of the current HttpContext object. There is another HttpModule in the pipeline, the ProfileModule, which creates the Profile object during the AcquireRequestState event of the request processing lifecycle. The ProfileModule places the ProfileCommon object into the current HttpContext so the object is available for the duration of the request.&lt;br /&gt;&lt;br /&gt;Notice we need to coerce the Profile object into a ProfileCommon reference (the as ProfileCommon in the code). Since the ProfileCommon class is generated by ASP.NET from web.config, so it’s not possible for the HttpContext class to know the definition of ProfileCommon. HttpContext has to return a ProfileBase reference. The ProfileCommon class derives from ProfileBase. All we need to do is cast the ProfileBase reference to a ProfileCommon reference.&lt;br /&gt;&lt;br /&gt;Why doesn’t our web form code need to use the same type cast? The answer is that the ASP.NET compiler code-generates a Profile property into our web form. If you poke around at the generated code in the Temporary ASP.NET Files directory (with debug enabled), you’ll find each web form has a property defined like the following:&lt;br /&gt;&lt;br /&gt;protected ProfileCommon Profile {&lt;br /&gt;   get {&lt;br /&gt;       return ((ProfileCommon)(this.Context.Profile));&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Our web form also pulls the profile object from the current HttpContext and casts the value to a ProfileCommon reference. Since the ASP.NET compiler is kind enough to generate this code, we don’t need to cast the reference in our web form code.&lt;br /&gt;&lt;br /&gt;If we want to use the ProfileBase object in a class library outside the web application, however, we will not be able to see the definition for the ProfileCommon class. You can still use a ProfileBase reference from a class library project and read write properties using the GetPropertyValue and SetPropertyValue methods of ProfileBase. Another solution might be to use Profile inheritance, which we will look at later in the article.&lt;br /&gt;Provider Configuration&lt;br /&gt;&lt;br /&gt;The machine.config file configures the default Profile provider for all web sites on the computer. The machine.config file is located in the framework installation config directory, typically Windows\Microsoft.NET\Framework\v2.0.xxxx\Config. Inside is the following.&lt;br /&gt;&lt;br /&gt;&lt;profile&gt;&lt;br /&gt; &lt;providers&gt;&lt;br /&gt;   &lt;add name="AspNetSqlProfileProvider" connectionstringname="LocalSqlServer" applicationname="/" type=""&gt;&lt;br /&gt;  &lt;/providers&gt;&lt;br /&gt;&lt;/profile&gt;&lt;br /&gt;&lt;br /&gt;The LocalSqlServer connection string points to a SQL Server 2005 Express database in the application’s App_Data folder. You can create a database on a different instance of SQL Server, or on a remote SQL Server, using the ASP.NET Sql Server Registration Tool (aspnet_regsql.exe). With a new database in place, you can either replace the LocalSqlServer connection string in your application’s web.config file, or reconfigure the provider to use a different connection string name. The following replaces the LocalSqlServer connection string to point to a different server.&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;br /&gt;&lt;connectionstrings&gt;&lt;br /&gt;  &lt;remove name=" localsqlserver="&gt;&lt;br /&gt; &lt;add name="LocalSqlServer" connectionstring="server=goa;database=aspnetdb;integrated security=sspi;"&gt;&lt;br /&gt;&lt;/add&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/add&gt;&lt;br /&gt;&lt;br /&gt;The following configures a the SqlProfileProvider using a connection string named MySqlServer.&lt;br /&gt;&lt;br /&gt;&lt;profile defaultprovider="MyProfileProvider"&gt;  &lt;br /&gt; &lt;providers&gt;&lt;br /&gt;    &lt;add name="MyProfileProvider" connectionstringname="MySqlServer" applicationname="/" type="System.Web.Profile.SqlProfileProvider"&gt;&lt;br /&gt;  &lt;/add&gt;&lt;br /&gt;&lt;/providers&gt;&lt;br /&gt;&lt;br /&gt;For the configuration to work, you’ll need to create a MySqlServer connection string in web.config. Note also that the account logging into SQL Server will need permission to access the profile related tables and stored procedures. ASP.NET creates several roles in the database, including the aspnet_Profile_BasicAccess role, which grants all the permissions required for creating, updating, and deleting profiles.&lt;br /&gt;Serialization&lt;br /&gt;&lt;br /&gt;The runtime serializes primitive Profile properties (like strings, integers, and DateTime instances) as strings. We can override serialization behavior with the serializeAs attribute and select the XmlSerializer (serializeAs="Xml") or the BinarySerializer (serializeAs="Binary"). The default serializer is the XmlSerializer. Let’s say we want to keep track of a user’s favorite Pet with the following class in App_Code:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;public class Pet&lt;br /&gt;{&lt;br /&gt;   public Pet()&lt;br /&gt;   {&lt;br /&gt;       // default ctor required for serializer&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public Pet(string name)&lt;br /&gt;   {&lt;br /&gt;       _name = name;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   private string _name = String.Empty;&lt;br /&gt;   public string Name&lt;br /&gt;   {&lt;br /&gt;       get { return _name; }&lt;br /&gt;       set { _name = value; }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Notice we need a default constructor for our class to work with serialization. We can add a favorite Pet into the profile by first adding a new property into web.config:&lt;br /&gt;&lt;br /&gt;&lt;add name="Pet" allowanonymous="true" type="Pet"&gt;&lt;br /&gt;&lt;br /&gt;If we put the following code into a web form’s Page_Load method, the runtime will serialize the Pet object into the database as XML (the default).&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt; Profile.Pet = new Pet("Beaker The Cat");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can look in the dbo.aspnet_Profile table to see serialized profiles. String and XML properties will be in the PropertyValuesString column, while objects serialized into binary will appear in the PropertyValuesBinary column. Side note: you’ll never want to store sensitive information into a user’s profile without encrypting the data first. Information in the profile columns is easy to extract.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Looking at the PropertyValuesString column in the aspnet_Profile table for our user's record, we will find the following (amongst the other property values).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pet xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt; &lt;name&gt;Beaker The Cat&lt;/name&gt;&lt;br /&gt;&lt;/pet&gt;&lt;br /&gt;&lt;br /&gt;If we want to use a binary serializer with Pet objects, we could change the property configuration as follows:&lt;br /&gt;&lt;br /&gt;&lt;add name="Pet" allowanonymous="true" type="Pet" serializeas="Binary"&gt;&lt;br /&gt;&lt;br /&gt;The above configuration will throw an error: “The type for the property 'Pet' cannot be serialized using the binary serializer, since the type is not marked as serializable”. We need to make one small adjustment to the Pet class:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;[Serializable]&lt;br /&gt;public class Pet&lt;br /&gt;{&lt;br /&gt;   // ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Our pet objects will now appear as binary data in the PropertyValuesBinary column.&lt;br /&gt;Profile Inheritance&lt;br /&gt;&lt;br /&gt;The Profile object can inherit from an existing class. For example:&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Web.Profile;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;public class CustomProfile : ProfileBase&lt;br /&gt;{&lt;br /&gt;   [SettingsAllowAnonymous(true)]&lt;br /&gt;   public string Name&lt;br /&gt;   {&lt;br /&gt;       get { return base["Name"] as string; }&lt;br /&gt;       set { base["Name"] = value; }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   [SettingsAllowAnonymous(true)]&lt;br /&gt;   public int Age&lt;br /&gt;   {&lt;br /&gt;       get { return (int)base["Age"]; }&lt;br /&gt;       set { base["Age"] = value; }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   [SettingsAllowAnonymous(true)]&lt;br /&gt;   public List&lt;pet&gt; Pets&lt;br /&gt;   {&lt;br /&gt;       get { return base["Pets"] as List&lt;pet&gt;; }&lt;br /&gt;       set { base["Pets"] = value; }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;A Profile class has to derive from ProfileBase. The public properties in the CustomProfile class forward calls to the ProfileBase indexer ([] in C#, () in VB). The base class will interact with the Profile provider to retrieve the values we need. Notice the class even uses a generic collection to store a list of all the user’s pets. To use the class, we just need to reconfigure our profile settings in web.config and use the inherits attribute.&lt;br /&gt;&lt;br /&gt;&lt;profile inherits="CustomProfile"&gt;&lt;br /&gt;  &lt;properties&gt;&lt;br /&gt;     &lt;add name="LuckyNumber" allowanonymous="true" type="System.Int32" defaultvalue="7"&gt;&lt;br /&gt;  &lt;/add&gt;&lt;br /&gt;&lt;/properties&gt;&lt;br /&gt;&lt;br /&gt;Notice we can still augment the properties of our CustomProfile class with additional properties in web.config. The following code puts the new Profile to work.&lt;br /&gt;&lt;br /&gt;Profile.LuckyNumber = 21;&lt;br /&gt;Profile.Pets = new List&lt;pet&gt;();&lt;br /&gt;Profile.Pets.Add(new Pet("Dolly the Dolphin"));&lt;br /&gt;Profile.Pets.Add(new Pet("Bessie the Cow"));&lt;br /&gt;&lt;br /&gt;One good reason to inherit from a custom base class is that we can add additional logic to the Profile object. For instance, we can add validation logic to the Age property to ensure the user provides us with a sensible age, and not a value like 443.&lt;br /&gt;Migrating Anonymous User Settings&lt;br /&gt;&lt;br /&gt;If your web application allows anonymous users to set Profile properties, and your web application includes not only authenticated but anonymous users, then there is a sticky scenario to handle. At some point an anonymous user might login and become an authenticated user. After a user authenticates, their Profile changes, because the Profile system keys Profile information by username.&lt;br /&gt;&lt;br /&gt;At the point an anonymous user changes to an authenticated user, the Profile module gives us a chance to migrate the user’s anonymous profile to the new authenticated profile with a MigrateAnonymous event. We can handle this global event in global.asax with the following code.&lt;br /&gt;&lt;br /&gt;void Profile_MigrateAnonymous(object sender,&lt;br /&gt;                             ProfileMigrateEventArgs e)&lt;br /&gt;{&lt;br /&gt; ProfileCommon anonProfile =&lt;br /&gt;   Profile.GetProfile(e.AnonymousID);&lt;br /&gt;&lt;br /&gt; Profile.Age = anonProfile.Age;&lt;br /&gt; Profile.LuckyNumber = anonProfile.LuckyNumber;&lt;br /&gt; Profile.Pets = anonProfile.Pets;&lt;br /&gt; AnonymousIdentificationModule.ClearAnonymousIdentifier();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;It is important to tell the AnonymousIdentificationModule to clear the anonymous identifier (the cookie). Without this call the event will continue to fire with each page the authenticated user visits.&lt;br /&gt;&lt;br /&gt;The MigrateAnonymous event isn’t perfect, however, because it will fire each time an anonymous user logs in – even if we migrated their anonymous profile on a previous visit. If you want to prevent a user from overwriting their authenticated profile with inadvertent changes to their anonymous profile, you should consider adding a boolean flag to the profile, and migrate the profile settings only when the flag is false (then set the flag to true).&lt;br /&gt;The ProfileManager&lt;br /&gt;ProfileManager&lt;br /&gt;&lt;br /&gt;discussion of Profiles would be complete without mentioning the ProfileManager class. The ProfileManager class is useful for managing profiles. Since the class is a static class, all the members are available to call without creating an instance of the class. The class is useful for managing profiles (ProfileManager.DeleteInactiveProfiles, for example), and for reporting on profiles. The GetAllProfiles method, for instance, includes an overload which accepts paging parameters (pageSize, pageIndex). The DeleteInactiveProfiles method will clean up profile records that have not been touched since a certain date.&lt;br /&gt;Conclusions&lt;br /&gt;&lt;br /&gt;Hopefully this article has demonstrated the flexibility of the ASP.NET Profile features. The ProfileProvider and company will save us time in developing a framework to store user specific data between visits. Use the feature to build a shopping cart, personalize your web application, and more. &lt;/pet&gt;&lt;/profile&gt;&lt;/pet&gt;&lt;/pet&gt;&lt;/add&gt;&lt;/add&gt;&lt;/profile&gt;&lt;/providers&gt;&lt;/profile&gt;&lt;/add&gt;&lt;/add&gt;&lt;/properties&gt;&lt;/profile&gt;&lt;/asp:textbox&gt;&lt;/asp:textbox&gt;&lt;/asp:content&gt;&lt;/profile&gt;&lt;/trust&gt;&lt;/anonymousidentification&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-7720352390448227261?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/7720352390448227261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/04/profile-management-in-aspnet-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7720352390448227261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7720352390448227261'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/04/profile-management-in-aspnet-20.html' title='Profile Management in ASP.NET 2.0'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-6042191834785052830</id><published>2009-03-31T00:23:00.000+05:00</published><updated>2009-03-31T00:24:19.024+05:00</updated><title type='text'>google7c29c9953a23d08f</title><content type='html'>vvv&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-6042191834785052830?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/6042191834785052830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/03/google7c29c9953a23d08f.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6042191834785052830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6042191834785052830'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/03/google7c29c9953a23d08f.html' title='google7c29c9953a23d08f'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-2896919302494520739</id><published>2009-03-23T12:04:00.002+05:00</published><updated>2009-03-23T12:07:25.922+05:00</updated><title type='text'>Run Application on windows Start up</title><content type='html'>Making&lt;br /&gt;the application run or not run at startup involves a few simple lines of code for operating on the Windows Registry. More exactly the registry key we're interested in is Run. The full path to it is HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run or if you want the setting for all the users of the operating system use HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run.&lt;br /&gt;&lt;br /&gt;Before we start, make sure you add the following using directive:&lt;br /&gt;&lt;br /&gt;using Microsoft.Win32;&lt;br /&gt;Define a RegistryKey object we're going to use for accessing the path to the Run registry key:&lt;br /&gt;&lt;br /&gt;// The path to the key where Windows looks for startup applications&lt;br /&gt;RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);&lt;br /&gt;&lt;br /&gt;You can change CurrentUser to LocalMachine if you want the application to run at startup for all the users of the operating system.&lt;br /&gt;&lt;br /&gt;Now here's the code used to make the current application run at startup:&lt;br /&gt;// Add the value in the registry so that the application runs at startup&lt;br /&gt;&lt;br /&gt;rkApp.SetValue("MyApp", Application.ExecutablePath.ToString());&lt;br /&gt;&lt;br /&gt;Of course, change MyApp to the name of your application as you want it to appear in the System Configuration Utility (msconfig.exe which can be opened by typing msconfig at Start Menu -&gt; Run). Application.ExecutablePath.ToString()retrieves the path to the application executable that's currently running, so we don't have to write it ourselves, not to mention that we don't normally know where the user installs the application.&lt;br /&gt;&lt;br /&gt;So basically what we did here is add a value to the Run registry key, containing the name of the application and the path to the executable. That's enough for the executable to run at startup.&lt;br /&gt;&lt;br /&gt;Now how do we disable the application from running at startup. Obviously, we delete the registry value we just created:&lt;br /&gt;&lt;br /&gt;// Remove the value from the registry so that the application doesn't start&lt;br /&gt;rkApp.DeleteValue("MyApp", false);&lt;br /&gt;&lt;br /&gt;And how do we check the current state of the application to see if it's set to run at startup or not.&lt;br /&gt;&lt;br /&gt;// Check to see the current state (running at startup or not)&lt;br /&gt;if (rkApp.GetValue("MyApp") == null)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;   // The value doesn't exist, the application is not set to run at startup&lt;br /&gt;&lt;br /&gt;   chkRun.Checked = false;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;   // The value exists, the application is set to run at startup&lt;br /&gt;&lt;br /&gt;   chkRun.Checked = true;&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-2896919302494520739?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/2896919302494520739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/03/run-application-on-windows-start-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/2896919302494520739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/2896919302494520739'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/03/run-application-on-windows-start-up.html' title='Run Application on windows Start up'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3765550501420213040</id><published>2009-02-21T17:02:00.001+05:00</published><updated>2009-02-21T17:02:43.325+05:00</updated><title type='text'>AB</title><content type='html'>&lt;!-- Begin: AdBrite, Generated: 2009-02-21 6:58:03  --&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var AdBrite_Title_Color = '0000FF';&lt;br /&gt;var AdBrite_Text_Color = '000000';&lt;br /&gt;var AdBrite_Background_Color = 'FFFFFF';&lt;br /&gt;var AdBrite_Border_Color = 'FFFFFF';&lt;br /&gt;var AdBrite_URL_Color = '008000';&lt;br /&gt;try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1050709&amp;zs=3330305f323530&amp;ifr='+AdBrite_Iframe+'&amp;ref='+AdBrite_Referrer+'" type="text/javascript"&gt;');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));&lt;/script&gt;&lt;br /&gt;&lt;div&gt;&lt;a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1050709&amp;afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;"&gt;Your Ad Here&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;!-- End: AdBrite --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3765550501420213040?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3765550501420213040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/02/ab.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3765550501420213040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3765550501420213040'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/02/ab.html' title='AB'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-709764142620942695</id><published>2009-02-21T16:59:00.000+05:00</published><updated>2009-02-21T17:01:26.032+05:00</updated><title type='text'></title><content type='html'>&lt;!-- Begin: AdBrite, Generated: 2009-02-21 6:58:03  --&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;var AdBrite_Title_Color = '0000FF';&lt;br /&gt;var AdBrite_Text_Color = '000000';&lt;br /&gt;var AdBrite_Background_Color = 'FFFFFF';&lt;br /&gt;var AdBrite_Border_Color = 'FFFFFF';&lt;br /&gt;var AdBrite_URL_Color = '008000';&lt;br /&gt;try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1050709&amp;zs=3330305f323530&amp;ifr='+AdBrite_Iframe+'&amp;ref='+AdBrite_Referrer+'" type="text/javascript"&gt;');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));&lt;/script&gt;&lt;br /&gt;&lt;div&gt;&lt;a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1050709&amp;amp;afsid=1" style="font-weight: bold; font-family: Arial; font-size: 13px;"&gt;Your Ad Here&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;!-- End: AdBrite --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-709764142620942695?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/709764142620942695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/02/var-adbritetitlecolor-0000ff-var.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/709764142620942695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/709764142620942695'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/02/var-adbritetitlecolor-0000ff-var.html' title=''/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-8731906316991673142</id><published>2009-02-16T18:03:00.000+05:00</published><updated>2009-02-16T18:06:11.417+05:00</updated><title type='text'>Applying Permissions on any Windows Folder using C#</title><content type='html'>&lt;b&gt;System.IO&lt;/b&gt; and &lt;b&gt;System.Security.AccessControl&lt;/b&gt;  &lt;div class="csharpcode"&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Security.AccessControl;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Management;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Management.Instrumentation;&lt;/pre&gt; &lt;/div&gt; &lt;div class="postcontent"&gt;&lt;style type="text/css"&gt; .csharpcode, .csharpcode pre {  font-size: small;  color: black;  font-family: consolas, "Courier New", courier, monospace;  background-color: #ffffff;  /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  {  background-color: #f4f4f4;  width: 100%;  margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt; &lt;p&gt;  &lt;/p&gt; &lt;p&gt;7. Now we are going to define a method which will fill our combobox with names of all user account. &lt;/p&gt; &lt;div class="csharpcode"&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; GetUsers()&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;        &lt;span class="rem"&gt;// This query will query for all user account names in our current Domain&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        SelectQuery sQuery = &lt;span class="kwrd"&gt;new&lt;/span&gt; SelectQuery(&lt;span class="str"&gt;"Win32_UserAccount"&lt;/span&gt;, &lt;span class="str"&gt;"Domain='"&lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;                             + System.Environment.UserDomainName.ToString() + &lt;span class="str"&gt;"'"&lt;/span&gt;);&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;         &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;         {&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                   &lt;span class="rem"&gt;// Searching for available Users&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                    ManagementObjectSearcher mSearcher = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;                                                        ManagementObjectSearcher(sQuery);&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (ManagementObject mObject &lt;span class="kwrd"&gt;in&lt;/span&gt; mSearcher.Get())&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                    {&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                            &lt;span class="rem"&gt;// Adding all user names in our combobox&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                            comboBox1.Items.Add(mObject[&lt;span class="str"&gt;"Name"&lt;/span&gt;]);&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                    }&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;         }&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;         &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;         {&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                    MessageBox.Show(ex.ToString());&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;         }&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;}&lt;/pre&gt; &lt;/div&gt; &lt;style type="text/css"&gt; .csharpcode, .csharpcode pre {  font-size: small;  color: black;  font-family: consolas, "Courier New", courier, monospace;  background-color: #ffffff;  /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  {  background-color: #f4f4f4;  width: 100%;  margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt; &lt;p&gt;&lt;i&gt;Note: System.Environment.UserDomainName is going to deliver us our current domain.&lt;/i&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;8. In order to make the above method effective, we need to modify our form constructor. &lt;/p&gt; &lt;div class="csharpcode"&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; Form1()&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            InitializeComponent();&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            GetUsers();&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;}&lt;/pre&gt; &lt;/div&gt; &lt;style type="text/css"&gt; .csharpcode, .csharpcode pre {  font-size: small;  color: black;  font-family: consolas, "Courier New", courier, monospace;  background-color: #ffffff;  /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  {  background-color: #f4f4f4;  width: 100%;  margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt; &lt;p&gt;  &lt;/p&gt; &lt;p&gt;9. Now we’ll go back to our design window and double click Select Directory button to define its clicking event. Change the definition to following; &lt;/p&gt; &lt;div class="csharpcode"&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; SelectDirectorybtn_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;           &lt;span class="rem"&gt;// creating a new instance fot FolderBrowsingDialog &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="rem"&gt;                                    to provide user capability to select target Folder&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;           FolderBrowserDialog myFolderBrowserDialog = &lt;span class="kwrd"&gt;new&lt;/span&gt; FolderBrowserDialog();&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;           &lt;span class="rem"&gt;// showing dialog&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;           myFolderBrowserDialog.ShowDialog();&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;           &lt;span class="rem"&gt;// Show the path of selected directory in our text Box &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;           textBox1.Text myFolderBrowserDialog.SelectedPath.ToString();&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;}&lt;/pre&gt; &lt;/div&gt; &lt;style type="text/css"&gt; .csharpcode, .csharpcode pre {  font-size: small;  color: black;  font-family: consolas, "Courier New", courier, monospace;  background-color: #ffffff;  /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  {  background-color: #f4f4f4;  width: 100%;  margin: 0em; } .csharpcode .lnum { color: #606060; }&lt;/style&gt; &lt;p&gt;  &lt;/p&gt; &lt;p&gt;10. Move back to your design view and add a Click event to the second button i.e. &lt;b&gt;Make Unreadable&lt;/b&gt;, double click it to modify the event. &lt;/p&gt; &lt;div class="csharpcode"&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Permissionbtn_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;           &lt;span class="rem"&gt;// retrieving the directory information&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;           DirectoryInfo myDirectoryInfo = &lt;span class="kwrd"&gt;new&lt;/span&gt; DirectoryInfo(textBox1.Text);&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;           &lt;span class="rem"&gt;// Get a DirectorySecurity object that represents the &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;           &lt;span class="rem"&gt;// current security settings.&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;           DirectorySecurity myDirectorySecurity = myDirectoryInfo.GetAccessControl();&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;           &lt;span class="kwrd"&gt;string&lt;/span&gt; User = System.Environment.UserDomainName + &lt;span class="str"&gt;"\\" + &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="str"&gt;                                                           comboBox1.SelectedItem.ToString(); &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;           // Add the FileSystemAccessRule to the security settings. &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;                 // FileSystemRights is a big list we are current using Read property but you &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;                 // can alter any other or many sme of which are:&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;          // Create Directories: for sub directories Authority&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;          // Create Files: for files creation access in a particular folder&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;          // Delete: for deletion athority on folder&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;          // Delete Subdirectories and files: for authority of deletion over &lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;                  //subdirectories and files&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;          // Execute file: For execution accessibility in folder&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;          // Modify: For folder modification&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;          // Read: For directory opening&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;          // Write: to add things in directory&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span style="color:#008000;"&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;          // Full Control: For administration rights etc etc&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;          &lt;span style="color:#008000;"&gt;// Also AccessControlType which are of two kinds either “Allow” or “Deny”&lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;          myDirectorySecurity.AddAccessRule(new FileSystemAccessRule(User, &lt;/pre&gt; &lt;pre&gt;                                              FileSystemRights.Read, AccessControlType.Deny));&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        &lt;span style="color:#008000;"&gt;  // Set the new access settings.&lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;          myDirectoryInfo.SetAccessControl(myDirectorySecurity);&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt; &lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;        &lt;span style="color:#008000;"&gt; // Showing a Succesfully Done Message&lt;/span&gt;&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;         MessageBox.Show("Permissions Altered Successfully");&lt;/pre&gt; &lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;}&lt;/pre&gt; &lt;pre&gt; &lt;/pre&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-8731906316991673142?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/8731906316991673142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/02/applying-permissions-on-any-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/8731906316991673142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/8731906316991673142'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/02/applying-permissions-on-any-windows.html' title='Applying Permissions on any Windows Folder using C#'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-2652010477027770118</id><published>2009-02-07T17:27:00.000+05:00</published><updated>2009-02-07T17:29:23.251+05:00</updated><title type='text'>get MAC address of Your Card</title><content type='html'>using System.Management;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ManagementClass mgmtObj = new ManagementClass("Win32_NetworkAdapterConfiguration");&lt;br /&gt;&lt;br /&gt;            ManagementObjectCollection mgmtObjCollection = mgmtObj.GetInstances();&lt;br /&gt;&lt;br /&gt;            foreach (ManagementObject obj in mgmtObjCollection)&lt;br /&gt;            {&lt;br /&gt;                if (((bool)(obj["IPEnabled"])) == true)&lt;br /&gt;                {&lt;br /&gt;                    Console.WriteLine(obj["MacAddress"].ToString());                  &lt;br /&gt;                }&lt;br /&gt;            }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-2652010477027770118?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/2652010477027770118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/02/get-mac-address-of-your-card.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/2652010477027770118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/2652010477027770118'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/02/get-mac-address-of-your-card.html' title='get MAC address of Your Card'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3514903934736861644</id><published>2009-02-06T13:51:00.000+05:00</published><updated>2009-02-06T13:52:29.602+05:00</updated><title type='text'>Registering Assembly Codebase</title><content type='html'>&lt;p&gt; &lt;em&gt;using System.Reflection;     &lt;br /&gt;using System.Configuration.Assemblies;      &lt;br /&gt;using System.Runtime.InteropServices;&lt;/em&gt; &lt;/p&gt;    &lt;p&gt;   &lt;/p&gt;    &lt;p&gt; &lt;em&gt;Assembly obj = Assembly.LoadFrom(Assembly name);     &lt;br /&gt;RegistrationServices reg = new RegistrationServices();      &lt;br /&gt;bool result = reg.RegisterAssembly(obj, AssemblyRegistrationFlags.SetCodeBase);      &lt;br /&gt;Console.WriteLine(result.ToString());&lt;/em&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3514903934736861644?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3514903934736861644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/02/registering-assembly-codebase.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3514903934736861644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3514903934736861644'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/02/registering-assembly-codebase.html' title='Registering Assembly Codebase'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-1620691751073168369</id><published>2009-01-30T12:10:00.001+05:00</published><updated>2009-01-30T12:10:40.291+05:00</updated><title type='text'>cookie hack</title><content type='html'>&lt;p&gt; Cookies are a way that a browser stores important and unimportant data. They store anything from user names and passwords to the last time you were at a site to what pages you visted.&lt;br /&gt;There are many expolits you can do with this if the page is not properly coded. Many forums can be hacked if they have html enabled and a password harvesting script could be easy implemented.&lt;br /&gt;&lt;br /&gt;Now how does it work? I thought you could not see other cookies from other domains on your own site. Well that is the truth, but it is easy to get around and I will let you figure that part out, but I will show you the tricks of the trade.&lt;br /&gt;Okay now the address bar is your friend if you want to see what the cookie is holding on any site. You access the cookie through the document object. For all the examples I will be using an alert to show the cookie instead of document.write. This way you do not have to keep reloading the page.&lt;br /&gt;&lt;br /&gt;The first step is to see the cookie code stored on your computer. Goto any site that has cookies. (I ran all of my code at hotmail to see what they had going on there. I would post screenshots, but I do not want to give away my hotmail info!) &lt;/p&gt;&lt;pre style="background: rgb(238, 238, 238) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;javascript:alert(document.cookie)&lt;br /&gt;&lt;/pre&gt;Okay this alerts all of the unformatted code of the cookie. Now we need to make some more sense of this so we will have to unescape the information. (basic idea: Escaping the code replaces special characters with a code so the browser can store it without problems. Unescaping replaces all of the gibberish with the characters you can understand!) &lt;pre style="background: rgb(238, 238, 238) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;javascript:alert(unescape(document.cookie))&lt;br /&gt;&lt;/pre&gt;Okay you should be able to read it, but it is still a large jumbled mess so we need to space it out a bit. For this I will use regular expressiosn to replace the semicolons with two carriage returns. (If you are using document.write then you want to use html breaks) &lt;pre style="background: rgb(238, 238, 238) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;javascript:alert(unescape(document.cookie).replace(/;/gi,"\n\n"))&lt;br /&gt;&lt;/pre&gt;  Looking at the code I still see that there is escaped information in the strings so I am going to unescape the string again.  &lt;pre style="background: rgb(238, 238, 238) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;javascript:alert(unescape(unescape(document.cookie)).replace(/;/gi,"\n\n"))&lt;br /&gt;&lt;/pre&gt;Now what is left is a formatted bunch of strings. Yes the strings are encrypted, but you will find out that not everyone will encrypt the strings in their cookies! And if you look the source code you miight find out how to break encryption if they do not use server side code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-1620691751073168369?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/1620691751073168369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/cookie-hack.html#comment-form' title='134 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/1620691751073168369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/1620691751073168369'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/cookie-hack.html' title='cookie hack'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>134</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3439127678790512815</id><published>2009-01-29T12:02:00.001+05:00</published><updated>2009-01-29T12:05:49.025+05:00</updated><title type='text'>Data Encryption over Internet</title><content type='html'>&lt;dfn class="term"&gt;Encryption&lt;/dfn&gt; is the process of transforming data into an unintelligible form to prevent the unauthorized use of the data. To read an encrypted file, you must have access to a secret key or password that enables you to decrypt it. Unencrypted data is called &lt;dfn class="term"&gt;plain text&lt;/dfn&gt;; encrypted data is called &lt;dfn class="term"&gt;cipher text&lt;/dfn&gt;. A &lt;dfn class="term"&gt;cipher&lt;/dfn&gt; is an encryption-decryption algorithm.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The Data Encryption Standard (DES) is a cryptographic algorithm designed to encrypt and decrypt data using 8-byte blocks and a 64-bit key.&lt;/p&gt; &lt;p&gt;The Triple DES (DES3) is a variation of DES in which three 64-bit keys are used for a 192-bit key. DES3 works by first encrypting the plain text using the first 64-bits of the key. Then the cipher text is decrypted using the next part of the key.  Finally the resulting cipher text is re-encrypted using the last part of the key.&lt;/p&gt; &lt;p&gt;The Advanced Encryption Standard (AES) is a replacement algorithm that is used by the United States government.&lt;/p&gt; &lt;p&gt;Two encryption modes are: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;dfn class="term"&gt;Block Mode&lt;/dfn&gt;, a method of encryption in which the message is broken into blocks and the encryption occurs on each block as a unit. Since each block is at least 8 bytes large, block mode provides the ability for 64-bit arithmetic in the encryption algorithm.&lt;/li&gt;&lt;li&gt;&lt;dfn class="term"&gt;Stream Mode&lt;/dfn&gt;, a method of encryption in which each individual byte is encrypted.  It is generally considered to be a weak form of encryption.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;A &lt;dfn class="term"&gt;blowfish&lt;/dfn&gt; is a block cipher that operates on 64-bit (8-byte) blocks of data. It uses a variable size key, but typically, 128-bit (16-byte) keys are considered to be good for strong encryption. Blowfish can be used in the same modes as DES.&lt;/p&gt; &lt;p&gt;How you configure network encryption depends on what type of network communication you use.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3439127678790512815?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3439127678790512815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/data-encryption-over-internet.html#comment-form' title='149 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3439127678790512815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3439127678790512815'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/data-encryption-over-internet.html' title='Data Encryption over Internet'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>149</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3670889957988779960</id><published>2009-01-28T18:22:00.002+05:00</published><updated>2009-01-28T18:26:21.663+05:00</updated><title type='text'>How to read / download the content of a web page using C# and store it in a file?</title><content type='html'>using System;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Net;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;    public static void GetFile&lt;br /&gt;            (&lt;br /&gt;            string strURL,&lt;br /&gt;            string strFilePath&lt;br /&gt;            )&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            WebRequest myWebRequest = WebRequest.Create(strURL); &lt;br /&gt;&lt;br /&gt;            WebResponse myWebResponse = myWebRequest.GetResponse(); &lt;br /&gt;&lt;br /&gt;            Stream ReceiveStream = myWebResponse.GetResponseStream();&lt;br /&gt;               &lt;br /&gt;            Encoding encode = System.Text.Encoding.GetEncoding("utf-8");&lt;br /&gt;&lt;br /&gt;            StreamReader readStream = new StreamReader( ReceiveStream, encode );&lt;br /&gt;&lt;br /&gt;            string strResponse=readStream.ReadToEnd();&lt;br /&gt;                &lt;br /&gt;            StreamWriter oSw=new StreamWriter(strFilePath);&lt;br /&gt;    &lt;br /&gt;            oSw.WriteLine(strResponse);&lt;br /&gt;&lt;br /&gt;            oSw.Close();&lt;br /&gt;&lt;br /&gt;            readStream.Close();&lt;br /&gt;        &lt;br /&gt;            myWebResponse.Close();&lt;br /&gt;&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3670889957988779960?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3670889957988779960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/how-to-read-download-content-of-web.html#comment-form' title='145 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3670889957988779960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3670889957988779960'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/how-to-read-download-content-of-web.html' title='How to read / download the content of a web page using C# and store it in a file?'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>145</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-694131191550948705</id><published>2009-01-28T18:22:00.001+05:00</published><updated>2009-01-28T18:22:38.324+05:00</updated><title type='text'>Image Downloader</title><content type='html'>using System;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.Drawing.Imaging;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Net;&lt;br /&gt;&lt;br /&gt;public class DownloadImage {&lt;br /&gt; private string imageUrl;&lt;br /&gt; private Bitmap bitmap;&lt;br /&gt; public DownloadImage(string imageUrl) {&lt;br /&gt;   this.imageUrl = imageUrl;&lt;br /&gt; }&lt;br /&gt; public void Download() {&lt;br /&gt;   try {&lt;br /&gt;     WebClient client = new WebClient();&lt;br /&gt;     Stream stream = client.OpenRead(imageUrl);&lt;br /&gt;     bitmap = new Bitmap(stream);&lt;br /&gt;     stream.Flush();&lt;br /&gt;     stream.Close();&lt;br /&gt;   }&lt;br /&gt;   catch (Exception e) {&lt;br /&gt;     Console.WriteLine(e.Message);&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt; public Bitmap GetImage() {&lt;br /&gt;   return bitmap;&lt;br /&gt; }&lt;br /&gt; public void SaveImage(string filename, ImageFormat format) {&lt;br /&gt;   if (bitmap != null) {&lt;br /&gt;     bitmap.Save(filename, format);&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-694131191550948705?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/694131191550948705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/image-downloader.html#comment-form' title='147 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/694131191550948705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/694131191550948705'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/image-downloader.html' title='Image Downloader'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>147</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-6866180790767838422</id><published>2009-01-28T18:20:00.000+05:00</published><updated>2009-01-28T18:22:00.093+05:00</updated><title type='text'>Image Thumbmaling</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;The &lt;/span&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;GetThumbnailImage method of the Bitmap class in GDI+ and C# is used to create a small thumbnail image of a lange image. The following code snippet/page shows how to create an image thumbnail using Bitmap.GetThumbnailImage method.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Data;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Configuration;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Collections;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Web;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Web.Security;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Web.UI;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Web.UI.WebControls;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Web.UI.WebControls.WebParts;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Web.UI.HtmlControls;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Drawing;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.IO;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Text;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Net.Mail;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Text.RegularExpressions;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;using&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; System.Threading;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: Verdana;"&gt;public&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt; &lt;span style="color: blue;"&gt;partial&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: teal;"&gt;_Default&lt;/span&gt; : System.Web.UI.&lt;span style="color: teal;"&gt;Page&lt;br /&gt;&lt;/span&gt;{   &lt;br /&gt;    &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Finalimagename = &lt;span style="color: maroon;"&gt;""&lt;/span&gt;;   &lt;br /&gt;    &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: blue;"&gt;object&lt;/span&gt; sender, &lt;span style="color: teal;"&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;    {&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-size:85%;"&gt;    }&lt;br /&gt;    &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; btnUpload1_Click(&lt;span style="color: blue;"&gt;object&lt;/span&gt; sender, &lt;span style="color: teal;"&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;    {&lt;br /&gt;        ImageUpload();&lt;br /&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-size:85%;"&gt;     &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; ImageUpload()&lt;br /&gt;   {      &lt;br /&gt;        &lt;span style="color: green;"&gt;/* this code used to make directory name RealImage */&lt;/span&gt;       &lt;br /&gt;        Directory.CreateDirectory(Server.MapPath(&lt;span style="color: maroon;"&gt;"RealImage\\"&lt;/span&gt;));      &lt;br /&gt;        &lt;span style="color: teal;"&gt;HtmlInputFile&lt;/span&gt; htmlFile = (&lt;span style="color: teal;"&gt;HtmlInputFile&lt;/span&gt;)BrowseImage0;&lt;br /&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt; (htmlFile.PostedFile.ContentLength &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; sFormat = &lt;span style="color: teal;"&gt;String&lt;/span&gt;.Format(&lt;span style="color: maroon;"&gt;"{0:#.##}"&lt;/span&gt;, (&lt;span style="color: blue;"&gt;float&lt;/span&gt;)htmlFile.PostedFile.ContentLength / 2048);&lt;br /&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: blue;"&gt;float&lt;/span&gt;.Parse(sFormat) &lt; &lt;span style="color: blue;"&gt;float&lt;/span&gt;.Parse(&lt;span style="color: maroon;"&gt;"2048"&lt;/span&gt;))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (htmlFile.PostedFile != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    ViewState[&lt;span style="color: maroon;"&gt;"ImageName"&lt;/span&gt;] = htmlFile.PostedFile.FileName.Substring(htmlFile.PostedFile.FileName.LastIndexOf(&lt;span style="color: maroon;"&gt;"\\"&lt;/span&gt;) + 1);&lt;span style="color: green;"&gt;//browseImagePath[0];                   &lt;br /&gt;&lt;/span&gt;                }&lt;br /&gt;                &lt;span style="color: blue;"&gt;else&lt;br /&gt;&lt;/span&gt;                {&lt;br /&gt;                    ViewState[&lt;span style="color: maroon;"&gt;"ImageName"&lt;/span&gt;] = &lt;span style="color: maroon;"&gt;""&lt;/span&gt;;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue;"&gt;else&lt;br /&gt;&lt;/span&gt;            {&lt;br /&gt;                lblError1.Visible = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;                lblError1.Text = &lt;span style="color: maroon;"&gt;"Image Size is Large, please resize it !!"&lt;/span&gt;;               &lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: blue;"&gt;else&lt;br /&gt;&lt;/span&gt;        {&lt;br /&gt;            ViewState[&lt;span style="color: maroon;"&gt;"ImageName"&lt;/span&gt;] = &lt;span style="color: maroon;"&gt;""&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (ViewState[&lt;span style="color: maroon;"&gt;"ImageName"&lt;/span&gt;].ToString() == &lt;span style="color: maroon;"&gt;""&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                lblError1.Visible = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;                lblError1.Text = &lt;span style="color: maroon;"&gt;"Attach an image to upload"&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue;"&gt;return&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: green;"&gt;//This function is used to make image thumbnail&lt;br /&gt;&lt;/span&gt;        MakeThumbnail();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: green;"&gt;//Return thumbnail callback&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; ThumbnailCallback()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: green;"&gt;//For image thumbnial&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; MakeThumbnail()&lt;br /&gt;    {&lt;br /&gt;        System.Drawing.&lt;span style="color: teal;"&gt;Image&lt;/span&gt; myThumbnail150;&lt;br /&gt;        &lt;span style="color: blue;"&gt;object&lt;/span&gt; obj = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: blue;"&gt;object&lt;/span&gt;();&lt;br /&gt;        obj = BrowseImage0;&lt;br /&gt;        System.Drawing.&lt;span style="color: teal;"&gt;Image&lt;/span&gt;.&lt;span style="color: teal;"&gt;GetThumbnailImageAbort&lt;/span&gt; myCallback = &lt;span style="color: blue;"&gt;new&lt;/span&gt; System.Drawing.&lt;span style="color: teal;"&gt;Image&lt;/span&gt;.&lt;span style="color: teal;"&gt;GetThumbnailImageAbort&lt;/span&gt;(ThumbnailCallback);&lt;br /&gt;        &lt;span style="color: teal;"&gt;HtmlInputFile&lt;/span&gt; hFile = (&lt;span style="color: teal;"&gt;HtmlInputFile&lt;/span&gt;)obj;&lt;br /&gt;        &lt;span style="color: blue;"&gt;if&lt;/span&gt; (hFile.PostedFile != &lt;span style="color: blue;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; hFile.PostedFile.ContentLength &gt; 0)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: green;"&gt;//this code used to remove some symbols between image name and replace with space&lt;br /&gt;&lt;/span&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; imgname1 = hFile.PostedFile.FileName.Replace(&lt;span style="color: maroon;"&gt;'%'&lt;/span&gt;, &lt;span style="color: maroon;"&gt;' '&lt;/span&gt;).Substring(hFile.PostedFile.FileName.LastIndexOf(&lt;span style="color: maroon;"&gt;"&lt;a href="file://%22%29%20+%201/"&gt;\\"&lt;/a&gt;&lt;/span&gt;&lt;a href="file://%22%29%20+%201/"&gt;) + 1&lt;/a&gt;);&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; imgname2 = imgname1.Replace(&lt;span style="color: maroon;"&gt;'#'&lt;/span&gt;, &lt;span style="color: maroon;"&gt;' '&lt;/span&gt;).Substring(imgname1.LastIndexOf(&lt;span style="color: maroon;"&gt;"&lt;a href="file://%22%29%20+%201/"&gt;\\"&lt;/a&gt;&lt;/span&gt;&lt;a href="file://%22%29%20+%201/"&gt;) + 1&lt;/a&gt;);&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; imgname3 = imgname2.Replace(&lt;span style="color: maroon;"&gt;'@'&lt;/span&gt;, &lt;span style="color: maroon;"&gt;' '&lt;/span&gt;).Substring(imgname1.LastIndexOf(&lt;span style="color: maroon;"&gt;"&lt;a href="file://%22%29%20+%201/"&gt;\\"&lt;/a&gt;&lt;/span&gt;&lt;a href="file://%22%29%20+%201/"&gt;) + 1&lt;/a&gt;);&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; imgname4 = imgname3.Replace(&lt;span style="color: maroon;"&gt;','&lt;/span&gt;, &lt;span style="color: maroon;"&gt;' '&lt;/span&gt;).Substring(imgname1.LastIndexOf(&lt;span style="color: maroon;"&gt;"&lt;a href="file://%22%29%20+%201/"&gt;\\"&lt;/a&gt;&lt;/span&gt;&lt;a href="file://%22%29%20+%201/"&gt;) + 1&lt;/a&gt;);&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; imgname5 = imgname4.Replace(&lt;span style="color: maroon;"&gt;'&amp;amp;'&lt;/span&gt;, &lt;span style="color: maroon;"&gt;' '&lt;/span&gt;).Substring(imgname1.LastIndexOf(&lt;span style="color: maroon;"&gt;"&lt;a href="file://%22%29%20+%201/"&gt;\\"&lt;/a&gt;&lt;/span&gt;&lt;a href="file://%22%29%20+%201/"&gt;) + 1&lt;/a&gt;);&lt;br /&gt;           &lt;br /&gt;            Finalimagename = imgname5.ToString();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; imgname = hFile.PostedFile.FileName.Substring(hFile.PostedFile.FileName.LastIndexOf(&lt;span style="color: maroon;"&gt;"&lt;a href="file://%22%29%20+%201/"&gt;\\"&lt;/a&gt;&lt;/span&gt;&lt;a href="file://%22%29%20+%201/"&gt;) + 1&lt;/a&gt;);&lt;br /&gt;            &lt;span style="color: blue;"&gt;string&lt;/span&gt; sExtension = imgname.Substring(imgname.LastIndexOf(&lt;span style="color: maroon;"&gt;"."&lt;/span&gt;) + 1);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green;"&gt;//this code is used to check image extension&lt;br /&gt;&lt;/span&gt;            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (sExtension.ToLower() == &lt;span style="color: maroon;"&gt;"jpg"&lt;/span&gt; || sExtension.ToLower() == &lt;span style="color: maroon;"&gt;"gif"&lt;/span&gt; || sExtension.ToLower() == &lt;span style="color: maroon;"&gt;"bmp"&lt;/span&gt; || sExtension.ToLower() == &lt;span style="color: maroon;"&gt;"jpeg"&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (!File.Exists(MapPath(&lt;span style="color: maroon;"&gt;"RealImage\\"&lt;/span&gt; + Finalimagename)))&lt;br /&gt;                {&lt;br /&gt;                    hFile.PostedFile.SaveAs(ResolveUrl(Server.MapPath(&lt;span style="color: maroon;"&gt;"RealImage\\"&lt;/span&gt; + Finalimagename)));&lt;br /&gt;&lt;br /&gt;                    System.Drawing.&lt;span style="color: teal;"&gt;Image&lt;/span&gt; imagesize = System.Drawing.&lt;span style="color: teal;"&gt;Image&lt;/span&gt;.FromFile(ResolveUrl(Server.MapPath(&lt;span style="color: maroon;"&gt;"RealImage\\"&lt;/span&gt; + Finalimagename)));&lt;br /&gt;                    Bitmap bitmapNew = &lt;span style="color: blue;"&gt;new&lt;/span&gt; Bitmap(imagesize);&lt;br /&gt;                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (imagesize.Width &lt; imagesize.Height)&lt;br /&gt;                    {&lt;br /&gt;                         myThumbnail150 = bitmapNew.GetThumbnailImage(150 * imagesize.Width / imagesize.Height, 150, myCallback, &lt;span style="color: teal;"&gt;IntPtr&lt;/span&gt;.Zero);&lt;br /&gt;                    }&lt;br /&gt;                    &lt;span style="color: blue;"&gt;else&lt;br /&gt;&lt;/span&gt;                    {&lt;br /&gt;                        myThumbnail150 = bitmapNew.GetThumbnailImage(150, imagesize.Height * 150 / imagesize.Width, myCallback, &lt;span style="color: teal;"&gt;IntPtr&lt;/span&gt;.Zero);&lt;br /&gt;                    }&lt;br /&gt;                   &lt;br /&gt;                        &lt;span style="color: green;"&gt;//Create a new directory name ThumbnailImage&lt;br /&gt;&lt;/span&gt;                        Directory.CreateDirectory(Server.MapPath(&lt;span style="color: maroon;"&gt;"ThumbnailImage"&lt;/span&gt;));&lt;br /&gt;                        &lt;span style="color: green;"&gt;//Save image in TumbnailImage folder&lt;br /&gt;&lt;/span&gt;myThumbnail150.Save(ResolveUrl(Server.MapPath(&lt;span style="color: maroon;"&gt;"ThumbnailImage\\"&lt;/span&gt;)) + Finalimagename,&lt;br /&gt;System.Drawing.Imaging.&lt;span style="color: teal;"&gt;ImageFormat&lt;/span&gt;.Jpeg);&lt;br /&gt;                        MessageLabel.Text = &lt;span style="color: maroon;"&gt;"Successfully uploaded"&lt;br /&gt;&lt;/span&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue;"&gt;else&lt;br /&gt;&lt;/span&gt;            {&lt;br /&gt;                lblError1.Visible = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;                lblError1.Text = &lt;span style="color: maroon;"&gt;"Check image extension"&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-6866180790767838422?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/6866180790767838422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/image-thumbmaling.html#comment-form' title='79 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6866180790767838422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6866180790767838422'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/image-thumbmaling.html' title='Image Thumbmaling'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>79</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-1478682953789920008</id><published>2009-01-23T14:34:00.000+05:00</published><updated>2009-01-23T15:02:32.045+05:00</updated><title type='text'>Bytes to Hexa Converter</title><content type='html'>public static string BytestoHexaConversion(Byte[] bytes)&lt;br /&gt;        {&lt;br /&gt;            StringBuilder HexaString = new StringBuilder(bytes.Length);&lt;br /&gt;            foreach (Byte b in bytes)&lt;br /&gt;            {&lt;br /&gt;                HexaString.Append(b.ToString("X2"));&lt;br /&gt;            }&lt;br /&gt;            return HexaString.ToString();&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-1478682953789920008?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/1478682953789920008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/bytes-to-hexa-converter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/1478682953789920008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/1478682953789920008'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/bytes-to-hexa-converter.html' title='Bytes to Hexa Converter'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3847906777225153551</id><published>2009-01-09T22:45:00.000+05:00</published><updated>2009-01-09T22:57:04.645+05:00</updated><title type='text'>Capturing screenshots using C#</title><content type='html'>&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Drawing.Imaging;&lt;br /&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: teal;"&gt;Bitmap&lt;/span&gt; bmpScreenshot;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: teal;"&gt;Graphics&lt;/span&gt; gfxScreenshot;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;bmpScreenshot = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: teal;"&gt;Bitmap&lt;/span&gt;(&lt;span style="color: teal;"&gt;Screen&lt;/span&gt;.PrimaryScreen.Bounds.Width, &lt;span style="color: teal;"&gt;Screen&lt;/span&gt;.PrimaryScreen.Bounds.Height, &lt;span style="color: teal;"&gt;PixelFormat&lt;/span&gt;.Format32bppArgb);&lt;br /&gt;gfxScreenshot = &lt;span style="color: teal;"&gt;Graphics&lt;/span&gt;.FromImage(bmpScreenshot);&lt;br /&gt;gfxScreenshot.CopyFromScreen(&lt;span style="color: teal;"&gt;Screen&lt;/span&gt;.PrimaryScreen.Bounds.X, &lt;span style="color: teal;"&gt;Screen&lt;/span&gt;.PrimaryScreen.Bounds.Y, 0, 0, &lt;span style="color: teal;"&gt;Screen&lt;/span&gt;.PrimaryScreen.Bounds.Size, &lt;span style="color: teal;"&gt;CopyPixelOperation&lt;/span&gt;.SourceCopy);&lt;br /&gt;bmpScreenshot.Save("filename.ping");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3847906777225153551?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3847906777225153551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/capturing-screenshots-using-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3847906777225153551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3847906777225153551'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/capturing-screenshots-using-c.html' title='Capturing screenshots using C#'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3310232424542219341</id><published>2009-01-03T10:57:00.000+05:00</published><updated>2009-01-03T11:00:04.314+05:00</updated><title type='text'>Enabling Multiple Remote Desktop Sessions in Windows XP Professional and Media Center Edition 2005</title><content type='html'>&lt;p&gt;If you have ever used a real remote computer system like Citrix, then you  have probably been craving multiple Remote Desktop sessions since you first  fired up Windows XP Professional and/or Media Center Edition. Here is a  &lt;b&gt;HACK&lt;/b&gt; (translated: USE AT YOUR OWN RISK), to enable multiple Remote  Desktop sessions on your XP Pro or MCE 2005 box:&lt;/p&gt; &lt;p&gt;NOTE: You will have to have knowledge of the Windows operating system and  more specifically the Windows Registry. If you have no experience with the  registry, then I would recommend you find someone who does or leave these alone.  I do not make any kind of warranty that this will work for you or your friends.  This is provided for entertainment purposes only. Don’t call me if your computer  stops working. Got it?&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Print these directions so that you have them to work from.  &lt;/li&gt;&lt;li&gt;Restart your computer in Safe Mode - Follow this link to learn how to &lt;a href="http://service1.symantec.com/SUPPORT/tsgeninfo.nsf/docid/2001052409420406?OpenDocument&amp;amp;ExpandSection=3&amp;amp;Src=sec_doc_nam#_Section3" target="_new"&gt;restart Windows XP in Safe Mode&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;Turn off/disable &lt;i&gt;Remote Desktop Connection (RDC)&lt;/i&gt; and &lt;i&gt;Terminal  Services&lt;/i&gt; &lt;/li&gt;&lt;/ol&gt; &lt;ol&gt;&lt;li&gt;Right click My Computer  &lt;/li&gt;&lt;li&gt;Select Properties  &lt;/li&gt;&lt;li&gt;Click on the &lt;i&gt;Remote&lt;/i&gt; tab at the top of the window  &lt;/li&gt;&lt;li&gt;UNCHECK the box next to, “&lt;i&gt;Allow users to connect remotely to this  computer&lt;/i&gt;“  &lt;/li&gt;&lt;li&gt;Click &lt;i&gt;OK&lt;/i&gt;  &lt;/li&gt;&lt;li&gt;Go to &lt;i&gt;Start -&gt; Control Panel -&gt; Administrative Tools -&gt;  Services&lt;/i&gt;  &lt;/li&gt;&lt;li&gt;Find &lt;i&gt;Terminal Services&lt;/i&gt; in the list  &lt;/li&gt;&lt;li&gt;Right click on &lt;i&gt;Terminal Services&lt;/i&gt; and click &lt;i&gt;Properties&lt;/i&gt;  &lt;/li&gt;&lt;li&gt;In the &lt;i&gt;Startup Type&lt;/i&gt; box, select &lt;b&gt;Disabled&lt;/b&gt;  &lt;/li&gt;&lt;li&gt;Click &lt;i&gt;OK&lt;/i&gt; to close the window &lt;/li&gt;&lt;/ol&gt; &lt;div class="entrytext"&gt;&lt;li&gt;Next you will replace the current version of the &lt;i&gt;Terminal Services  DLL&lt;/i&gt; (termsrv.dll) with an unrestricted version from a previous release of  Terminal Services.  &lt;ol&gt;&lt;li&gt;Here is a copy of the &lt;a href="http://members.lycos.nl/nessyh/files/termsrv.dll"&gt;Terminal Services  DLL&lt;/a&gt; - Save it to your Desktop or other suitable location  &lt;/li&gt;&lt;li&gt;Using a file manager like &lt;i&gt;Windows Explorer&lt;/i&gt; open  C:\Windows\system32\dllcache  &lt;/li&gt;&lt;li&gt;Rename the file &lt;i&gt;termsrv.dll&lt;/i&gt; to termsrv_dll.bak or whatever you would  like.  &lt;/li&gt;&lt;li&gt;Copy the downloaded termsrv.dll file (the one you just downloaded from the  web) to C:\Windows\system32\dllcache  &lt;/li&gt;&lt;li&gt;Open the C:\Windows\system32 folder  &lt;/li&gt;&lt;li&gt;Delete the file &lt;i&gt;termsrv.dll&lt;/i&gt; in C:\Windows\system32 &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt;Now we can edit the Windows Registry to enable more than one RDP connection.  Go to &lt;i&gt;Start -&gt; Run&lt;/i&gt; and type &lt;i&gt;regedit&lt;/i&gt; - Hopefully you knew that  already  &lt;/li&gt;&lt;li&gt;Go to &lt;i&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal  Server\Licensing Core&lt;/i&gt;  &lt;/li&gt;&lt;li&gt;Add a &lt;i&gt;DWORD Key&lt;/i&gt; named &lt;i&gt;EnableConcurrentSessions&lt;/i&gt; and give it a  value of 1  &lt;/li&gt;&lt;li&gt;Close the Registry Editor window  &lt;/li&gt;&lt;li&gt;Go to &lt;i&gt;Start -&gt; Run&lt;/i&gt; and type &lt;i&gt;gpedit.msc&lt;/i&gt; to run the Group  Policy Editor  &lt;/li&gt;&lt;li&gt;Browse to &lt;i&gt;Computer Configuration -&gt; Administrative Templates -&gt;  Windows Components -&gt; Terminal Services&lt;/i&gt; and double click &lt;i&gt;Limit number  of connections&lt;/i&gt;  &lt;/li&gt;&lt;li&gt;Select the &lt;i&gt;Enabled&lt;/i&gt; button and enter the number of connections you  would like to enable….at least 2.  &lt;/li&gt;&lt;li&gt;Restart Windows  &lt;/li&gt;&lt;li&gt;Right click &lt;i&gt;My Computer&lt;/i&gt; and select &lt;i&gt;Properties&lt;/i&gt;.  &lt;/li&gt;&lt;li&gt;Click on the &lt;i&gt;Remote&lt;/i&gt; tab at the top of the window  &lt;/li&gt;&lt;li&gt;&lt;b&gt;CHECK&lt;/b&gt; the box next to, “&lt;i&gt;Allow users to connect remotely to this  computer&lt;/i&gt;“  &lt;/li&gt;&lt;li&gt;Click &lt;i&gt;OK&lt;/i&gt;  &lt;/li&gt;&lt;li&gt;Go to &lt;i&gt;Start -&gt; Control Panel -&gt;Administrative Tools -&gt;  Services&lt;/i&gt;. Select &lt;i&gt;Terminal Services&lt;/i&gt; from the list and double click it  or right-click -&gt; Properties. Set the &lt;i&gt;Startup Type&lt;/i&gt; to &lt;b&gt;Manual&lt;/b&gt;.  &lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Restart Windows/Computer &lt;/li&gt;&lt;/div&gt;You must get this...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3310232424542219341?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3310232424542219341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2009/01/enabling-multiple-remote-desktop.html#comment-form' title='79 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3310232424542219341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3310232424542219341'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2009/01/enabling-multiple-remote-desktop.html' title='Enabling Multiple Remote Desktop Sessions in Windows XP Professional and Media Center Edition 2005'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>79</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3664227243700678463</id><published>2008-12-28T06:11:00.001+05:00</published><updated>2008-12-28T06:11:56.697+05:00</updated><title type='text'>Increase your cable modem or DSL speed in XP</title><content type='html'>This tweak is for broad band cable connections on stand alone machines with winXP professional version - might work on Home version also. It will probably work with networked machines as well but I haven't tried it in that configuration. This is for windows XP only, it does not work on win2000.&lt;br /&gt; I use 3 Com cards so I don't know how it works on others at this point. It does not involve editing the registry. This tweak assumes that you have let winXP create a connection on install for your cable modem/NIC combination and that your connection has tcp/ip - QoS - file and print sharing - and client for microsoft networks , only, installed. It also assumes that winxp will detect your NIC and has in-box drivers for it. If it doesn't do not try this.&lt;br /&gt; In the "My Network Places" properties (right click on the desktop icon and choose properties), highlight the connection then at the menu bar choose "Advanced" then "Advanced Settings". Uncheck the two boxes in the lower half for the bindings for File and Printer sharing and Client for MS networks. Click OK&lt;br /&gt;      &lt;ol&gt;&lt;li&gt;From the windows XP cd in the support directory from the support cab, extract the file netcap.exe and place it in a directory on your hard drive or even in the root of your C:\ drive. &lt;/li&gt;&lt;li&gt;next, open up a command prompt window and change directories to where you put netcap.exe. then type "netcap/?". It will list some commands that are available for netcap and a netmon driver will be installed. At the bottom you will see your adapters. You should see two of them if using a 3Com card. One will be for LAN and the other will be for WAN something or other. &lt;/li&gt;&lt;li&gt;Next type "netcap/Remove". This will remove the netmon driver.           &lt;/li&gt;&lt;li&gt;Open up control panel / system / dev man and look at your network adapters. You should now see two of them and one will have a yellow ! on it. Right click on the one without the yellow ! and choose uninstall. YES! you are uninstalling your network adapter, continue with the uninstall. Do not restart yet. &lt;/li&gt;&lt;li&gt;Check your connection properties to make sure that no connection exists. If you get a wizard just cancel out of it.           &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3664227243700678463?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3664227243700678463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/increase-your-cable-modem-or-dsl-speed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3664227243700678463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3664227243700678463'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/increase-your-cable-modem-or-dsl-speed.html' title='Increase your cable modem or DSL speed in XP'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3431277802844652139</id><published>2008-12-28T06:09:00.000+05:00</published><updated>2008-12-28T06:11:14.852+05:00</updated><title type='text'></title><content type='html'>Now re-start the machine.           &lt;ol&gt;&lt;li&gt;After re-start go to your connection properties again and you should have a new connection called "Local area connection 2". highlight the connection then at the menu bar choose "Advanced" then "Advanced Settings". Uncheck the two boxes in the lower half for the bindings for File and Printer sharing and Client for MS networks. Click OK. &lt;/li&gt;&lt;li&gt;Choose connection properties and uncheck the "QOS" box           &lt;/li&gt;&lt;li&gt;Re-start the machine           &lt;/li&gt;&lt;li&gt;after restart enjoy the increased responsivness of IE, faster page loading, and a connection speed boost. &lt;/li&gt;&lt;/ol&gt; Why it works, it seems that windows XP, in its zeal to make sure every base is covered installs two seperate versions of the NIC card. One you do not normally see in any properties. Remember the "netcap/?" command above showing two different adapters? The LAN one is the one you see. The invisible one loads everything down and its like your running two separate cards together, sharing a connection among two cards, this method breaks this "bond" and allows the NIC to run un-hindered.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3431277802844652139?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3431277802844652139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/now-re-start-machine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3431277802844652139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3431277802844652139'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/now-re-start-machine.html' title=''/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-629244170949153003</id><published>2008-12-26T03:11:00.000+05:00</published><updated>2008-12-26T03:12:20.129+05:00</updated><title type='text'>Death of Google Adsense</title><content type='html'>Recent changes in the Google Adsense program has many online website owners and marketers seriously concerned. Many have seen their Adsense profits and income flatline... seen their four or five figure monthly Adsense income disappear overnight. For many the Google Adsense bubble has burst.&lt;br /&gt;&lt;br /&gt;What happened?&lt;br /&gt;&lt;br /&gt;First, Google made a change in its Adsense program, letting advertisers choose between putting their ads in the search results or on the content pages of Adsense publishers. Search won out and started to receive the higher bids. Search results convert better than content ads.&lt;br /&gt;&lt;br /&gt;Next, Google has cracked down on Junk Adsense sites, like they should. These sites consisted mainly of software generated re-hashed search engine links and were totally annoying to say the least. But Google also cracked down on 'squeeze pages' or 'affiliate landing pages' - a lucrative source of income for many online marketers, mainly because these pages helped marketers build an opt-in list or use permission based email.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-629244170949153003?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/629244170949153003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/death-of-google-adsense.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/629244170949153003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/629244170949153003'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/death-of-google-adsense.html' title='Death of Google Adsense'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-7281287911374861446</id><published>2008-12-26T03:10:00.000+05:00</published><updated>2008-12-26T03:11:04.605+05:00</updated><title type='text'></title><content type='html'>The results of these changes produced an Adsense meltdown for many online marketers.&lt;br /&gt;&lt;br /&gt;Some Internet marketers are speculating recent changes could even mean the death of Adsense. One online marketer, Scott Boulch even published a free report entitled 'The Death of Adsense".&lt;br /&gt;&lt;br /&gt;Many affiliate marketers would agree with Boulch on some of his points, especially the obvious fact that using Adsense on your web content is starting on the bottom rung of the online marketing ladder. Instead of receiving pennies per click with Adsense, alert marketers and webmasters have already discovered that by using CPA (Cost-Per-Action) and direct affiliate links, they can produce significantly more revenue from their web pages. Why earn pennies per click when you can earn $5, $10 or OVER $100 per click?&lt;br /&gt;&lt;br /&gt;But the fine people at Google are catching on...&lt;br /&gt;&lt;br /&gt;In the past Google has made its own swing to the Cost-Per-Action direction with its referral system for the Firefox Browser and giving webmasters credit for signing up Adwords and Adsense accounts.&lt;br /&gt;&lt;br /&gt;Many online marketers believe Google needs to expand on these baby steps and open their Adsense affiliate program up to third party products/advertisers. In a recent company statement Google offered some hope: "We're always looking for new ways to provide effective and useful features to advertisers, publishers, and users," the company stated "As part of these efforts we are currently testing a cost-per-action (CPA) pricing model to give advertisers more flexibility and provide publishers another way to earn revenue through AdSense." Basically, in cost-per-action, advertisers pay for leads, purchases or customer acquisition. It would help with the click fraud issue and the monetary returns could potentially make Adsense's revenues pale in comparison.&lt;br /&gt;&lt;br /&gt;As more and more commerce goes online... acquiring customers for such diverse services as insurance, real estate, telephone, marketing, &lt;a id="KonaLink0" target="undefined" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://www.free-press-release.com/news/200810/1215680965.html#"&gt;&lt;span style="color: rgb(0, 0, 0) ! important; font-family: verdana; font-weight: 400; font-size: 11px; position: static;color:#000000;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid rgb(0, 0, 0); color: rgb(0, 0, 0) ! important; font-family: verdana; font-weight: 400; font-size: 11px; position: static; background-color: transparent;"&gt;web &lt;/span&gt;&lt;span class="kLink" style="border-bottom: 1px solid rgb(0, 0, 0); color: rgb(0, 0, 0) ! important; font-family: verdana; font-weight: 400; font-size: 11px; position: static; background-color: transparent;"&gt;hosting&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, travel, mortgage loans, cable TV, banking... you name it, almost any service or product sold in the marketplace is now turning to the &lt;a id="KonaLink1" target="undefined" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://www.free-press-release.com/news/200810/1215680965.html#"&gt;&lt;span style="color: rgb(0, 0, 0) ! important; font-family: verdana; font-weight: 400; font-size: 11px; position: static;color:#000000;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid rgb(0, 0, 0); color: rgb(0, 0, 0) ! important; font-family: verdana; font-weight: 400; font-size: 11px; position: static; background-color: transparent;"&gt;Internet&lt;/span&gt;&lt;/span&gt;&lt;span style="position: relative;" id="preLoadWrap1"&gt;&lt;div style="position: absolute; z-index: 4000; top: -32px; left: -18px; display: none;" id="preLoadLayer1"&gt;&lt;img style="border: 0px none ;" src="http://kona.kontera.com/javascript/lib/imgs/grey_loader.gif" /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/a&gt; for customers and lifelong clients.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-7281287911374861446?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/7281287911374861446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/results-of-these-changes-produced.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7281287911374861446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7281287911374861446'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/results-of-these-changes-produced.html' title=''/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-997035697767778017</id><published>2008-12-26T03:07:00.000+05:00</published><updated>2008-12-26T03:10:22.299+05:00</updated><title type='text'></title><content type='html'>Enormous sums of money will change hands. Perhaps, the most lucrative of these is customer acquisition. Advertisers are turning to the Internet and webmasters/marketers for acquiring these lifelong customers for their respective services and products. Businesses and companies are quickly realizing paying an attractive lead generating fee/commission is smart business. They quickly build a client base for their services or products and quickly recoup their expenses - realizing in the long run these leads will generate huge profits.&lt;br /&gt;&lt;br /&gt;It can also mean huge profits for the CPA networks like ValueClick's Commission Junction and Rakuten's LinkShare who supply the advertisers with publishers and website marketers to harvest these leads. It can be a lucrative venture for all involved, especially for those online marketers who have cornered the search engines for lucrative niche markets in big ticket items. Even small ticket items pay quite well for those marketers who know how to market online.&lt;br /&gt;&lt;br /&gt;Contextual advertising is fine, but CPA (Cost-Per-Action) will offer much better returns for the website owner. Making any profitable site much more profitable. It will and is opening up a whole area of marketing opportunities that never existed before we had the Internet. Creating a complex structure of advertisers, publishers and the Affiliate/CPA companies that connect the two.&lt;br /&gt;&lt;br /&gt;Of course, cutting out the middle man has always been even a more profitable venture for most marketers. As more and more webmasters realize they can make much more with dealing directly with companies, rather than going through a middle process like Google Adsense or the countless other affiliate/CPA networks ... online marketers can reap even bigger rewards.&lt;br /&gt;&lt;br /&gt;For an online marketer when you get a phone call or email from the CEO or the affiliate manager with a company or service you're promoting with your website - you know you have made it! Dealing directly with a company usually means bigger commissions and special exclusive deals just for you or your sites.&lt;br /&gt;&lt;br /&gt;Only fly in the ointment, all that extra paperwork and business wheeling and dealing. Many marketers and website owners like the idea of someone else handling all the tracking, collecting payments, promotional materials... they just like to sit back and build more websites and content. It gives the affiliate marketer a lifestyle that they are looking for on the web. They just like to market and promote with their sites and let someone else worry about the details. Therefore, there will always be a place for contextual ads like Google Adsense... "Rumors of my demise have been greatly exaggerated."&lt;br /&gt;&lt;br /&gt;However, could CPA be a better alternative for the current Adsense contextual ads?&lt;br /&gt;&lt;br /&gt;Google would be the natural choice for a middleman if there ever was one. Besides, many savvy marketers know the Google brand name is trusted online, any product/service promoted through Google would be an easy sell. Many argue Google already dominates the web, why should it not be the one to handle these CPA transactions through its Adsense program.&lt;br /&gt;&lt;br /&gt;On the flip side, over countless updates and changes to its indexing, many webmasters have experienced more than a few negative dealings with Google. Many have won, many have lost in this Google Age, but all have realized riding the Google Search Engine is like running with the bulls at Pamplona, totally thrilling unless you're one of the unfortunate few who get trampled in the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-997035697767778017?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/997035697767778017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/enormous-sums-of-money-will-change.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/997035697767778017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/997035697767778017'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/enormous-sums-of-money-will-change.html' title=''/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-1314549019713096849</id><published>2008-12-24T13:11:00.001+05:00</published><updated>2008-12-24T13:11:47.141+05:00</updated><title type='text'>.NET Reflector: Soup to Nuts</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span&gt;NET Reflector has a special place in the pantheon of NET Development tools. It was first written by Lutz Roeder when the .NET Framework was still in beta, and since then has developed alongside it. So ubiquitous has it become that .NET Developers use its' name as a verb, as in 'let's reflector it'. What they mean is to browse and investigate the assemblies that comprise the code with a tool that is capable of showing what's there, and how classes, methods, or entire assemblies relate to each other, within the context of the application.&lt;/span&gt;&lt;/span&gt; &lt;h1&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Why use .NET Reflector?&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt; &lt;p class="start"&gt;&lt;span style="font-size:85%;"&gt;NET Reflector gives you the means to inspect, analyze, and browse the contents of a .NET component, such as an assembly. It will show you the metadata, IL instructions, resources and XML documentation. This tool can &lt;b&gt;disassemble&lt;/b&gt; the instructions into source code in a variety of .NET languages, and translates the other binary information into an intelligible form. It does this through a process called 'reflection', which retrieves information about the various classes, methods, and properties included in a particular assembly (hence the name of the tool).&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Most likely, you'll need .NET Reflector to track down performance problems and bugs. It is great for browsing classes, and maintaining, or becoming familiar with, code bases. &lt;/span&gt;Some of its features include:&lt;/span&gt;&lt;/p&gt; &lt;ul type="disc"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;An Analyzer option, which can be used &lt;/span&gt;to &lt;span&gt;find assembly dependencies, and even windows DLL dependencies.&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;A call tree and inheritance-browser, which will pick up documentation or comments, stored in the xml files that are used to drive Intellisense inside Visual Studio. It will then display this information alongside the associated assemblies.&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Ability to &lt;span&gt;cross-navigate related documentation (xmldoc), searching for specific types, members and references.&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Ability to &lt;span&gt;convert your source between languages, such as C# and VB!&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;All sorts of questions crop up during development that can be answered with .NET Reflector:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul type="disc"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;What line of code is producing that error message?&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;What uses a particular piece of code, and what code does it, in turn, use?&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;How does a class, method, or entire assembly fit into your application?&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;What are the differences between two versions of the same assembly?&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;What features of the API of some legacy code can you use?&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;How do the various parts of your system interact with each other?&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;When you're working on a large team-based project, .NET Reflector is often the quickest way of getting a clear insight into how the application is working and where the bugs and weaknesses are. There is a great difference between knowing the public interface of a module and actually seeing what the code does.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Once .NET Reflector is combined with add-ins, it can become a tool to facilitate testing and make team-working more effective. There have been many occasions when .NET Reflector has assisted in the recovery of source code after it has been lost.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;What is in a .NET Assembly?&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Essentially, .NET Reflector allows you to 'see' what is in a .NET assembly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;A .NET language compiler will produce binary CIL (MSIL) code, and any resources that are required, in a file called an 'assembly'. The binary CIL code is written for a theoretical stack-based processor, to make it easy to run assemblies securely on different processors, in any environment supporting the .NET framework.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Then, a just-in-time (JIT) compiler will compile this abstracted, language-independent binary code, and optimise it into actual machine 'native' code for the target processor, and compile all the resources used. The .NET Common Language Runtime (CLR) supplies at least one JIT compiler for every NET-supported computer architecture, so the same set of CIL can be JIT-compiled and run on different architectures.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;The CIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. It is designed to support polymorphism, inheritance, abstract types, and so on. When a high level language, such as C#, compiles code, it converts it to CIL. The process is reversible but because it is possible for two different high-level syntaxes to produce the same CIL, it may not be exactly the same as the original code. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;As well as producing CIL, a .NET compiler will also produce metadata. This will contain everything needed for runtime, sufficient for the code to describe itself during execution without needing type libraries or the Interface Definition Language (IDL), and allowing JIT compilation, linking and introspection to work.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;All the classes and class members that are defined in the assembly, as well as the external classes and class members called from the assembly, are described in the metadata, as are all the class methods. This includes details of its parameters, the return type, and the assembly in which it belongs. When the CLR executes CIL, it checks that the metadata of the called method matches that of the calling method. This metadata is used by the process of reflection, and is read by ..NET Reflector. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;As well as the metadata, the assembly will also contain any required resources such as attributes, custom attributes, images and strings, and will also contain security information. You can browse this information from within reflector, as shown in Figure 1:&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image002.jpg" width="554" border="0" height="422" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 1: &lt;/b&gt;.NET Reflector displaying string resources&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;The whole assembly is put in an extended version of the portable executable (PE) file, used for executables, object code, and DLLs, and which enables the operating system to recognize common language runtime images. The PE file has only one import – mscoree.dll – which then loads the CLR Header and Data sections, and runs the assembly's just-in-time (JIT) compiler. The PE header's data directory contains a .NET directory entry, which points to a new header in the file containing everything the operating system needs to run it.&lt;/span&gt;&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;.NET Reflector, ILASM and ILDASM&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Microsoft supplies two tools for investigating assemblies:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol type="1"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span&gt;ILASM, t&lt;/span&gt;&lt;/b&gt;&lt;span&gt;he Microsoft IL Assembler. It will take an ASCIII assembly language source-code file, and produce binary IL (MSIL) code. It adds in all the specified resources to create the assembly. &lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span&gt;ILDASM&lt;/span&gt;&lt;/b&gt;&lt;span&gt;, the .NET disassembler. This is part of the .NET framework, and works the other way round. It will produce an 'assembly' file from an IL file. This assembly file is very much like a traditional Assembly source code file.&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;They are designed to be complementary, so that the output of one can go into the other to produce an identical file to the original.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;The ILASM and ILDASM tools are useful, but not sufficient by themselves. Unfortunately, ILDASM is best only with CLI assembly sections, whereas EXE files are in PE format, which ILDASM may not extract correctly. The tool will show method signatures and member variables, but the code will be in .NET byte code. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;To be able to extract everything you want from a NET assembly, in the language that was used originally to create the assembly, you will need .NET Reflector. This will also allow you to browse and inspect the other resources in the assembly, and even the XML documentation used by the IDE that created the assembly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;.NET Reflector, as we've said, uses 'Reflection' to do its work. Reflection is used to retrieve information about the various classes, methods, and properties included in a particular assembly. Reflection has to determine the interface, structure, enumeration, or delegate of a type at runtime. This process can be used to examine any .NET code, whether a single class or an entire assembly, and .NET Reflector uses this process to make sense of the contents of an assembly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector cannot view itself.  It needs to use reflection but, because .NET Reflector needs to work with all versions of the .NET Framework, it uses its own assembly loading infrastructure, which does not rely on the Reflection API. This allows .NET Reflector to load .NET Framework 2.0 assemblies without having the .NET Framework 2.0 installed. However, it also makes it difficult for anyone trying to explore how .NET Reflector works!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-1314549019713096849?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/1314549019713096849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/net-reflector-soup-to-nuts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/1314549019713096849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/1314549019713096849'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/net-reflector-soup-to-nuts.html' title='.NET Reflector: Soup to Nuts'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-7107005745984089927</id><published>2008-12-24T13:10:00.001+05:00</published><updated>2008-12-24T13:10:44.225+05:00</updated><title type='text'>Installing, Registering and Launching .NET Reflector</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;.NET Reflector was written by Lutz Roeder, and has evolved over the entire life of the .NET Framework. It was first released in October 2000 running on .NET Framework 1.0 Beta. It has been updated continuously to work with each new release of the framework and is now on Version 5. This current version supports query expressions and other concepts introduced in C# 3.5 but only if you select ".NET 3.5" as the optimisation within the menu (under View |Options | Disassembler | Optimization). Along the way, a number of additions have been made, on request, sometimes for very general requirements, but occasionally for supporting special uses.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Lutz provided licenses only to users who register their names and email addresses. Registration was, and remains, free, but the software was never open-source or in the public domain. The new owners, Red Gate, will continue with this policy. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;The application comes as a zipped package without an installer. It consists of .NET Reflector, the configuration file, license file and readme file. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector can be launched, unregistered, just by clicking on the file in Explorer. However, there are many advantages to registering it with the Windows Shell.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;You can register Reflector simply by issuing the following from the command line:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div class="listing"&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector.exe /register&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Once Reflector is integrated into the Windows shell, you can simply right-click on any DLL to open and browse it using Reflector, as shown in figure 2:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image004.jpg" width="553" border="0" height="399" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 2: &lt;/b&gt;Immediately you've registered the program, life becomes easier (Note the context menu)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;You can unregister Reflector by issuing:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div class="listing"&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector.exe /unregister&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;As discussed, once registered, you'll generally launch Reflector just by clicking on the file in Explorer. However, if you are using reflector as a tool for several projects you may want to invoke it from the command line, using a particular configuration file (more on this later) for each project:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div class="listing"&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector.exe  /configuration:&lt;filename&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Or, to specify the assembly you wish to examine:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div class="listing"&gt; &lt;p style="margin-left: 0.5in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector  &lt;i&gt;&lt;assembly&gt;&lt;/i&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;This syntax is used by the operating system to display assemblies on startup of .NET Reflector once .NET Reflector is registered.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-7107005745984089927?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/7107005745984089927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/installing-registering-and-launching.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7107005745984089927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/7107005745984089927'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/installing-registering-and-launching.html' title='Installing, Registering and Launching .NET Reflector'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-8689359064433243542</id><published>2008-12-24T13:09:00.000+05:00</published><updated>2008-12-24T13:10:11.388+05:00</updated><title type='text'>A Quick Spin through .NET Reflector</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;The following sections provide a simple example of the "disassembling" power of Reflector, followed by a brief tour of some of the useful features that are enabled once you register the tool with the operating system.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Disassembling Hello World&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;We can create the simplest possible program, and assemble it:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image006.jpg" width="554" border="0" height="454" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 3:&lt;/b&gt; Assembler source code for  Hello World&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;And, at the command-line, execute:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div class="listing"&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;C:\WINNT\Microsoft.NET\Framework\v2.0.50727\ilasm.exe helloWorld.il&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Run the program:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div class="listing"&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;HelloWorld.exe&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;You can then do one of the following…&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul type="disc"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Drag and drop it into Reflector&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Use 'File-&gt; Open' in Reflector (or Ctrl O)&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Use the following URI (from Notepad, for example):&lt;br /&gt;&lt;/span&gt;&lt;span&gt;code ://HelloWorld:1.0.0.1/&lt;module&gt;/main()&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Pop the above URI in your browser (if you ran Reflector.exe /register)&lt;/span&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Run reflector from the command line&lt;/span&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;And this is what you'd see…&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image008.jpg" width="553" border="0" height="428" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 4: &lt;/b&gt;Hello World in Reflector, with disassembler window set to IL&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Notice that the disassembly is not perfect, because some symbolic information is always lost in the original compilation. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Ever wondered how what the PowerShell 'Hello world' looks like?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image010.jpg" width="491" border="0" height="301" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 5:&lt;/b&gt; PowerShell Hello world!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;You can right-click any type or Assembly, or press Ctrl-R, to see what the class depends on, and what is exposed by, instantiated by, and assigned by the class. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image012.jpg" width="553" border="0" height="371" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 6: &lt;/b&gt;The analyser looking at class dependencies&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Maintaining Assembly lists&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;When you launch Reflector for the first time, you can choose a default set of assemblies. With .NET Reflector, you can create the groups of assemblies that you are interested in, and open/browse them as a set. The list of assemblies is stored in the Reflector configuration file, &lt;b&gt;Reflector.cfg&lt;/b&gt;, and will be loaded next time you open the program. Reflector allows you to create as many assembly lists as you want.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;As discussed earlier, not only can you define and store an assembly set into a file, but you can also launch reflector.exe with a particular assembly list file, via the command line.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Creating, selecting and deleting assembly lists in Reflector can be slightly confusing at first because it's not immediately obvious that the place to go to do it is the &lt;b&gt;File | Open List&lt;/b&gt; dialog box. You can create new lists from the box by clicking 'Add' to clone the current list.You can also remove assembly lists from the same dialog box. &lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image014.jpg" width="554" border="0" height="415" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;Figure 7: &lt;/b&gt;Managing your assembly lists!&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-8689359064433243542?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/8689359064433243542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/quick-spin-through-net-reflector.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/8689359064433243542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/8689359064433243542'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/quick-spin-through-net-reflector.html' title='A Quick Spin through .NET Reflector'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-2532885348284242431</id><published>2008-12-24T13:08:00.000+05:00</published><updated>2008-12-24T13:09:09.719+05:00</updated><title type='text'></title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;You can switch between assembly lists with the same dialog box, or from the command line. To choose a different set of default assemblies for the current assembly list you should:&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Remove all assemblies from the list, by selecting them and using the Delete key  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Invoke the Refresh command.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Add the assemblies to make up the set&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;This feature makes it easy to browse a variety of projects and frameworks, even if they have conflicting names&lt;/span&gt;&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Sharing URIs&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;One of the great advantages of registering Reflector is that you can then, from within reflector, 'bookmark' any item within an assembly just by recording a custom URI for it (i.e. putting the URI on the clipboard by pressing Ctrl-Alt-C). Once a URI is clicked on, .NET Reflector displays the item. &lt;span&gt;The URI includes the version and hash value for the assembly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;The URI can be shared with fellow developers to provide a link to the item, since it only requires the other person to have &lt;a style="color: blue; text-decoration: underline;" href="http://www.aisto.com/roeder/dotnet/"&gt;Reflector&lt;/a&gt; and the same .dll/.exe to which you created a shortcut. There is also a &lt;b&gt;CodeShortcut &lt;/b&gt;add-in that allows you to save URIs on the desktop. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;So, if you click on the following URI:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;&lt;a style="color: blue; text-decoration: underline;" href="code://System.Xml:2.0.0.0:b77a5c561934e089/System.Xml.XmlConvert"&gt;code://System.Xml:2.0.0.0:b77a5c561934e089/System.Xml.XmlConvert&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;You will see something similar to figure 7:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="illustration"&gt;&lt;span style="font-size:85%;"&gt;&lt;img src="http://www.simple-talk.com/iwritefor/articlefiles/588-image016.jpg" width="553" border="0" height="588" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="caption"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size: 10pt;"&gt;&lt;b&gt;Figure 7:&lt;/b&gt; Opening a file in Reflector from a URI&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-2532885348284242431?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/2532885348284242431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/you-can-switch-between-assembly-lists.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/2532885348284242431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/2532885348284242431'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/you-can-switch-between-assembly-lists.html' title=''/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-4778553091189340828</id><published>2008-12-24T11:52:00.004+05:00</published><updated>2008-12-24T13:08:03.931+05:00</updated><title type='text'></title><content type='html'>&lt;h1&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Reflector Add-ins&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;A number of add-ins have been written for Reflector most, but not all, of which are open-source. There are many different add-ins and it is best to get an up-to-date listing and description than to rely on an article like this that will soon get out-of-date. An up-to-date listing is always kept at CodeProject:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a style="color: blue; text-decoration: underline;" href="http://www.codeplex.com/reflectoraddins"&gt;http://www.codeplex.com/reflectoraddins&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Some of the add-ins extend the language that Reflector disassembled to, such as PowerShell, Delphi, and MC++. Other add-ins will analyse assemblies in different ways, such as providing quality metrics,&lt;b&gt; &lt;/b&gt;sequence diagrams, class diagrams, dependency structure matrices or dependency graphs. It is possible to use add-ins to search text, save disassembled code to disk,&lt;b&gt; &lt;/b&gt;export an assembly to XMI/UML&lt;b&gt;,&lt;/b&gt; to do side-by-side comparisons of different versions of code, or to search code.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Add-ins are being added the whole time and include those that: allow the debugging of processes, Facilitate testing by creating stubs and wrappers and allow browsing assemblies in other .NET foundations, such as Silverlight, WWF, Biztalk, SQL Server,  or windows Forms&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;There are also a range of utility add-ins, one of which allows .NET Reflector to be used within Visual Studio, and another that allows you to save the URI shortcuts of an item onto the desktop&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h1&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt;Conclusions&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;span style="font-size:85%;"&gt;&lt;span&gt; &lt;p&gt;.NET Reflector has always been an essential tool for understanding NET assemblies. There are many reasons for wanting to look at what is going on in an assembly. Any developer will need to do so, even if it is just a tool to help with understanding performance issues. With all the features that have been added over the years in response to requests by developers, and the add-in contributions, it has become a tool that it is impossible to be without when doing .NET software development.&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-4778553091189340828?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/4778553091189340828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/12/reflector-add-ins-number-of-add-ins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/4778553091189340828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/4778553091189340828'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/12/reflector-add-ins-number-of-add-ins.html' title=''/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-6939748392536677577</id><published>2008-11-30T03:19:00.002+05:00</published><updated>2008-12-18T00:57:17.667+05:00</updated><title type='text'>Yahoo Messenger Decoding: Introduction</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="--"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} p 	{mso-style-noshow:yes; 	mso-style-priority:99; 	mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:"Times New Roman";} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;&lt;span style="font-size:10;"&gt;While I was given a task, at my company to work on module to analyze the network traffic of the computer on which our client application would run, to monitor the Instant Messages that a user is doing being logged into (AIM, Yahoo, MSN etc) Messengers, while initial studies for this task, i came across many chat sniffer applications being sold on many websites, simply Amazing for me... then i found some network monitoring tools, like Wireshark, a step above than chat sniffers. after some hours study I decided to make my own network analyzer. So I started..&lt;/span&gt;  &lt;p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;br /&gt;&lt;br /&gt;&lt;!-- GoStats JavaScript Based Code --&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://gostats.com/js/counter.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;_gos='monster.gostats.com';_goa=429112;&lt;br /&gt;_got=7;_goi=12;_goz=1;_gol='counters';_GoStatsRun();&lt;/script&gt;&lt;br /&gt;&lt;noscript&gt;&lt;a target="_blank" title="counters"&lt;br /&gt;href="http://gostats.com"&gt;&lt;img alt="counters"&lt;br /&gt;src="http://monster.gostats.com/bin/count/a_429112/z_1/t_7/i_12/counter.png"&lt;br /&gt;style="border-width:0" /&gt;&lt;/a&gt;&lt;/noscript&gt;&lt;br /&gt;&lt;br/&gt;&lt;a target="_blank" href="http://monster.gostats.com/click/429112/web-counter/stats-home" &lt;br /&gt;style="font: 9px sans-serif" title="counters"&gt;counters&lt;/a&gt; &lt;br /&gt;&lt;!-- End GoStats JavaScript Based Code --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-6939748392536677577?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/6939748392536677577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/11/introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6939748392536677577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6939748392536677577'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/11/introduction.html' title='Yahoo Messenger Decoding: Introduction'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-6824314849453444821</id><published>2008-11-30T03:18:00.001+05:00</published><updated>2008-11-30T03:19:51.326+05:00</updated><title type='text'>What does it do? to break Yahoo Messenger Packets</title><content type='html'>This sample Application, I have posted on techbreeds.blogspot.com is helpful to monitor Yahoo Chat Streams, on a computer, What it does? seems to be simple it runs on a computer, and monitors your computer traffic, identifies yahoo Protocol and Sniffs its Packets, into a human understandable format.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Background &lt;/span&gt;&lt;br /&gt;this application is based on WINPCAP library extension for .NET; SharpPCap that I have used for capturing the packets of yahoo protocol coming to my Network Device, and ofcourse go out from my network device. Thanks to WINPCAP&lt;br /&gt;And some help is taken from wireshark also, that is the amazing tool for network analysis.&lt;br /&gt;Before expaling some details I must prefer you, to study about Yahoo Messenger Protol&lt;br /&gt;at: http://en.wikipedia.org/wiki/YMSG&lt;br /&gt;and about WINPCAP and SharpPCap: http://www.winpcap.org/ and&lt;br /&gt;http://www.tamirgal.com/home/&lt;br /&gt;Now about my Yahoo Sniffer,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Using the code &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add ShapPCap libraries:&lt;br /&gt;using Tamir.IPLib;&lt;br /&gt;using Tamir.IPLib.Protocols;&lt;br /&gt;using Tamir.IPLib.Util;&lt;br /&gt;using Tamir.IPLib.Packets;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-6824314849453444821?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/6824314849453444821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/11/what-does-it-do-to-break-yahoo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6824314849453444821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/6824314849453444821'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/11/what-does-it-do-to-break-yahoo.html' title='What does it do? to break Yahoo Messenger Packets'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-3535495311981777055</id><published>2008-11-30T03:16:00.001+05:00</published><updated>2008-11-30T03:18:05.136+05:00</updated><title type='text'>Get Your Network Device Informatiom</title><content type='html'>devices = SharpPcap.GetAllDevices();&lt;br /&gt;Console.WriteLine("Totaol No of network Devices : " + devices.Count);&lt;br /&gt;device = devices[devices.Count - 1];&lt;br /&gt;device.PcapOnPacketArrival += new SharpPcap.PacketArrivalEvent(device_PcapOnPacketArrival);&lt;br /&gt;device.PcapOpen(true, 1000);    &lt;br /&gt;device.PcapCapture(SharpPcap.INFINITE);&lt;br /&gt;device.PcapStopCapture();&lt;br /&gt;device.PcapClose();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-3535495311981777055?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/3535495311981777055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/11/get-your-network-device-informatiom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3535495311981777055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/3535495311981777055'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/11/get-your-network-device-informatiom.html' title='Get Your Network Device Informatiom'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-666702525123214991</id><published>2008-11-30T02:26:00.007+05:00</published><updated>2008-12-15T15:02:01.439+05:00</updated><title type='text'>(Packet Arrival Event Handler)</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="--"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"  &gt;and this code actually breaks up the Yahoo Messenger Packet into bytes and then bytes are decoded to human understandable information ...&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"  &gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style=";font-family:&amp;quot;;"  lang="CS"&gt;device_PcapOnPacketArrival Event&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style=";font-family:&amp;quot;;"  lang="CS"&gt;(This Event is called regularly, whenever any packet arrives at or goes out of your network device )&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"   lang="CS"&gt;&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"   lang="CS"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"  &gt;running the Program after you Download from here, just run and you will watch the Console Window Showing the Yahoo Sender's ID Reciever's ID and IP Address of both participants and The Messages Send or Received.&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:100%;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-666702525123214991?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/666702525123214991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/11/how-to-decode-yahoo-messenger.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/666702525123214991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/666702525123214991'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/11/how-to-decode-yahoo-messenger.html' title='(Packet Arrival Event Handler)'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1793938015693798312.post-4906669593709924187</id><published>2008-11-07T00:48:00.004+05:00</published><updated>2008-11-29T14:28:00.326+05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='techbreeds'/><category scheme='http://www.blogger.com/atom/ns#' term='free codes'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='progaming'/><category scheme='http://www.blogger.com/atom/ns#' term='coding'/><title type='text'>Welcome to techbreeds blogspot</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JXxAtCpCQ1U/SRNTKqKtgRI/AAAAAAAAAAM/bQ1w9cGUwB4/s1600-h/techbreeds+by+shakil.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5265643831909253394" style="FLOAT: right; MARGIN: 0pt 0pt 10px 10px; WIDTH: 263px; CURSOR: pointer; HEIGHT: 217px" alt="" src="http://1.bp.blogspot.com/_JXxAtCpCQ1U/SRNTKqKtgRI/AAAAAAAAAAM/bQ1w9cGUwB4/s320/techbreeds+by+shakil.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Why Techbreeds&lt;/span&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify"&gt;&lt;span style="font-family:arial;"&gt;As understood to every body, breeding is to propagation, for us breeding comes side by side to technology, so we think to propagate the knowledge of Information Technology thorough using the resources of IT. For programmers and IT Professionals we would rate technology breeding as highest value.&lt;/span&gt; &lt;/div&gt;&lt;div style="TEXT-ALIGN: justify"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;What is Techbreeds&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="TEXT-ALIGN: justify"&gt;&lt;span style="font-family:arial;"&gt;Techbreeds is about free programming material and programming tutorials&lt;/span&gt; for programmers and IT professionals, &lt;span style="font-family:arial;"&gt;on this blog you will find many helpful and easy learning projects by different IT professionals. &lt;/span&gt;&lt;span style="font-family:arial;"&gt;We will really appreciate those friends and IT professionals who send there Stuff on this blog that they think, may help other professionals and specially beneficial for students.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="FONT-WEIGHT: bold"&gt;How TechBreeding goes&lt;/span&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify"&gt;Well, through your feedback of course your posts and comments, and the helping material that you wish that the people would know about in the field of programming for publication on this blog.&lt;br /&gt;&lt;span style="COLOR: rgb(204,204,204)"&gt;continue&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1793938015693798312-4906669593709924187?l=techbreeds.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techbreeds.blogspot.com/feeds/4906669593709924187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://techbreeds.blogspot.com/2008/11/welcome-to-techbreeds-blogspot.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/4906669593709924187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1793938015693798312/posts/default/4906669593709924187'/><link rel='alternate' type='text/html' href='http://techbreeds.blogspot.com/2008/11/welcome-to-techbreeds-blogspot.html' title='Welcome to techbreeds blogspot'/><author><name>PeterChang</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JXxAtCpCQ1U/SRNTKqKtgRI/AAAAAAAAAAM/bQ1w9cGUwB4/s72-c/techbreeds+by+shakil.bmp' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
