SignalR – Async library for .NET to help build real-time, multi-user interactive web applications

I just had a chance to work with SignalR – (Async library for .NET to help build real-time, multi-user interactive web applications | http://signalr.net/) for the CliniclMS – Clinic Intranet/Internet Application.

There are already some good walkthroughs about this on the SignalR github site (https://github.com/SignalR/SignalR) so as a warm-up I suggest you take a look at those. Both the low-level API and high-level API are interesting

The main difference is the amount of control you have over the connection and message processing. In the low-level API you have full control over this including being able to override what happens when a client connects, processing of messages, and even disconnection of the client. With the high-level API you for-go this for a much simpler implementation, in this case simpler does not mean less powerful or useful. I think in most cases the high-level API (hubs) will be the right approach and will have plenty of flexibility for what we are trying to accomplish.

Demo: Will Update Soon

Source Code: Will Update Soon

Advertisements

Validation of viewstate MAC failed.

Error:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Solution:

Include enableViewStateMac=false” on top of your page

or

modify your web.config like this

 <pages validateRequest=false enableEventValidation=false viewStateEncryptionMode=Never enableViewStateMac=false>

Solution for Umbraco CMS Preview issue

Solution for Umbraco CMS Preview issue

This is an issue with Umbraco 4.7.1  and It’s been fixed but only in the latest nightly builds of umbraco.

  1. Download that fix from http://nightly.umbraco.org/umbraco%204.7.1/4.7.1/ and select the build “4.7.1.449.zip”
    or
    go directly to the build http://nightly.umbraco.org/umbraco%204.7.1/4.7.1/4.7.1.449.zip
  2. Unzip/Extract the zip file
  3. Take a backup of your old “Umbraco.dll” which has the preview issue, for your safety.
  4. Replace the “Umbraco.dll” with the newly downloaded file

Force non-www URLs to www URLs Umbraco CMS

You need to add:  redirectMode=”Permanent”

               <add name="domain.com"
                 redirectMode="Permanent"
                 redirect="Domain"
                 ignoreCase="true" rewriteUrlParameter="IncludeQueryStringForRewrite"
                 virtualUrl="http://yourdomain.com/(.*)"
                 destinationUrl="http://www.yourdomain.com/$1" />

HttpResponse.RedirectPermanent in ASP.Net 4.0

If you want to redirect a page permanently to the new location, ASP.Net 4.0 introduces a new method ie, HttpResponse.RedirectPermanent

example:
Response.RedirectPermanent(“http://www.menonon.net/MyNewPage.aspx&#8221;);

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. SQL Server Management Studio 2008

Error Details:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.

You need to Disable “Prevent Saving Changes that requires the table re-creation”.

  1. Open SQL Server Management Studio (SSMS) 2008
  2. Click ‘Tools’ Menu
  3. Then Click ‘Options’ as shown
  4. In the navigation pane of the Options window, expand Designers node and select Table and Database Designers option as shown in the below snippet

Risks of Turing Off “Prevent Saving Changes that Require Table Re-creation” in SSMS
If you turn off this feature then you can avoid table recreation. However, if you have the Change Tracking feature of SQL Server 2008 enabled to track the table changes then the change tracking information will be lost completely whenever table is recreated. So, it is always advised to use this feature very carefully especially in a production environment.