Untitled. Self-Hosting SignalR in a Windows Service - Rick Strahl's Web Log. A couple of months ago I wrote about a self-hosted SignalR application that I've been working on as part of a larger project.
This particular application runs as a service and hosts a SignalR Hub that interacts with a message queue and pushes messages into an application dashboard for live information of the queue's status. Basically the queue service application asynchronously notifies the SignalR hub when messages are processed and the hub pushes these messages out for display into a Web interface to any connected SignalR clients. It's a wonderfully interactive tool that replaces an old WinForms based front end interface with a Web interface that is now accessible from anwhere, but it's a little different SignalR implementation in that the main broadcast agent aren't browser clients, but rather the Windows Service backend.
It can be obtained through its datasource. To get the data for a given Id then you can use var grid = $('#kgridA').data('kendoGrid'); var dataItem = grid.dataSource.get(id); The dataitem represents all the data in the model the grid is bound to plus some more. A key field is the uid as this is a guid that is used in each tag on each grid row. For example if you had your model Id then you could find the datasource data and get the uid which then can be used to manipulate the html display for highlighting etc. The dataItem can have its value set by specifying the property or using the set dataItem.name = "xxx"; or dataItem.set("name","xxx"); or dataItem[name] = "xxx"; The first option is only available if you know the fields your working at design time. once modified then the grid would need to be refreshed to show the dirty flags $('#kgridA').data('kendoGrid').refresh();
Understanding Certificate Name Mismatches. Recently, I received a query from the Windows Mobile team– they had observed that visiting triggers a certificate name mismatch error on IEMobile, but doesn’t seem to trigger any error on Windows 7 when using the desktop versions of Internet Explorer or Firefox.
Now, long-time readers know that I love a good mystery, so I was excited to take a look at what was going on here. I first verified the original problem: IE on Windows Mobile 6.5 does indeed show the name mismatch warning, and desktop IE doesn’t show any warning at all. My next step was to watch the Desktop’s traffic with Fiddler, which, when configured to perform HTTPS decryption, will warn about any certificate errors by default. I was intrigued to find that Fiddler does, in fact, warn about the certificate when visiting As you can see, the certificate presented is for “mail.google.com” instead of “gmail.com”: Centralized Logging and Diagnostics with Elmah and NLog - Ben Foster.
Update We now use Elmah.IO for centralised logging.
Iis - ASP.NET Web API OperationCanceledException when browser cancels the request. CRUD with SPA, ASP.NET Web API and Angular.js. Download AngularJsCRUD.zip - 854 KB Introduction.
Web API CRUD Operations with Knockout. Posted By : Shailendra Chauhan, 01 Apr 2013 Updated On : 01 Apr 2013 Keywords : CRUD operations using knockout and web api,insert update delete using knockout and webapi,web api insert update delete In previous article, I have explained Knockout CRUD Operations using MVC4.
In this article, I will demonstrate, how to use Knockout with Web API for CRUD (Create, Read, Update, Delete) Operations. Step 1: Define Model. Using JSON.NET for dynamic JSON parsing. With the release of ASP.NET Web API as part of .NET 4.5 and MVC 4.0, JSON.NET has effectively pushed out the .NET native serializers to become the default serializer for Web API.
Self-hosting ASP.NET MVC. Recently I was considering the technology to use for the GUI of a windows desktop client application I’m working on in my spare time.
ActiveXperts Serial Port Component features the following: Using ActiveX Controls to Automate Your Web Pages. This article describes how a developer can add Microsoft ActiveX support to an existing OLE Automation control.
Introduction An ActiveX control is an object that supports a customizable, programmatic interface. Using the methods, events, and properties exposed by a control, Web authors can automate their HTML pages. Examples of ActiveX Controls include text boxes, command buttons, audio players, video players, stock tickers, and so on. Sean McAlinden's Blog - Asynchronous processing in ASP.Net MVC with Ajax progress bar. I was asked the other day how to process a long running task asynchronously using ASP.Net MVC along with JQuery to update a progress bar on the view via Ajax. There are many ways of accomplishing this type of multithreading, in this blog I’m going to document one of the simplest and easiest to implement (this solution is really for small apps). Firstly, create a class that will manage the long running task – as this is a contrived example without the use of a database, the class is going to have static dictionary property that will store the unique key and status of each long running task. – the dictionary is used to allow for multiple users firing off individual long running tasks.
Now we have the long running class in place we need to create some controller actions to do the following: Start the long running process End the long running process Get the current process status One interesting line you may have notices in the GetCurrentProgress method is the following: Cutting Edge - Build a Progress Bar with SignalR. In the past two installments of this column I discussed how to build an ASP.NET solution for the evergreen problem of monitoring the progress of a remote task from the client side of a Web application.
Despite the success and adoption of AJAX, a comprehensive and widely accepted solution for displaying a context-sensitive progress bar within a Web application without resorting to Silverlight or Flash is still lacking. To be honest, there aren't many ways in which one can accomplish this. You might craft your own solution if you want, but the underlying pattern won’t be that different from what I presented—specifically targeting ASP.NET MVC—in the past columns. Exception Handling in ASP.NET MVC. Index Introduction Exception handling is a serious matter in any application, whether it's web or desktop. Implementing a proper exception handling is important in any application. In most cases once we catch the exception we have to log the exception details to database or text file and show a friendly message to the user.
Don’t Do Role-Based Authorization Checks; Do Activity-Based Checks. I’ve built a few dozen security mechanisms in my career. Unfortunately, I kept getting it wrong, hence the need to keep building them. Over the years, though, I learned a number of different ways that a security system can be built. One of my favorite ways to build authorization systems is through the use of role-based security.
The idea is fairly simple: you assign users to roles and roles have permissions. That way you have a nice abstraction that people can be assigned to, as a role, so that you don’t have to assign the same 5, 10, or 500 permissions to every user in your system. Don’t Do Role-Based Authorization Checks; Do Activity-Based Checks. Edit fiddle. Dynamic LINQ Queries with Expression Trees.
It's possible to build up dynamic LINQ queries or queries with several conditional criteria. In fact there are several options for doing this, including the use of expression trees Like it or not, LINQ is here to stay. Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library) ASP.NET MVC: Do You Know Where Your TempData Is? « Greg Shackles.
I recently discovered that despite the fact that I’d been using the TempData dictionary in my applications, I didn’t really have a full grasp on what it was doing behind the scenes. Of course this meant learning the lesson the hard way once something stopped working like I thought it would. I only really had myself to blame since in the end it was a simple case of RTFM, but it seemed like a good opportunity to dig in and see how TempData really works. Injecting Open Graph Protocol Content Into your ASP.NET MVC Site : On All Things Web. The Open Graph protocol. Жизненный цикл Request в MVC 3 Framework приложении. Любой разработчик знает, что URL в маршрутизации MVC играет ключевую роль.
Как известно, существует стандартная маршрутизация: Exception Handling in ASP.NET MVC. ASP.NET MVC Custom Error 404 (Not Found) Page. Storing ASP.NET MVC Controllers & Views in separate assemblies. Practical ASP.NET MVC (3) tips. Compiling MVC Views In A Build Environment. Saladwithsteve. Convert images to base64 strings for HTML/CSS embedding. Храните мелкие картинки в CSS. Храните мелкие картинки, которые нельзя засунуть в спрайты, в data:image base64 в CSS — это экономит кучу запросов к вебсерверу.
Web Workbench - Sass, Less and CoffeeScript in Visual Studio.
A simple POC using ASP.NET Web API, Entity Framework, Autofac, Cross Domain Support.
Patterns & practices Web Client Developer Guidance. Tips and Tricks - Meta-Me.