<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Brij&#039;s arena of .NET</title>
	<atom:link href="http://brijbhushan.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://brijbhushan.net</link>
	<description>.Net - My world, my life</description>
	<lastBuildDate>Sun, 19 May 2013 10:07:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='brijbhushan.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/663275c635ffaa29f7eff3fcedfdea30?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Brij&#039;s arena of .NET</title>
		<link>http://brijbhushan.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://brijbhushan.net/osd.xml" title="Brij&#039;s arena of .NET" />
	<atom:link rel='hub' href='http://brijbhushan.net/?pushpress=hub'/>
		<item>
		<title>Visual Studio 2012 and .NET 4.5 Expert Development Cookbook : A Review</title>
		<link>http://brijbhushan.net/2013/05/19/visual-studio-2012-and-net-4-5-expert-development-cookbook-a-review/</link>
		<comments>http://brijbhushan.net/2013/05/19/visual-studio-2012-and-net-4-5-expert-development-cookbook-a-review/#comments</comments>
		<pubDate>Sun, 19 May 2013 10:07:09 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[Review]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1168</guid>
		<description><![CDATA[In this post, I am going to review a Book Titled as Visual Studio 2012 and .NET 4.5 Expert Development Cookbook and written by Abhishek Sur. This book got published recently and I am feeling really good to review this book. Review As the Title of the book states, this book covers about Visual Studio and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1168&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this post, I am going to review a Book Titled as <strong>Visual Studio 2012 and .NET 4.5 Expert Development Cookbook</strong> and written by <a title="Abhishek Sur" href="http://www.abhisheksur.com/" target="_blank">Abhishek Sur</a>. This book got published recently and I am feeling really good to review this book.</p>
<p><a href="http://www.packtpub.com/visual-studio-11-and-dotnet-4-5-expert-development-cookbook/book"><img class="aligncenter size-full wp-image-1171" alt="6709EN" src="http://brijbhushan.files.wordpress.com/2013/05/6709en.png?w=630"   /></a></p>
<h2>Review</h2>
<p>As the Title of the book states, this book covers about Visual Studio and most of the topics that are widely used amongst .NET developers under the umbrella of .NET.</p>
<p>The book starts with Visual Studio 2012 IDE features and this chapters discusses most of the features that are available since beginning and introduced with the new version. I can assure you that Visual Studio IDE provides lots of features that are very helpful in our day to day development and almost half of these features is not used by most of us. After reading this chapter, you&#8217;ll feel that now your day to day coding become easy and more manageable.</p>
<p><strong>Second chapter</strong> covers the insights of .NET programs and Memory Management. This chapters discusses from writing the code, compilation, binaries , the execution  in detail. If you want to know the little insight that How all these compilation, packages and execution takes place, you&#8217;ll really like this chapter.</p>
<p><strong>Third chapter</strong> talks about Asynchronous programming in detail. Most of developer either does not write the asynchronous programs or do not follow the best practices. This chapters covers all the aspects of asynchronous programming with proper code snippets. it also suggests that in which scenario what pattern one should follow.</p>
<p><strong>Fourth Chapter</strong> covers the changes that took place in ASP.NET 4.5 and covers the new changes with examples. It also includes the IDE changes that helps writing ASP.NET 4.5 application. In all, it gives a quick hands on for ASP.NET 4.5</p>
<p><strong>Fifth Chapter</strong> covers the changes in WPF and talks the topic like MVVM pattern, Ribbon User Interface and WorkEvent pattern in WPF with examples. So if have worked on WPF you&#8217;ll get to know the enhancements made in it.</p>
<p><strong>Sixth Chapter</strong> talks about Touch-sensitive device Applications in Windows 8. This is relatively new topic and covers about different flavors of writing windows 8 apps.  In all, after reading this chapter you&#8217;ll get practical knowledge on writing Windows 8 apps and app life cycle.</p>
<p><strong>Last (Seventh) Chapter</strong> and it is also the chapter covers about Communications and Sharing about Windows 8 apps. It is relatively advance topic and talks about the communication between multiple windows 8 apps and working network enable windows 8 apps. After getting basics of Windows 8 apps in last chapter, this covers advance topics wit examples.</p>
<p>One thing that I see as a flaw considering a common developers that most of the chapters are little lengthy includes more than 50 pages and cover lots of things. If you are book lover then it should not be an issue but for normal developer, you start a chapter and keep reading little long to complete a chapter.</p>
<p>At last, I would highly recommend this book to those who want to learn the changes took place in .NET 4.5 including IDE and other various technologies like ASP.NET, WPF , Windows 8 apps. This book includes many code snippets and example so that once gets practical knowledge with diagrams whenever required. As this books covers most of the topics so it focuses mainly the changes in .NET 4.5 and gives brief about the earlier existing feature. So it&#8217;s better if you have earlier working knowledge on the technologies that it discusses.</p>
<p>You can buy this book from the blow link</p>
<p><a href="http://www.packtpub.com/visual-studio-11-and-dotnet-4-5-expert-development-cookbook/book" target="_blank">http://www.packtpub.com/visual-studio-11-and-dotnet-4-5-expert-development-cookbook/book</a></p>
<p>Thanks to you all <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1168&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/05/19/visual-studio-2012-and-net-4-5-expert-development-cookbook-a-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/05/6709en.png" medium="image">
			<media:title type="html">6709EN</media:title>
		</media:content>
	</item>
		<item>
		<title>Join me at C# Corner Delhi Chapter event</title>
		<link>http://brijbhushan.net/2013/05/17/join-me-at-c-corner-delhi-chapter-event/</link>
		<comments>http://brijbhushan.net/2013/05/17/join-me-at-c-corner-delhi-chapter-event/#comments</comments>
		<pubDate>Fri, 17 May 2013 13:21:04 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[Event]]></category>
		<category><![CDATA[C# Corner]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1176</guid>
		<description><![CDATA[Hi All, C# Corner Delhi Chapter is organizing a full day event in Noida on 18th May 2013. The theme of the day is WCF and there will be full day Hands on Lab on various topics on WCF. I&#8217;ll be speaking on few topics there. To get the event details Click Here So if [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1176&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hi All,</p>
<p>C# Corner Delhi Chapter is organizing a full day event in Noida on 18th May 2013. The theme of the day is <strong>WCF</strong> and there will be full day Hands on Lab on various topics on WCF. I&#8217;ll be speaking on few topics there.</p>
<p>To get the event details <a href="http://www.c-sharpcorner.com/Events/15/" target="_blank">Click Here</a></p>
<p>So if you want practical oriented learning on WCF, Join us in time and grab your seat.</p>
<p>Thanks,</p>
<p>Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1176&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/05/17/join-me-at-c-corner-delhi-chapter-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with WebGrid using AJAX : ASP.NET MVC</title>
		<link>http://brijbhushan.net/2013/05/03/working-with-webgrid-using-ajax-asp-net-mvc/</link>
		<comments>http://brijbhushan.net/2013/05/03/working-with-webgrid-using-ajax-asp-net-mvc/#comments</comments>
		<pubDate>Thu, 02 May 2013 18:30:43 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1152</guid>
		<description><![CDATA[I am going to write another post on ASP.NET MVC. Here in this post, I&#8217;ll be talking about WebGrid. If you have read my last post ( to go Click here), I had a main View and many Partial Views that are integrated with main View. Every partial view was independent and we loaded each [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1152&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<iframe src="https://skydrive.live.com/embed?cid=76AD1CA7127E3A94&#038;resid=76AD1CA7127E3A94%21108&#038;authkey=AO7O_xuSDSL1Tmg" width="98" height="120" frameborder="0" scrolling="no"></iframe>
<p>I am going to write another post on ASP.NET MVC. Here in this post, I&#8217;ll be talking about WebGrid. If you have read my last post ( to go <a title="Loading the partial views using Ajax for Beginners" href="http://brijbhushan.net/2013/04/28/loading-the-partial-views-using-ajax-for-beginners/" target="_blank">Click here</a>), I had a main View and many Partial Views that are integrated with main View. Every partial view was independent and we loaded each partial view via jQuery AJAX call.</p>
<p>I got another requirement to have one more partial view on that page which also shows the data similar to other controls but here the requirement was to provide a specific feature <em>Sorting</em>. So as I was looking for various options for it. First I thought to making my custom partial view which provides the desired behavior. But I thought of using any existing control.</p>
<p>Later I found, that a class WebGrid is provided and available under namespace <em>System.Web.Helpers</em>, that renders the data in HTML table element and also provide feature like sorting, paging etc. I required sorting feature so I decided to use it and found fairly simple to write the code for it.</p>
<p>The code at my partial view is as</p>
<pre class="brush: csharp; title: ; notranslate">
@model IList
@{
    WebGrid grid = new WebGrid(Model);
}

@grid.GetHtml( columns:grid.Columns(
	        grid.Column(&quot;ProductName&quot;, &quot;Product Name&quot;),
		grid.Column(&quot;UnitPrice&quot;, &quot;Unit Price&quot;),
		grid.Column(&quot;SaleDate&quot;, &quot;Sale Date&quot;),
                grid.Column(&quot;SoldQuantity&quot;, &quot;Sold Quantity&quot;),
		grid.Column(&quot;SalesPersonName&quot;, &quot;Sales Man&quot;)
     )
 )
</pre>
<p>If we see the above code, we have created am instance of WebGrid and gave the model in the constructor itself. So that it can bind with the model. Then I have defined the column in the WebGrid that I want to show on the page.</p>
<p>I have just added this control to my sample that I created in last post. (I&#8217;ll attach the complete code) and wrote my Client side to load the control as</p>
<pre class="brush: csharp; title: ; notranslate">
        $.ajax({
            url: '/Home/GetSalesDetails',
            contentType: 'application/html; charset=utf-8',
            type: 'GET',
            dataType: 'html'

        })
       .success(function (result) {

           $('#dvSalesDetailsLoader').hide();
           $('#dvSalesdetails').show();
           $('#dvSalesdetails').html(result);
       })
       .error(function (xhr, status) {
           alert(status);
       })
</pre>
<p>Apart from this  I created the model class for SalesDetails and corresponding Controller method.</p>
<p>Here if we see I am again using jQuery ajax to load the control and assigning the returned HTML to the corresponding div.</p>
<p>I have shown the specific code that is required for this post. The complete code is attached.</p>
<p>When I ran the code, it worked perfectly as</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/05/first.png"><img class="aligncenter size-full wp-image-1158" alt="Full Page" src="http://brijbhushan.files.wordpress.com/2013/05/first.png?w=630"   /></a></p>
<p>You can see the newly added control (Sales Details in the encircled area), It displays the data perfectly. But when I clicked on Unit Price column header to sort, I got shocked because it got displayed as</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/05/second1.png"><img class="aligncenter size-full wp-image-1160" alt="After sorting" src="http://brijbhushan.files.wordpress.com/2013/05/second1.png?w=630"   /></a></p>
<p>But when I gave it a thought, I understood the problem. After clicking on Unit Price the page did not maintained the state of the page and after the refresh only control that I clicked got available on the refreshed page.</p>
<p>But if you see the column is sorted and if check the URL grid itself send the sort column name and sort direction as query string.</p>
<p>I had to refresh the only that area of the page that contains the last control. So I did some research on it and made changes and finally got succeeded. For that I had to made the change in the code.</p>
<p>First I updated the code where I instantiated the WebGrid class in the Partial View as</p>
<pre class="brush: csharp; title: ; notranslate">
WebGrid grid = new WebGrid(Model, ajaxUpdateCallback: &quot;SalesDetailsUpdate&quot;, ajaxUpdateContainerId: &quot;dvSalesdetails&quot;);
</pre>
<p>Here, if you see I have assigned two more properties; one is <em>ajaxUpdateContainerId</em> which is assigned with the div id where the control&#8217;s rendered HTML is displayed. And another <em>ajaxUpdateCallback</em> this is assigned a Client side method that is fired on every refresh initiated from the grid. So the Client side method is simple and is as</p>
<pre class="brush: csharp; title: ; notranslate">
        function SalesDetailsUpdate(result) {
            $('#dvSalesdetails').html(result);
        }
</pre>
<p>Here I am just putting the result in the defined div. Now when I ran the code, It started working fine and the now only the grid<br />
is updating on sorting.</p>
<p>Hope you have enjoyed this post.</p>
<p>Thanks,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1152&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/05/03/working-with-webgrid-using-ajax-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/05/first.png" medium="image">
			<media:title type="html">Full Page</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/05/second1.png" medium="image">
			<media:title type="html">After sorting</media:title>
		</media:content>
	</item>
		<item>
		<title>Loading the partial views using Ajax for Beginners</title>
		<link>http://brijbhushan.net/2013/04/28/loading-the-partial-views-using-ajax-for-beginners/</link>
		<comments>http://brijbhushan.net/2013/04/28/loading-the-partial-views-using-ajax-for-beginners/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 17:27:28 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1140</guid>
		<description><![CDATA[Last week, I was working on an application that was made in ASP.NET MVC3. Earlier I thought of using ASP.NET MVC 4 but didn&#8217;t find any specific feature of ASP.NET MVC4 so moved ahead with ASP.NET MVC3 version. So as I worked on a POC using with ASP.NET MVC initial version long back so I [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1140&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<iframe src="https://skydrive.live.com/embed?cid=76AD1CA7127E3A94&#038;resid=76AD1CA7127E3A94%21107&#038;authkey=AGIf0Ift3C3Ewnk" width="98" height="120" frameborder="0" scrolling="no"></iframe>
<p>Last week, I was working on an application that was made in ASP.NET MVC3. Earlier I thought of using ASP.NET MVC 4 but didn&#8217;t find any specific feature of ASP.NET MVC4 so moved ahead with ASP.NET MVC3 version.</p>
<p>So as I worked on a POC using with ASP.NET MVC initial version long back so I was excited working on it. I had to display multiple user controls and the data of these controls was getting picked up from multiple sources. So I thought of loading the controls via ajax call individually. So let me share my understanding with a example. I have created a sample application in ASP.NET MVC3. I created a main View (called here HomePage.cshtml)and created two Partial Views (_ProductDetails.cstml and _UserDetails.cshtml) that will be displayed. So I&#8217;ll show you how easily we can load these controls via Ajax. It will make page more intuitive and seamless to users.</p>
<p>I am showing simple data in these controls and and one control display the details of the users and other control displays product details. For this, I have created two models User and Product.</p>
<p>While we can load each controls easily via jQuery ajax. For this jQuery must be included in the on the View. By default it is included in the __Layout.cshtml. It works as a master layout of the page but if you are not using it in your View then include jQuery file specifically. So my HomePage.cshtml looks like</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/04/homepage.png"><img class="aligncenter size-full wp-image-1145" alt="HomePage" src="http://brijbhushan.files.wordpress.com/2013/04/homepage.png?w=630"   /></a></p>
<p>and my Client side code is as</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
        $.ajax({
            url: '/Home/GetUserDetails',
            contentType: 'application/html; charset=utf-8',
            type: 'GET',
            dataType: 'html'

        })
        .success(function (result) {
           $('#dvUserdetails').show();
            $('#dvUserdetails').html(result);
        })
        .error(function (xhr, status) {
            alert(status);
        })

        $.ajax({
            url: '/Home/GetProductDetails',
            contentType: 'application/html; charset=utf-8',
            type: 'GET',
            dataType: 'html'

        })
       .success(function (result) {
           $('#dvProductDetails').show();
           $('#dvProductDetails').html(result);
       })
       .error(function (xhr, status) {
           alert(status);
       })

// ]]&gt;&lt;/script&gt;
</pre>
<p>So here you can see as each control is loaded individually. For each control, I have defined a method in Controller and that method is called via Ajax . When result is returned from the ajax call successfully that success event gets fired. Here I am setting the returned HTML in a div and displaying it.</p>
<p>Also here we can easily pass the parameter to the controller methods if we want, via url itself.</p>
<p>Now when page load it fires two ajax calls fired individually and when the result is returned then the control is displayed. In the meantime, user may see blank screen, so here we can show some loader image and once result is returned and we hide it display the control in success event.</p>
<p>I have included the sample in attachment. (I have created this demo using Visual Studio 2012). When we&#8217;ll run the application, it looks like</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/04/afterrunning.png"><img class="aligncenter size-full wp-image-1148" alt="AfterRunning" src="http://brijbhushan.files.wordpress.com/2013/04/afterrunning.png?w=630&#038;h=383" width="630" height="383" /></a></p>
<p>Hope you have enjoyed.</p>
<p>Thanks,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1140&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/04/28/loading-the-partial-views-using-ajax-for-beginners/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/04/homepage.png" medium="image">
			<media:title type="html">HomePage</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/04/afterrunning.png" medium="image">
			<media:title type="html">AfterRunning</media:title>
		</media:content>
	</item>
		<item>
		<title>wsdl ans Svcutil : Add Web Service Reference in VS 2010/2012</title>
		<link>http://brijbhushan.net/2013/04/23/wsdl-ans-svcutil-add-web-service-reference-in-vs-20102012/</link>
		<comments>http://brijbhushan.net/2013/04/23/wsdl-ans-svcutil-add-web-service-reference-in-vs-20102012/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 18:54:09 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Svcutil]]></category>
		<category><![CDATA[Web services]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1132</guid>
		<description><![CDATA[Hi all, This is going to be a small post and I am going to share one problem that I faced few days back. I received a service a web service URL that was written in some different technology other than .NET and I added the the reference of it using add service reference but [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1132&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hi all,</p>
<p>This is going to be a small post and I am going to share one problem that I faced few days back.</p>
<p>I received a service a web service URL that was written in some different technology other than .NET and I added the the reference of it using add service reference but when I compiled that application,I received many build errors.</p>
<p>Then I just realized that I am using Add service reference option and it uses <em>svcutil.exe</em> to create the proxy. As we know this utility was introduced with WCF and works well for WCF  services.</p>
<p>I recalled the way the way we used to write the WCF services like writing different contracts like service contract, message contract and message contract and the way we write in asmx web services is totally different. The assemblies are different as well. So I tried to find where I can get the option to <em>Add Web Reference</em> ( Although I had the option to use the command line utility). I found it here</p>
<p>Right Click on the project -&gt; add service reference</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/04/first.png"><img class="aligncenter size-full wp-image-1134" alt="first" src="http://brijbhushan.files.wordpress.com/2013/04/first.png?w=630"   /></a></p>
<p>Click advanced as above</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/04/second.png"><img class="aligncenter size-full wp-image-1135" alt="second" src="http://brijbhushan.files.wordpress.com/2013/04/second.png?w=630"   /></a></p>
<p>Now Click on Add Web Service Reference.</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/04/third.png"><img class="aligncenter size-full wp-image-1136" alt="third" src="http://brijbhushan.files.wordpress.com/2013/04/third.png?w=630"   /></a></p>
<p>You can remember the above screen. We used it a lot while working with VS2005. The above one uses the wsdl.exe to generate the proxy from the wsdl.</p>
<p>After using this utility my application started working. Svcutil.exe is a sophisticated tool (provides many options and other features as well) and it&#8217;s generates the proxy in different way to create it. For details refer the links below</p>
<p>For wsdl.exe</p>
<p><a href="http://msdn.microsoft.com/en-us/library/7h3ystb6%28VS.71%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/7h3ystb6%28VS.71%29.aspx</a></p>
<p>and for Svcutil.exe</p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/aa347733.aspx</a></p>
<p>Hope that helps.</p>
<p>Happy Coding,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1132&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/04/23/wsdl-ans-svcutil-add-web-service-reference-in-vs-20102012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/04/first.png" medium="image">
			<media:title type="html">first</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/04/second.png" medium="image">
			<media:title type="html">second</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/04/third.png" medium="image">
			<media:title type="html">third</media:title>
		</media:content>
	</item>
		<item>
		<title>Join me at Delhi User Group April Meetup</title>
		<link>http://brijbhushan.net/2013/04/17/join-me-at-delhi-user-group-april-meetup/</link>
		<comments>http://brijbhushan.net/2013/04/17/join-me-at-delhi-user-group-april-meetup/#comments</comments>
		<pubDate>Wed, 17 Apr 2013 14:51:00 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[Event]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1129</guid>
		<description><![CDATA[Hello Friends, Delhi User Group has planned event planned on 20th April (Saturday) and all professional developers invited. I&#8217;ll be speaking on T-SQL features in SQL 2012. So if you are a SQL dev and excited to learn the SQL 2012, Join us on coming 20th April. There are many other Talks are planned of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1129&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hello Friends,</p>
<p>Delhi User Group has planned event planned on 20th April (Saturday) and all professional developers invited.</p>
<p>I&#8217;ll be speaking on<em> T-SQL features in SQL 2012</em>. So if you are a SQL dev and excited to learn the SQL 2012, Join us on coming 20th April.<br />
There are many other Talks are planned of PowerShell,  SQL and .NET, you will enjoy. This is free event and will be taking place at Microsoft Office, Gurgaon.</p>
<p>Register for the event <a href="https://skydrive.live.com/survey?resid=8C55799877482F9D!9191&amp;authkey=!AO7mLsjh1uOvTZM" target="_blank">here.</a></p>
<p>For complete details about the event click <a href="http://us1.campaign-archive2.com/?u=1ce3e2a8604cd419d0637a350&amp;id=8292616e0d&amp;e" target="_blank">here</a></p>
<p>I am excited to see you at event and so if this topics interests you, Join the event and learn!!</p>
<p>Thanks,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1129&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/04/17/join-me-at-delhi-user-group-april-meetup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>
	</item>
		<item>
		<title>Will be speaking in three events in April &#8211; Join and Learn</title>
		<link>http://brijbhushan.net/2013/04/06/will-be-speaking-in-three-events-in-april-join-and-learn/</link>
		<comments>http://brijbhushan.net/2013/04/06/will-be-speaking-in-three-events-in-april-join-and-learn/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 15:49:03 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SQL Sever 2012]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1104</guid>
		<description><![CDATA[Hello All, In this month (April&#8217;13), I&#8217;ll be speaking in three events on ASP.NET, WCF, SQL Server 2012. Join these sessions with me and learn the technology you are interested in. Event details are Simple steps to improve performance of ASP.NET Applications Significantly This is webcast and you can join from anywhere. Just require a PC and internet [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1104&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hello All,</p>
<p>In this month (April&#8217;13), I&#8217;ll be speaking in three events on ASP.NET, WCF, SQL Server 2012. Join these sessions with me and learn the technology you are interested in. Event details are</p>
<p><strong>Simple steps to improve performance of <a href="http://asp.net/" target="_blank">ASP.NET</a> Applications Significantly</strong></p>
<p>This is webcast and you can join from anywhere. Just require a PC and internet connection. Register at the following site and you&#8217;ll get the attendee details</p>
<p><a title="Kolkata Geeks" href="http://kolkatageeks.com/WebCast.aspx" target="_blank">http://kolkatageeks.com/WebCast.aspx</a></p>
<p><em>Timing details &#8211; 07th April 2013, 2-3PM</em></p>
<p><strong>N-tier architecture using WCF and ASP.NET and ASP.NET MVC</strong></p>
<p>This will offline event and organised by C3 Corner at Noida on <em>13th April 2013</em>. Please get the details from below link.</p>
<p><a title="Learn WCF With C# Corner" href="http://www.c-sharpcorner.com/Events/12/learn-wcf-with-C-Sharp-corner.aspx" target="_blank"><em><strong>Learn WCF With C# Corner</strong></em></a></p>
<p><strong>Exciting feature for SQL devs in SQL 2012</strong></p>
<p>This will be a offline event and organized by <strong>Delhi User Group</strong> and will be taking Place in Microsoft Office Gurgaon on <em>20th April 2013</em>.</p>
<p>To connect with Delhi User Group (Group), join it on facebook at below link and get updated on all the events organised by DUG and join that interest you.</p>
<p><a title="Delhi User group" href="https://www.facebook.com/groups/delhiusergroup/" target="_blank">Connect with Delhi User group</a></p>
<p>Join with me on these events and you&#8217;ll also get to hear other Speakers in these event. Hope you all learn and enjoy.</p>
<p>Thanks,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1104&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/04/06/will-be-speaking-in-three-events-in-april-join-and-learn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning ASP.NET Signal R &#8211; Part 2</title>
		<link>http://brijbhushan.net/2013/03/29/learning-asp-net-signal-r-part-2/</link>
		<comments>http://brijbhushan.net/2013/03/29/learning-asp-net-signal-r-part-2/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 18:20:37 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[SignalR]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[HUB]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1065</guid>
		<description><![CDATA[This is second post in the series on ASP.NET SignalR. You can access first post from the following link Learning ASP.NET SignalR – Part 1 In this post, we&#8217;ll examine, How SignalR works on various environments. We&#8217;ll try dig it out with the help of an example. First let me know, when you require real [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1065&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This is second post in the series on ASP.NET SignalR. You can access first post from the following link</p>
<p><a title="Learning ASP.NET SignalR – Part 1" href="http://wp.me/pT2AF-fl" target="_blank">Learning ASP.NET SignalR – Part 1</a></p>
<p>In this post, we&#8217;ll examine, How SignalR works on various environments. We&#8217;ll try dig it out with the help of an example.</p>
<p>First let me know, when you require real time update your UI?<br />
A chat application?</p>
<p>Right. But it&#8217;s not the chat application only, you can use it at many other scenarios like any real time data requirement, collaborative applications, Real time loggers, Real Time dashboards, Games, Stock market, Real time news, Live match feeds etc&#8230; and many more.</p>
<p>But for this analysis, we&#8217;ll use chat application. And will discuss other scenarios in my next post.</p>
<p>So let&#8217;s create an chat sample application.</p>
<p>Let me tell you my environment. I am using VS2012 Pro for this development and my OS is Windows 8.</p>
<p>So to create a simple chat application. Start  File -&gt; New Project-&gt; ASP.NET Empty Web Applications and say name it SignalRChat</p>
<p>Now Tools -&gt; Library Package Manager -&gt;Package Manager Console.</p>
<p>A console will be opened and put the following command</p>
<pre class="brush: csharp; title: ; notranslate">
install-package Microsoft.AspNet.SignalR
</pre>
<p>and Press enter. Wait for few seconds, it will install the SignalR and will download all the required libraries in your project. Add Global.asax in your project and add the following line in your <em>Application_Start()</em> method</p>
<pre class="brush: csharp; title: ; notranslate">
RouteTable.Routes.MapHubs();
</pre>
<p>This is required to add the default hub route and it will be added at Client side. Now lets add a class say named ChatHub which implements Hub Class and it is available under the namespace Microsoft.AspNet.SignalR . Now add a method as</p>
<pre class="brush: csharp; title: ; notranslate">
 public void Distribute(string name, string message)
        {
            // Call the broadcastMessage method to update all clients.
            Clients.All.broadcastMessage(name, message);
        }
</pre>
<p>Now it&#8217;s time add an HTML page. Let&#8217;s add Chat.htm. On this page add the following scripts and hub class</p>
<pre class="brush: csharp; title: ; notranslate">
  &lt;script src=&quot;/Scripts/jquery-1.8.2.min.js&quot; &gt;&lt;/script&gt;
  &lt;script src=&quot;/Scripts/jquery.signalR-1.0.0.js&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;/signalr/hubs&quot;&gt;&lt;/script&gt;
</pre>
<p>Update the the version of the scripts file that is available in your solution. Now add the following javascript code in your HTML file,</p>
<pre class="brush: csharp; title: ; notranslate">
  &lt;script type=&quot;text/javascript&quot;&gt;
         $(function () {
             // Declare a proxy to reference the hub.
             var chat = $.connection.chatHub;
             // Create a function that the hub can call to broadcast messages.
             chat.client.broadcastMessage = function (name, message) {
                 // Html encode display name and message.
                 var encodedName = $('&lt;div /&gt;').text(name).html();
                 var encodedMsg = $('&lt;div /&gt;').text(message).html();
                 // Add the message to the page.
                 $('#discussion').append('&lt;li&gt;&lt;strong&gt;' + encodedName
                     + '&lt;/strong&gt;:&amp;nbsp;&amp;nbsp;' + encodedMsg + '&lt;/li&gt;');
             };
             // Get the user name and store it to prepend to messages.
             $('#displayname').val(prompt('Enter your name:', ''));
             // Set initial focus to message input box.
             $('#message').focus();
             // Start the connection.
             $.connection.hub.start().done(function () {
                 $('#sendmessage').click(function () {
                     // Call the Send method on the hub.
                     chat.server.distribute($('#displayname').val(), $('#message').val());
                     // Clear text box and reset focus for next comment.
                     $('#message').val('').focus();
                 });
             });
         });
    &lt;/script&gt;
</pre>
<p>If you see the above script, first it creates the reference of HUB Class. This is actually, required to perform all the steps. It adds a method which receives the chat message.  It receives the message at run time and update the UI accordingly. And It also adds a event on the send button and call the distribute method on the server to broadcast the message. One thing, you keep in mind that it has a check whether the HUB is started or not. And Click event of Send button will be fired only if HUB is ready or it is ready to accept the request. Also we require to add some HTML Controls. It could be as</p>
<pre class="brush: csharp; title: ; notranslate">
  &lt;div class=&quot;container&quot;&gt;
        &lt;input type=&quot;text&quot; id=&quot;message&quot; /&gt;
        &lt;input type=&quot;button&quot; id=&quot;sendmessage&quot; value=&quot;Send&quot; /&gt;
        &lt;input type=&quot;hidden&quot; id=&quot;displayname&quot; /&gt;
        &lt;ul id=&quot;discussion&quot;&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
</pre>
<p>So now the code is ready to start. Let&#8217;s run the code. Now You&#8217;ll be prompt to put name and you can open the same URL on some other browser and starts chatting amongst browsers. So your code is running.</p>
<p>So this is a very simple application of Application. So now I&#8217;ll try to run the same application in different environment. Current browser is Firefox19 on windows 8. Let&#8217;s visit firebug net tab</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/03/ff18.png"><img class="aligncenter size-full wp-image-1070" alt="FF19Chat" src="http://brijbhushan.files.wordpress.com/2013/03/ff18.png?w=630&#038;h=317" width="630" height="317" /></a></p>
<p>Now if you see the the above first red marked encircled area, there is a negotiation request sent to the server to negotiate the protocol that will be used. Again if you see the next encircled area where it is written <em>transport=websockets  </em>and also a connectionToken is there. It means websockets is supported and it is used here.</p>
<p>Now I am going to run the same application on different environment that has OS WinXP SP3 and IE8. So let&#8217;s run, now when see this</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/03/ie8.png"><img class="aligncenter size-full wp-image-1071" alt="SignalRChatIE8" src="http://brijbhushan.files.wordpress.com/2013/03/ie8.png?w=630&#038;h=235" width="630" height="235" /></a></p>
<p>Now if you see here red encircled area, here the transport is foreverFrame. And when I ran this it was working as similar as I ran on Win8 and FF19 it was <em>transport=websockets</em>. Here also you can see the page is getting refreshed.</p>
<p>Now I will show it you on another browser on the winXp3 machine</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/03/firefox-nightly15.png"><img class="aligncenter size-full wp-image-1072" alt="SignalRChatfirefox15" src="http://brijbhushan.files.wordpress.com/2013/03/firefox-nightly15.png?w=630&#038;h=301" width="630" height="301" /></a></p>
<p>So here if see here the encircled area and here is the transport is serverSentEvents.</p>
<p>You can see here, as I discussed in my first post in this series, that according to the supported technologies appropriate one is selected  based on the order that was pictorially shown and discussed.</p>
<p>So the whole Idea, in this post to explain you that SignalR provides complete abstraction over technology and you need to use the similar simple API to work on it. You don&#8217;t need to care about the underneath technologies and environment.</p>
<p>Now in my next post, I&#8217;ll discuss various scenarios, where you can use this technology and make best use of it.</p>
<p>So hope, you must have enjoyed this post a lot.</p>
<p>Thanks,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1065/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1065/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1065&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/03/29/learning-asp-net-signal-r-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/03/ff18.png" medium="image">
			<media:title type="html">FF19Chat</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/03/ie8.png" medium="image">
			<media:title type="html">SignalRChatIE8</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/03/firefox-nightly15.png" medium="image">
			<media:title type="html">SignalRChatfirefox15</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning ASP.NET SignalR &#8211; Part 1</title>
		<link>http://brijbhushan.net/2013/03/22/learning-asp-net-signalr-part-1/</link>
		<comments>http://brijbhushan.net/2013/03/22/learning-asp-net-signalr-part-1/#comments</comments>
		<pubDate>Fri, 22 Mar 2013 16:01:21 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[SignalR]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HUB]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=951</guid>
		<description><![CDATA[Hello All, Today I am going to discuss one of the new technologies that changed the way we used to think about How the web works. I&#8217;ll be writing a series on this technology and this post is first part of it. You must have been working on the ASP.NET for long or might be [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=951&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Hello All,</p>
<p>Today I am going to discuss one of the new technologies that changed the way we used to think about How the web works. I&#8217;ll be writing a series on this technology and this post is first part of it.</p>
<p>You must have been working on the ASP.NET for long or might be since inception. And till date (or till this technology got introduced) , You got to know from every where that Web is stateless. A webpage is recreated every time from scratch it is posted back to server. In traditional web programming, all the information within the page and control gets wiped off on every postback.</p>
<p>I have taken the above lines from one of my post which I had written long back.</p>
<p>The web page used to work on PULL approach means you have to pull the data from the server. It means whenever you want to get some data from server, you require to send some request to server so that it can send the updated data along with the response. Remember, many times we required to update the UI as soon as the data gets updated to the server and then we used some polling method which keeps sending some request to server and checks if the data is updated and if yes, it refreshes the page or you have done something similar. So it works like</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/02/normal1.png"><img class="aligncenter size-full wp-image-1060" alt="StatelessWeb" src="http://brijbhushan.files.wordpress.com/2013/02/normal1.png?w=630"   /></a></p>
<p>But things are changing rapidly. Web Sockets introduced in HTML5 provides us a capability to create a full duplex channel over web.</p>
<p>But <strong>SignalR</strong> provides an abstraction over persistent connection. It makes you tension free about the type of browser and web server versions.It works in a consistent way in all the environment.</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/02/signalr.png"><img class="aligncenter size-full wp-image-1061" alt="SignalR" src="http://brijbhushan.files.wordpress.com/2013/02/signalr.png?w=630"   /></a></p>
<p>Although all the latest web browsers supports the new technology WebSockets but this is not the case every time. Some of your user might be still using IE6/IE7 etc and you cannot simply say that I cannot support this. Ultimately this is buyer&#8217;s world. So you have to support as per your Client&#8217;s requirement and here SignalR wont let you down. So How does SignalR work on all the browsers? It actually checks the browser&#8217;s capability and accordingly takes the decision as</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/03/techselectionnew.png"><img class="aligncenter size-full wp-image-1102" alt="Technology Selection" src="http://brijbhushan.files.wordpress.com/2013/03/techselectionnew.png?w=630"   /></a></p>
<p>So I think you all must have got an Idea the way SignalR works. but let&#8217;s try to dig into it. As you can see in the pic, it starts from top to bottom as if the environment supports Web Sockets else server sent event else forever frame else polling, means it has fall back one step further until your browser supports it.</p>
<p>So in simple words, What is ASP.NET SignalR?</p>
<p>We can say it is Real time &#8211; Means updates the web page Real time<br />
Push Approach &#8211; Server pushes the data to all the connected Clients.</p>
<p>So let&#8217;s see How it works pictorially?</p>
<p><a href="http://brijbhushan.files.wordpress.com/2013/03/signalrflow.png"><img class="aligncenter size-full wp-image-1088" alt="SignalR-Flow" src="http://brijbhushan.files.wordpress.com/2013/03/signalrflow.png?w=630"   /></a></p>
<p>As you can see in the above pic the An event generator generates event and notifies to SignalR hub. Signal R Hub process it and forwards the the message to the appropriate Client(s).</p>
<p>You also can see that Client could be any like any .NET windows, web, console client, WP, Windows store apps, Android etc.  Similarly, event generator could be any Client initiates notification on some logic, database, any other server based on some logic. You can imagine the reach and simplicity of it. And I can assure you that it is very fast as well.</p>
<p>So what are the main components of ASP.NET SignalR?</p>
<ul>
<li>    SignalR &#8211; A meta package that brings in SignalR.Server and SignalR.Js</li>
<li>    SignalR.Server &#8211; Server side components needed to build SignalR endpoints</li>
<li>    SignalR.Js &#8211; Javascript client for SignalR</li>
<li>    SignalR.Client &#8211; .NET client for SignalR</li>
<li>    SignalR.Ninject &#8211; Ninject dependeny resolver for SignalR</li>
</ul>
<p>You can install SignalR via Nuget. I&#8217;ll let you know, How to install it.</p>
<p>First, let me tell you, that to work on it, you need to have either VS 2010 SP1 or VS 2012.</p>
<p>Then you can install SignalR via Nuget Packages using the following command. To install it ,</p>
<p>Open Visual Studio, Go to  Tools-&gt; Library Package Manager -&gt; Package Manager Console.  A console (Named as Package Manager Console) will be opened and run the following command</p>
<pre><code>Install-Package Microsoft.AspNet.SignalR</code></pre>
<p>You can also install the SignalR sample using the following NuGet package..</p>
<pre>Install-Package Microsoft.AspNet.SignalR.Sample</pre>
<p>Hope you all got have basic Idea about SignalR and the way it works. In my next post, I&#8217;ll be discussing one example and show, How does SignalR works on various browsers and environment?</p>
<p>Keep Learning,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/951/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/951/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=951&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/03/22/learning-asp-net-signalr-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/02/normal1.png" medium="image">
			<media:title type="html">StatelessWeb</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/02/signalr.png" medium="image">
			<media:title type="html">SignalR</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/03/techselectionnew.png" medium="image">
			<media:title type="html">Technology Selection</media:title>
		</media:content>

		<media:content url="http://brijbhushan.files.wordpress.com/2013/03/signalrflow.png" medium="image">
			<media:title type="html">SignalR-Flow</media:title>
		</media:content>
	</item>
		<item>
		<title>document.ready vs Javascript onload</title>
		<link>http://brijbhushan.net/2013/03/07/document-ready-vs-javascript-onload/</link>
		<comments>http://brijbhushan.net/2013/03/07/document-ready-vs-javascript-onload/#comments</comments>
		<pubDate>Thu, 07 Mar 2013 16:28:12 +0000</pubDate>
		<dc:creator>Brij</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://brijbhushan.net/?p=1036</guid>
		<description><![CDATA[It is a small post, who are new to jQuery or just started working with jQuery. As we all know that jQuery is Client side library and provides a wrapper over JavaScript . One of the very good things about jQuery that it runs seamlessly in all leading browsers while you must have faced many [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1036&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>It is a small post, who are new to jQuery or just started working with jQuery. As we all know that jQuery is Client side library and provides a wrapper over JavaScript . One of the very good things about jQuery that it runs seamlessly in all leading browsers while you must have faced many issues related to the browsers when you work with JavaScript.</p>
<p>So let&#8217;s jump to the topic. What is the difference between let&#8217;s first go by an example.</p>
<p>I have created a simple default.aspx page in my asp.net empty application and added few images and put the path from web and added few text. Now I put a general alert and called it on load method of window as</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;
        window.onload = OnLoad();
        function OnLoad() {
            alert('I am called by window.onload');
        }
    &lt;/script&gt;
</pre>
<p>Now again I tried to change the code to jQuery<em> document.ready</em> function. And used the code as</p>
<pre class="brush: csharp; title: ; notranslate">
$(document).ready(function () {
              OnLoad();
         });
        function OnLoad() {
            alert('I am called by document.ready');
        }
</pre>
<p>and when I ran it. I got the alert very fast. So what I wanted to point out here that jQuery&#8217;s <em>document.ready</em> runs much earlier the JavaScript onload. Why?</p>
<p><em>document.ready</em> get&#8217;s fired as soon as DOM is ready and registered with the browser. It does not wait for the all the resources to get loaded. It allows us some very cool showing, hiding and other effects as soon as user sees the first element on the page.</p>
<p>While Javascript&#8217;s onload method gets fired only when all content of the webpage and image, iframes etc get loaded in browser then onload get&#8217;s fired.</p>
<p>So do we have a method in JavaScript that works in similar way as document.ready?</p>
<p>Partially yes.</p>
<p>We have a method called <em>DOMContentLoaded</em>  that is actually called by jQuery from document.ready. But that&#8217;s not it.  <em>DOMContentLoaded</em> is not available to every browser and versions. For IE &gt; 9,  onreadystatechange works in the same way. In case nothing works in browser, jQuery has a fallback and it implemented own logic to traverse the DOM and check the when the DOM got registered and fires document.ready accordingly.</p>
<p>So I hope you all got to know the basic difference between these two.</p>
<p>Cheers,<br />
Brij</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brijbhushan.wordpress.com/1036/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brijbhushan.wordpress.com/1036/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brijbhushan.net&#038;blog=13118001&#038;post=1036&#038;subd=brijbhushan&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brijbhushan.net/2013/03/07/document-ready-vs-javascript-onload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b079ad5d8d93bb09730c5acd4a6dab38?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">brijbhushan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
