Friday, October 31, 2014

An Interesting App

Hi All,

Recently I developed an Windows Phone app, which helps Engineering aspirants or their parents to get required information about the Top 50 to 100 Engineering colleges in India and its facility

Keep watch this space, to get to know more updates and future features.....

Please checkout the app here and do let me know your review comments / feedback

http://www.windowsphone.com/en-us/store/app/professional-school-finder/f635c139-98c7-48f6-a9fa-a6cad6d44a29


Regards,
-Vinayak

Thursday, August 30, 2012

How to pick up with the lastet technology in short time

Guys,

Since most of you had asked me a question like, How do you cope up with this rapid growing/changing technology's ir-respective of your busy work.

I should admit to the fact that - Pluralsight is the power behind me. for more informaton please visit 

http://pluralsight.com

This site has plenty of courses, ranges from simple to advanced.

I just liked the way by which this courses are designed, since without me putting much effort i will get to the roots of it.

So i would request all of you to have try, i bet - you will also start talking like me.

Regards,
-Vinayak



Sunday, June 10, 2012

Windows Server AppFabric Cache Tips

Hi All,

Today as you all might be anticipating, i am going to discuss about the 'Cache Name'....

As the name suggest, this is the logical container within which the cache items are persisted inside the AppFabric Cache cluster.

The Cache spans across the available nodes/host inside the cluster....

-If we are not going to specify any particular cache name - then the data is stored inside 'default cache'

-Inside any cluster , we can create at max 128 cache names..

-When the cache cluster is - Restarted -, The cache names are preserved, However the items in cache are flushed out/lost

- Each 'cache names' - are independent of each other, hence we can design our application/or store data in respective caches and optimize for multiple policies - according to the specific needs

Off-course, Regions comes inside the cache name, and we should be discussing about that in the next blog post.

Till then take very good care about yourself.

Regards,
-Vinayak

Wednesday, June 6, 2012

Windows Server AppFabric Cache - Tips

Hi All,

Welcome back to my series post on Windows Server AppFabric, As i promised you last time, today we will discuss a bit about Cache Cluster/Host in Windows AppFabric Cache.

Yes at any given point in time , If you want to check the status of Host in Cache cluster - like whether it is up or down, you can check by running below command through power shell script.

Get-CacheHost

It shows the list of host/nodes available inside the cache cluster along with the information/details describing the hosts like - HostName, Port(Cache Port), Service Name(Caching Service), Status ( Up/Down).

When you run the above command(Get-CacheHost), just in case if you find all the listed host found to be on status - DOWN, then it may indicate the Cache Cluster is down. Hence you may want to run the following command to get it up.

Start-CacheCluster

When you run the above command(Start-CacheCluster) - if you find any entry with UnKnown Status - then it is better to check like whether the service(Caching Service) in that host/node runs - or is that host is up and running

If you want to - start a particular node/host in the cluster you can run the following command.

Start-CacheHost -HostName 'Name of the host' -CachePort 'Port Numbet'

If you want to - stop a particular node/host in the cluster , you can run the following command

Stop-CacheHost -HostName 'Name of the host' -CachePort 'Port Numbet'

More about the basics in the forthcoming blog posts.....

Till then take very good care about yourself.

Regards,
-Vinayak





Monday, June 4, 2012

Windows Server AppFabric - Tips

Hi All,

I am sure, all of you are eager to know, what are those next set of tips which i am going to blog about......

Yes, today i am going to blog about - To understand the bits and pieces in (Terminology) Windows Server AppFabric.

At a high level, It starts with a Cluster - a bunch of machines which would like to be a part of participant nodes in Cache

A cluster contains 1 or more machines, they are called as Nodes or Host.

A node/Host intern contains a Cache Name -

A CacheName - in tern contains Regions....

A region , in tern contains 'The real Cache Items'

We will discuss in depth in terms of each of these terms/terminology and limitations in the coming blogs....

Note: if any one of you would want to know something else, please drop me a comment  i should be answering in short time.

Regards,
-Vinayak

Saturday, June 2, 2012

Windows Server AppFabric Cache - Cluster status - Tips

Here goes the second tip -

At any point in time if you want to check the Cache Cluster (& its Host) status....

You need to run the following command at Windows Powershell script

Get-CacheHost

This command will display all the available nodes which are part of the cluster and their status - indicating whether they are UP or DOWN.

This will also display information about the cache port of the respective nodes.

Note: Nodes and Host are same.

Regards,
-Vinayak

Windows Server AppFabric Cache - Tips

Hi All,

I think it is the time for me to share some of my learning with my current project while playing with Windows Server AppFabric Cache.

First Learning, If you want to setup a AppFabric Cache - With High Availability - You need to have atleast 3 servers - ( MS recommendation)

So, If you are proposing any solutions around this, please ensure the cost.....

Will promise you to share more tips in future series of Windows Server AppFabric tips.

Regards,
-Vinayak

Thursday, December 8, 2011

Communication between Cache Hosts in Windows Server AppFabric



Today I am going to talk about, how the communication/coordination takes place in between the cache host(Nodes) of Windows Server AppFabric cache cluster

In short it is achieved by using TCP/IP protocol, and as we all know If it is tcp/ip then we have to set the exception rules in our Firewall…

In order to function fully, it is going to make use of 4 different ports each with its own purpose, By default ports starts from 22233 to 22236.(so to all these we need to set the exception in firewall)…

Now we will look at what these ports will listen on…

      1)  22233 – By this port it actually communicates between the cache clients – Hence it is a cache port
      2)  22234 – By this port it ensures the availability of each other in the cluster – hence it is a cluster port
      3)  22235 – By this port it ensures that the failed nodes/host are unavailable  - Hence it is called as Arbitration port
      4)  22236 – By this port it moves the data across the hosts – hence it is called as Replication port..

If your organization doesn’t like these default ports for any reason , then you can set your own ports by using the following Windows Powershell command….
Set-CacheConfig

I hope this helps!.

Regards,
-Vinayak

Wednesday, December 7, 2011

Storing Session State in Windows Server AppFabric Cache


Hi,

Today I am going to post about how to make use of Windows Server AppFabric Cache as Session Store for the Asp.Net Web Application.

This can be achieved by following simple steps

    1)  Add the reference of following Assembly from the following location
a.  Microsoft.ApplicationServer.Caching.Core.dll
b.   Microsoft.ApplicationServer.Caching.Client.dll
        
The above 2 assemblies can be located at the following locations –

 %windir%\System32\AppFabric

    2)  Add the following entry at the ConfigSections of the Web.Config

<section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,
            Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0,
            Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          allowLocation="true"
          allowDefinition="Everywhere"/>

    3)  Inside the configuration tag, add the following entry
   <dataCacheClient>

      <hosts>
        <host name="a4ml01382" cachePort="22233"/>
      hosts>
      <securityProperties mode="None" protectionLevel="None" />
 
      <transportProperties connectionBufferSize="131072" maxBufferPoolSize="268435456"
                         maxBufferSize="8388608" maxOutputDelay="2"  channelInitializationTimeout="60000" receiveTimeout="600000"/>

  dataCacheClient>

    4)  Inside the System.Web tag, add the following entry

 <sessionState mode ="Custom" compressionEnabled="true"customProvider="AppFabricCacheSessionStoreProvider" cookieless="false">
      <providers>
        <add
          name="AppFabricCacheSessionStoreProvider"
          type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider"
          cacheName="AspNetCacheName" />
      providers>
    sessionState>


    5)   You are all set to go from Client Asp.Net Application for making use of AppFabric cache   as Session store.. Now you need to do the following 2 steps to ensure that it works

a)  Ensure that the AppFabric Cache service is running
b)  Ensure that you have created the cache with the name – AspNetCacheName – because this is the place where in the session data is stored( We have explicitly named this ‘AspNetCacheName ‘ in step 4 )


I hope this helps!.

Regards,
-Vinayak

Tips - Windows Server AppFabric - Security Options


Hi,

In this post i will be talking about the different options available while setting up the security for AppFabric cache.

Command to use setup the security..

Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None

Possible values for parameters

 SecurityMode -
     None, Transport
 Description: 
        A setting of Transport enables security, whereas a setting a None disables security.
ProtectionLevel  -
     NoneSignEncryptAndSign

Description:
   Specifies the type of security applied to cache cluster data


I Hope this helps!.


Regards,
-Vinayak

Tips - Windows Server AppFabric - Grant/Revoke


Hi All,

In this post i will talk about some of the commands which you will need to use while allowing/dis-allowing the permissions for Windows Server AppFabric cache

       1)  If you need to grant any access to a particular account 

Grant-CacheAllowedClientAccount -Account "DOMAINNAME\username"

2) If you want to revoke the access to a particular account

Revoke-CacheAllowedClientAccount -Account "DOMAINNAME\username"

3) At any point in time, if you want to get the list of all accounts which are having the access to the cache, you can use - 

Get-CacheAllowedClientAccounts

In next post i will talk about the different options available while settings the security to AppFabric cache

I Hope this helps!.

Regards,
-Vinayak







Tips about Windows Server AppFabric Security


A couple of days back i was trying to setup the Windows Server AppFabric. I had plenty of learning’s with this exercise and hence i thought of to share with you all.....Believe me this is an amazing powerful product from Microsoft.

Here goes the first tip...

Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None

This mode will become really handy, when you have a web application (A client to the Windows Server AppFabric) where in all the developers are trying to access the AppFabric with individual credentials.

Note: When you go live, Please ensure that you will enable the security and grant the access to the right credential/Account...

Will talk about the credentials settings in the forthcoming blogs..

I hope this helps!.

Regards,
-Vinayak

Monday, June 6, 2011

Hybrid approach of using Sync and Async actions in AsyncController

Hi All,

Today i am going to discuss about an intersting aspect or a window of opportunity which opens up when we use and AsycnController, As you might know, an AsyncController class can contain methods /actions which are of type Synchronous or Asynchronous. i.e In an AsyncController class we can have both Synchronous and Asynchronous methods.




Having said that, we also need to stick to one rule, that is if you have a Synchronous method with the name MethodCompleted – then you cant call that method since it wont be having the matching MethodAsync and if you try to call MethodCompleted without the matching MethodAsync the call will be blocked.




Inspite of all these restriction, if you still want to make use of the same ActionName – MethodCompleted – then you can have a method with some different name but decorate the action with the ActionName(“MethodCompleted”)




ie
[ActionName(“MethodCompleted”)]
public ActionResult SomeMethodName()
{
}




One another note, you cant explicitly call http://localhost/MethodAsync either through an ActionLink or By using any other Redirections – we always need to do those action invoking by using http://localhost/Method

I hope this helps!.




Regards,




-Vinayak

Timeouts in Actions of AsyncController

Hi All,

Welcome back to the blog post. Today we will look at the Timeouts in action when using Async actions.

By default an action will be timed out after 45 seconds in Asp.Net mvc, If a method takes more than 45 seconds then it will throw an TimeoutException.
In order to control this behaviour Asp.Net team provide us 2 filters – [AsycnTimeout] and [NoAsyncTimeout].
If you make use of [NoAsyncTimeout] attribute to an action, then TimeoutException will never be thrown from an action.
AsyncTimeout works by taking the expiry time parameter as an input( in Milli seconds), As you know, if the action takes more than the specified time, it throws TimeoutException.

eg:
[AsyncTimeout(50000)] /* Expires after 50 seconds */
public void SampleAsync()
{
}
[NoAsyncTimeout] //Never expires
public void SampleAsync()
{
}

I hope this helps!


Regards,


-Vinayak

Usage of filters in AsyncControllers

Hi,

Today i would like discuss about usage of filters in AsynControllers.

Filters such as [Authorize], [OutputCache], [ActionName] ,[AcceptVerbs] should be kept on top of ActionAsycn () method than ActionCompleted(). By mistakley if you keep the filter on top of ActionCompleted() – then it will be ignored

Now i would like to discuss one more important aspect, when we use ActionName along with the Asycn Methods. Then also we need to share the same prefix for the method name, i.e ActionAsycn and ActionCompleted.
One small twist, when we use the ActionName filte for any method, as usual the url should follow the ActionName path than the method name,
for instance,
[ActionName(“Path”)]
public void SampleAsync()
{
}

public ActionResult SampleCompleted()
{
}

the request like – http://localhost//Sample – will result into Http 404.

The real path is – http://localhost/Path .

One more last thing, as you know the view name should be Path.aspx than Sample.aspx.

I hope this helps.

Regards,
-Vinayak

Friday, June 3, 2011

Choosing AsyncController vs Controller in Asp.Net mvc

Hi All,
I hope last post was really handy to those who want to implement AsyncController in Asp.Net mvc, today lets see what are all the parameters helps in deciding Synchronous and Asynchronous Controller.

Parameters
1) When you have very simple method - Then prefer Controller class than AsyncController
2) When the method is more oriented towards CPU intensive task - prefer Controller class
3) When the method is more oriented towards I/O or network intensive task - prefere AsyncController class
4) When you prefer simplicity than efficiency prefere Controller class
5) When you perefer maintainability prefer Controller class.
6) When you want your request thread to be Non blocked - prefere AsyncController

I hope this helps you to make better decission duriing your design phase..

Regards,
-Vinayak

AsyncController in Asp.Net MVC








Guys,
Here goes the first entry of 'About my experience with Asp.Net mvc and Windows Azure series'.
I had an requirement, where in for most of the actions, i was suppose to fetch the data from the database through WCF Services but not at the cost of blocking/reducing the throughput of Asp.net mvc application....


Then i was thinking like in order to have Non blocking/high throughput - i need to make use of some asynchronous api from .Net to do the task such as either ThreadPool's QueueUserwork items , or Delegates or some asynchronous reader kind of api's....But then i surfed internet and found that there is a specific way by which this can be achieved in Asp.Net mvc......
Here are the steps by which we can get it working....


1. First create the set of WCF Services which will get the data from the database.
2. By right clicking the Asp.Net MVC project, add the service reference pointing to the wcf project.
3. During the step 2 - click on the advanced button and check 'generate asynchronous operations'
4. Inside the Asp.Net mvc project, ensure that controller class is derived from AsyncController than the default Controller class
5. For the method, Ensure that ActionName ends with 'ActionAsync' - for instance 'indexAsync'.
6. Ensure that the return type of 'ActionAsync' is void than the default ActionResult, because this method executes asynchronously.
7. Create one more method corresponding to the ActionAsync with the name - 'ActionCompleted' for instance 'indexCompleted' where in the result is returned once the action executes successfully.
8. Inside indexAsync - make a call to the wcf proxy on the asynchronous methods...for instance proxy.GetDataAsync();
9. For the callback of wcf proxy ie proxy.GetDataCompleted() - hook up the event handling by using the special class from asp.net mvc - 'AsyncManager' as shown in the following image.
10. AsyncManager's parameter class help to pass the value to the method
11. As you could see in the image, we also need to increment and decrement the async operation count - which we should be doing by using AsyncManager class.


Thats it, we achieved what we intended to.....


I hope this helps!...


If you have any queries , please do let me know..


Regards,
-Vinayak







Experience with the new technology stack from Microsoft

Hi Guys,

Please excuse me for not writing for such a long time. Was completely stuck with one of the new development project consisting of Asp.Net MVC 3.0 and Windows Azure....Now i have decided to share my experience with the latest technology stack from Microsoft( which i have used in this development assignment)....so tune to blog to hear more about in coming series......

Regards,
-Vinayak

Wednesday, December 22, 2010

Guidelines for number of application pools for IIS 6

Hi,
Was doing some exploration in terms of the number of application pools for any web server.
Here goes the collection of results.
1) It is good to have one application pool / web application
2) It is also a good practice to run each one of that application pool by a unique identity.
a) In this case we need to ensure that it is tied up to IIS_WPG group.

By doing this we will be benefitted both from security and functionality. It also ensure reliability and availability.Since an issue/error with one application wont cause any side effects to the other application.

I hope this helps!.

Regards,
-Vinayak