WCF Tutorial | What's new in WCF 4.5 Part 8
What's new in WCF 4.5 - Part 8
Internationalized Domain Names support
Internationalized domain name is a domain name that contains non-ASCII characters. Now WCF 4.5 support the IDN. Means ?
- Ability to host WCF with IDN name
- Client can call the service by using IDN name
Fig 1: Display the config settings
Uri has two properties Host and DnsSafeHost. These properties contain Unicode or Punycode values depending upon the IDN configuration settings
- "None" - no conversions are performed by Uri.Host or Uri.DnsSafeHos
- "AllExceptIntranet" - uri.Host remains Unicode and uri.DnsSafeHost is converted to Punycode
- "All" - uri.DnsSafeHost is converted to Punycode for internet addresses, and remains Unicode for intranet addresses
Note:This setting is not required to be configured for Windows 8 and newer versions.
- Always create the service with Interface->Implementation format, mention the contract in Interface.
- Define the service in Class library and refer the class library in Host project. Don’t use service class in host project.
- Change the instance mode to per call as default.
- Always catch exception using try/catch block and throw exception using FaultException < T >.
- Logging and Include exception should be enable while compiling the project in debug mode. While in production deployment disable the logging and Include exception details.