Showing posts with label IIS 7. Show all posts
Showing posts with label IIS 7. 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.

No connection could be made because the target machine actively refused it error in WAS hosted WCF service

 

Recently I have created wcf service which is on NetTCPBinding and hosted in WAS.But when I try to create proxy using WCFtestClient its always failed prompting this error. Sad smile

The reason for this is the host sent a reset signal, instead of an ack when the client tried to connect. It is therefore not a problem in the code. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that port.

  • There fore we need to marks service port  as allowed port in the server firewall by defining new rule.
  • Need to running NetTcpPort Sharing windows service and Net.Tcp  Distner adapter windows service.

image

After doing above two steps its works Smile Smile Smile

Thursday, March 14, 2013

Doesn’t show windows authentication in IIS 7

Recently when I try to deploy my web application to newly setup windows server, in the IIS it doesn’t listed the windows authentication option  under authentication

image

In order to have listed windows authentication you need to install it by going to the Server Manager and checking Windows Authentication Check box

Server Manager—>web Service--->Add Role Service

image

Note : - In this machine already installed the Windows authentication .other wise check box will be enabled.

Monday, March 11, 2013

404.2 The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server

recently I got this error when I deploy my asp .net application to the IIS.Reason for is that by default iis 7 didn’t allow ISAPI and CGI.There fore you need to allow those properties manually by using actions pane

 

image