ASP.NET Custom role provider

Easy guide to write your custom role provider

Merge splitted .mkv files

Learn how to merge splitted .mkv files (.mkv001,.mkv002...)

How to Zoom in and Zoom out your sql execution plan ?

Tool to tune your sql query

send .exe files with gmail

How to send files having blocked extension with Gmail ?

Multiple home pages in Internet explorer

How to set multiple home pages in internet explorer ?

5/21/2011

Autocomplete extender not working with IIS 7 + and website with role based authorization defined : ASP.NET

Last week I came across a very weird scenario on my website which I am trying to migrate to IIS 7.5 . My website is configured on anonymous authentication and authorization is only restricted to specified roles in the application. E.g as shown in fig below.


But unfortunately my autocomplete extender stopped working. My Autocomplete.asmx is located in a folder called " Services " . I am getting a authentication challenge " 401.2 " when I tried to access the service ( .asmx ) through the URL.I tried to check all my handlers in IIS whether .asmx is a allowed extension and everything is configured correctly. Since I am receiving a authentication challenge , I decided to play with the authorization of the folder. I dont know the exact reason but unlike IIS 6 , IIS 7 + accesses the folder under a different user context ( May be network service, IUSR or something else ) . I tried to set the authorization to either "all users" or "all anonymous users " like in the figure below. If you come across this kind of situation, you can try.
I am trying to find out the user context under which autocomplete accesses its asmx.... but this one should help you..

If you are facing problems with autocomplete extender and its usage , let me know.


Need more asp.net tips and tricks ? For more Subscribe here or click here to get updates via email

5/15/2011

How to change default search provider in Firefox ? go to google typing in address bar

A small yet useful firefox tweak .Lot of people find it annoying to see their default search being changed from Google to ask.com or to something else.

If you type something in your address bar instead of correct URL, it will go to the default search engine. Firefox by default comes with Google as its default search engine. But when you install some toolbar like ask toolbar. Yahoo toolbar ....,  it will change your default search engine. Lot of users find it quite annoying as there is no straight shortcut to change this. So How to change your default search provider to Google in Firefox ?
  • Type " about:config "  in the address bar of your Firefox.
  • You might recieve a screen like below if you are opening Firefox configuration for the first time. Just click on " I'll be careful, I promise "

  • In the screen that appears , you will see a filter textbox just below the address bar as shown in the fig below.

  • In the Filter textbox, please enter the following .
browser.search.selectedEngine
  • Now just Right click on the entry you see and Click on " Reset " . You should see the status being changed to " default.
  •  This should normally search in Google when you type in address. 
Now for the right side text box , to reset your search engine, just type the following in your filter box then type in the name of the search engine you wish to have as the default search engine ( Something like " Google "  or " Yahoo " )

browser.search.defaultenginename

Love Technade ? For more Subscribe here or click here to get updates via email

5/14/2011

Google Chrome book review

The net has already started buzzing about the netbook with a Google " Chrome " OS. Chrome operating system is the search giants attempt to develop a Cloud oriented Operating system.  The chrome OS netbooks are going to make their debut on June 15 into the markets.

Why I say this is just another net book with Google flavour?

Kindle, Wi-Fi, Graphite, 6" Display with New E Ink Pearl Technology - includes Special Offers & Sponsored ScreensaversBecause Chrome OS does nothing like a Desktop OS except that both have a browser :P... You can only run your web based applications with the help of advanced Chrome browser.Since there is nothing for the OS to really do, starting up such a netbook will just a tip of a minute .

If you ask me about the applications , the focus obviously is on the Google based applications ( Google docs , Gmail blah blah ).  Well Google has really thought of a futuristic idea where they expect web based applications to server just like the desktop applications do today. They just wanted to facilitate this with the help of their Chrome browser.This open release of the software is known as Chromium OS – a play off the Chrome browser’s name.

Which notebooks will have Google Chrome OS ? What is the cost of Chrome Notebook ?


Machine
Samsung Series 5
(WIFI)
Samsung Series 5
(3G)
Acer Chromebook
(WIFI)
Acer Chromebook (3G)

Consumer Price
429 $
499 $
349 $
??
Enterprise Price
28 $ per user / month
~ 31 $ per user / month
28 $ per user / month
~ 31 $ per user / month
Education Price (students)
20 $ per user / month
23 $ per user / month
20 $ per user / month
23 $ per user / month
Minimum contract
10 for Biz / Edu ; No limits on Consumer
10 for Biz / Edu ; No limits on Consumer
10 for Biz / Edu ; No limits on Consumer
10 for Biz / Edu ; No limits on Consumer
Included Data Limit
None
100 MB Monthly
None
100 MB Monthly






How is the hardware of Chrome notebook ?

Eventhough Chrome does not run a desktop OS , dont expect it to be as thin as a MacBook Air :). Its a bit thicker and has more weight than the Mac. People complained about a feel of the panels as well but it depends on the manufacturers.

The keyboard is a stripped version of normal laptop keyboard. There are no function keys. There are hard buttons to do things like go forward or backwards. The CAPS LOCK button has been replaced with a Search button.



The wireless adapter seems to be extremely good and connecting the internet is a piece of cake.. Thats the least we can expect from a netbook :)...

There are some printing woes reported by the people about Chrome notebook . You have to do something similar mentioned here http://www.google.com/landing/cloudprint/chromeos-enable.html
Certainly will raise some eye brows ...

Can I buy a Chrome notebook ?

If you want to show it to a couple of friends , I will say a Yes. Else wait for sometime to see the evolution. Everything it has been constructed for is still in evolution. Cloud has to go a long way to see everything on it. The could be more features installed into these notebook s based on feedback and with time .
 Love reading latest tech news ? For more Subscribe here or click here to get updates via email

5/11/2011

What is Hybrid Boot ? Windows 8 News

There are lot of discussions going on the internet over a supposed to be windows leak which included some extra features like Live Mesh cloud sync , Hybrid boot ..


What is this Hybrid boot ?

Normally we use Hibernation in windows to achieve faster startup and to resume our work easily. Basically Hibernation saves the contents of your RAM to your hard disk to increase your start up speed.

Hybrid boot is a stripped version of conventional hibernate. Instead of storing the entire state of your machine, it only stores the current state of core Operating System files. This fastens the boot time of your Operating System when the next time you load it. Typically it would reduce the start up time to 20 sec as per some sources. But the time reduction would depend on the speed of disk, RAID setup ...

Hybrid boot will be enabled by default in Windows 8. You will not see the boot manager (in case if you have multiple OS ) when you use this option. But there is a manual possibility to disable this option in special cases.

Since it is still in build phase, this can be further improved at the time of release depending on the feedback Microsoft recieves.

Love reading latest tech news ? For more Subscribe here or click here to get updates via email

5/05/2011

which is better ? ASP.NET MVC or WebForms : How to choose between MVC and Webforms ?

  • ASP.NET Web Forms vs MVC ! 
  • What is the difference between ASP.NET WebForms and ASP.NET MVC ? 
  • When should I really choose MVC vs when should I choose webforms !
These are questions that normally run in the mind of any .NET developer in the recent times ( Confusing them what to learn ). Well both are used to build the same stuff and both have enough capabilities to build applications except that the way they are developed, tested and maintained is different. If some so called expert comes to you and says both are used to build different stuff , then it could very well  be that he is not able to understand things correctly.

Let me present you a small table that tells you the differences between the both and simplify your queries . The green ones are the advantages and red ones can not be..

ASP.NET MVC
ASP.NET Web Forms
More control over HTML that is rendered to browser which means you can really generate cleaner HTML
Don’t offer such a fine control over the HTML that is rendered and most of the it gets dirtier that we know.
Superior separation between UI and code
UI and logic coupled with code making it complex
Supports Multiple View Engines. Reuse your model/ Controller and plug it to a different view engine.
A option to forget about :). Switching between views with lot of things ( Master page, user control , theme ) is not a cake walk.
No Viewstate meaning a smaller page size. Unavailability of viewstate has its disadvantage too.
The more persistent controls you need, the more your view state will be and hence your page size too.
Allows end to end Test driven development (TDD), easy implementation of Mocking.
Not so straight forward to do unit tests for everything especially for the logic tightly coupled with your UI.
Easy integration with client side libraries like Jquery
Integration is possible but switching will be a bit difficult.
Development does need more effort. Don’t expect it to happen in same pace as Web Forms.
Very Suitable for RAD (Rapid Application Development). Build small applications and quick prototypes. Ease of development for heavy LOB applications.
MVC is a complete new way of doing web design and development. It basically gives a abstraction on both.
Windows Form Style development. (Any one can do development).  Feel at ease with drag, drop and clicks .Great designer support.
A lot of training and required for the developers to divert their mindset from conventional event driven programming. Frameworks and other things have still to evolve.
Greater visual studio support, Availability of resources and developers, Availability of third party controls.



So If we really look into the above analysis, ASP.NET web forms is a bit complex with lot of things ( ViewState, Postback, Page lifecycle, Data Binding ) having to be put in one place. The more complex things you start to make, the more complex your pages will start to become. Where as MVC is more of trying to loosely couple your HTML (VIEW) with the rest of code.

MVC does help you in doing a TDD but that does not mean you cant write your applications with out unit tests. Keeping the myths apart, When do you really need to choose MVC or Web Forms ?


Choose ASP.NET MVC
Choose ASP.NET Web Forms
  • More Test Driven Development (When you have to  validate everything you write )
  • More Control on HTML and need for separation ( Designing vs Code)
  • New large application (Especially build and evolve in long term)
·         Rapid Application Development ( RAD ) and less time to Market applications
·         Winforms like programming interface  ( Availability of Developers )
·         Heavy Data driven applications
·         Existing Web Forms application need not be migrated to MVC



Need more asp.net tips and tricks ? For more Subscribe here or click here to get updates via email

5/01/2011

How to deal with "IIS Metabase and IIS6 Configuration Compatibility" ? : IIS 7 issues

Are you receiving any of the following errors ?

you need to install the "IIS Metabase and IIS6 Configuration Compatibility" feature under Internet Information Services-Web Management Tools-IIS 6 Management Capability to get the IIS6 ADSI provider installed.

Your project has been configured to work with IIS. Either you dont have IIS 6 metabase installed or your virtual directory is not configured as a application.

To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.

If you are recieving any of these errors, you are in the right place to find a solution.

Well all of these errors occur because you either might be a newbie IIS 7 +  on Windows 7 or Windows Vista !

Let me help you dissolving each of these :) .. Lets start with the simplest one.

 To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.

By default, Windows runs applications in a limited-rights user account even when you are logged on to the computer as an administrator.

To run Visual Studio with administrative permissions in Windows 7 or Vista
  •     In Windows 7 or Vista , click Start, click All Programs, and then locate Visual Studio.
  •     Right-click Microsoft Visual Studio, and then click Run as administrator.




you need to install the "IIS Metabase and IIS6 Configuration Compatibility" feature under Internet Information Services-Web Management Tools-IIS 6 Management Capability to get the IIS6 ADSI provider installed.

  • First of all , you should have sufficient administrative access to turn or turn off windows features.
  • If you have the admin previliges , Please go to control panel in Windows and select Programs as shown in figure below.











  • In the settings page that opens, please select Turn windows features on or off .
  • Now go to Internet Information Services and then :
    • Expand Web Management Tools, expand IIS 6 Management Compatibility, and then select the IIS 6 Metabase and IIS 6 configuration compatibility check box.
    • Expand World Wide Web Services, expand Application Development Features, and then select the ASP.NET check box.
    • Expand World Wide Web Services, expand Security, and then select the Windows Authentication check box.
    • To enable Visual Studio to debug applications, you must configure IIS 7.0 with the Windows Authentication module. By default, the module is not configured as part of IIS.
    • Click OK to start the IIS and ASP.NET installation process.
 If you have resolved the above two, and still get the third error, Your project has been configured to work with IIS. Either you dont have IIS 6 metabase installed or your virtual directory is not configured as a application.

 This is something very smallish but this is something that IIS 7 + has brought in. Well in IIS 6 its just a virtual directory setup thats enough to run a application. But in IIS 7 , you have to make it as a application as well.
 Right click on your virtual directory and click on Convert to Application and you should get rid of this.


If you do the above three steps, you should be able to run your application and debug it :)


Courtesy : MSDN

Our guide to your problems help you ? For more Subscribe here or click here to get updates via email

Roles in Windows Azure : What is web role and worker role ?

After reading a lot of stuff about evolution of cloud and its economics, I finally started learning some real life stuff in the cloud world. Well I looked out for Enterprise lineant cloud services and I genuinely felt Microsoft is the choice for that. To go deeper , I started learning about the Cloud Operating System by Microsoft which is , Microsoft Azure ( PaaS ) .

As I started out reading about the hosted services in Azure , I came across a term which is called Role. Being a ASP.NET web developer, I was just confused with this role terminology in Azure. After giving some thought I am able to understand what is. For confused people like me :D, here is its definition .

Applications built on Azure should use atleast one of the roles below.
  •  Web role – A web role is a role that is customized for web application programming as supported by IIS 7 and ASP.NET. The benefit of using this type of role is that the IIS setup is done for you automatically by Azure. This role is best used for providing a web based frontend for your hosted service. It is not suited for long running processes
  • Worker role – A worker role is a role that is useful for generalized development, and may perform background processing for a web role. When you have a need for a background process that performs long running or intermittent tasks, you should normally go for Worker Role.
  • VM role – A VM role is a special type of role that enables you to define the configuration and updates of the operating system for the virtual machine. While a web role and a worker role run in a virtual machine, the VM role is the virtual machine, which gives you full control of operations. When you have long and complicated installations in the operating system or special setup issues, you should use this role. This role is especially suited for migrating existing applications to run as hosted services in Windows Azure.
I hope these definitions would have definitely helped you in understanding the roles in Azure.

If you want to learn about Creating a hosted service on Azure, please go to this link.

For more information on Cloud Computing ,  Subscribe here or click here to get updates via email