Cheap JSON Cloud Hosting – How to Add JSON Handler in IIS
JSON is built on two structures:
- A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures.
Advantages of JSON
- Smaller message size
- More structural information in the document
- Can easily distinguish between the number 1 and the string “1” as numbers, strings (and Booleans) are represented differently in JSON.
- Can easily distinguish between single items and collections of size one (using JSON arrays).
- Easier to represent a null value
Sometimes we need to create JSON in a text file with extension .json, however by default IIS 7 or any of the IIS are not configure to handle .json extension. So below is a very simple method to do that. You can apply the method on the root of IIS so .json can be handled by every site or virtual folder in the IIS or just to the specific site.
1. Open IIS Manager
2. Display properties for the IIS Server
3. Click MIME Types and then add the JSON extension:
File name extension: .json
MIME type: application/json
4. Go back to the properties for IIS Server
5. Click on Handler Mappings
Add a script map
Request path: *.json
Reasons To Use IIS 7 Hosting
IIS 7 makes extending Web server functionality easier. A new integrated pipeline lets developers create custom modules that can be plugged into the IIS7’s new request-processing pipeline. Developers can write native modules with C++ or managed modules in a .NET language such as C# or Visual Basic.Net. The advanced features of the .NET Framework, combined with deep integration into the IIS 7 pipeline, lets developers create custom modules quickly and easily. Any application can leverage the .NET Role and Membership providers, which are integrated in the new IIS 7 pipeline. Existing ISAPI applications built for IIS6 will also run without modification in IIS 7’s Classic mode.
IIS 7 builds on the security and reliability established by IIS 7.0. The modular design lets you reduce the attack surface of your server by uninstalling the modules that you do not need for your application. You can also write your own modules to support your custom security requirements. New automatic application isolation adds a layer of protection to keep applications safe from each other. IIS 7’s ability to set up rules to control access to URLs and filter requests lets administrators manage access to sites, folders, and files without requiring ACLs. And admin delegation lets you assign limited administrative rights to users for specific sites instead of granting server-wide admin rights.