My goal here is to use netTcpBinding with this web-hosting. Therefore, if I simply go ahead and change the binding in my web.config file, then it will result me the below error. However, the same can be achieved with the help of WAS.
Now, in order to fix this. I need to do coupe of changes here. First thing, I need to change the property of web host application to IIS.
Then I need to click on create virtual directory here. Make sure you are running the project in Admin mode, and then only you can create Virtual Directory from here. Once created successfully, then I need to open the IIS Manager.
Therefore, it created my application successfully here. Now, to setup WAS as default web site, I need to open up the command prompt and I need to do the same in admin mode. Then, I need to go in the inetsrv folder and then I need to run the following cmd “appcmd.exe set site “Default Web Site” -+bindings.[protocol=’net.tcp’,bindingInformation=’808:*’]”. I know this command is very cryptic. Nevertheless, this is the one, which I got from MSDN. Therefore, what I have done here is, executing app.cmd executable setting “Default Web Site” with netTcp binding. Then, it will give you message that Default website changed.
This has modified the applicationhost.config file. Now, I need to go to in IIS manager, and from the advanced setting section, I have added net.tcp as enabled protocol.
Now, I can go ahead and change the config file as shown below. Here, I have changed the binding.
Therefore, now my new address will be net.tcp//localhost/WebHostApplication/MovieManager.svc. I Hope, you would have liked today’s discussion. Thanks for Joining me.
727 total views, 1 views today