Showing posts with label Hosting. Show all posts
Showing posts with label Hosting. Show all posts

Thursday, February 12, 2015

Adding site binding gives object null reference error in IIS7

Recently I have tried to add new binding to the my existing site using IIS GUI. But when fill the relevant information and click ok button its ended up with prompting object null reference to me.

image 

But I could not find solution for this but found the another way to do the same task using Appcmd.exe(only available in IIS 7 or above). I want to add new net.tcp biding to the site and I ran below code in the command prompt(please make sure to run comman prompt as Administrator mode- other wise there will be another errors.).

appcmd set site /site.name: contoso /+bindings.[protocol='https',bindingInformation='*:443:'].

Tuesday, April 1, 2014

Deploy WCF service without SVC file in IIS and WAS

Normally when we going to host WCF service in IIS or WAS need to have svc file. The Service.svc file is an XML-based file that must include an @ServiceHost directive. The directive identifies your
service, and it should include attributes that identify the service code language and the name
of the service.

But think a scenario where you have lots of services in a enterprise environment.Then you have to maintain lot of svc files.Its adds extra penalty to the developer as well as the deployment engineer.fortunately WCF 4.0  has shipped with new future called Configuration based activation which is capable for overcome this problem.

There are lo of WCF 4.0 features.Please refer MSDN . http://msdn.microsoft.com/en-us/library/dd456789(v=vs.100).aspx

When using CBA we don’t need to use and svc file instead of that Configuration-based activation takes the metadata that used to be placed in the .svc file and places it in the Web.config file.It use <serviceHostingEnvironment>/<serviceActivations> tags.

let see below example.we need to add below code to the web.config file.

CBAimage1

After deploy to the IIS(with out svc).

iis

finally

CBDemo

For additional information please refer : http://msdn.microsoft.com/en-us/library/ee358764(v=VS.110).aspx

Tuesday, July 2, 2013

Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].

 

Recently I have create WCF service and hosted in IIS 7.5 under was.

Then I investigate the reason and found the reason.In order to over come this issue we need to have both http,net.tcp protocols in hosted web application advanced settings under Behavior section.

image.