Without the proper configuration, IIS will throw the error below wheneven you try to use net.tcp:
The protocol ‘net.tcp’ is not supported
Below is the configuration on how you can enable net.tcp in IIS 7.
1. Add WCF Activation, to do this go to Server Management -> Features -> Click Add Features
2. After installing the WCF Activation it may throw an error:
Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089’
To fix it, open the command prompt (Run as administrator) and enter the ff:
3. Issue an iireset on command prompt.
4. Go to the Web Site -> Right Click -> Edit Bindings – > Click Add, in the type select net.tcp and in the binding information set it to 808:*
5. Go to the Web Site -> In the Actions Pane click Advance Settings -> In the Behavior change it to http,net.tcp.
Repeat steps for every WCF Service Application (Virtual Directories) under the Web Site.
Event Log – System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security
This is a common error specially if you’re using Windows Server 2008 and higher, error means that the application/program that’s trying to write to event log with source not registered properly. Take the sample code below as an example:
During the deployment you can register the source by entering the ff command in the command prompt (Run as Administrator):
eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO <Source> /D “Registering”
If for some reason you don’t know the source is and it’s throwing the error do the following:
Start -> Run -> regedit.exe Navigate to My Computer > HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog
in the Permissions, and grant the identity wherein the application/server is running with read/write permissions.
You will see the source that you need to register in the Event Log.
If you encountered an error related to:
Access to the path ‘c:\windows\system32\inetsrv\<filename>’ is denied.
It means that the credential wherein your site or webservice is running doesn’t have permission to that folder.
Steps below describes how to fix it:
1. Browse to the directory -> %windir%\System32
2. Right Click on the inetsrv folder and select Properties
3. Click the Security Tab -> Click Advance Button
4. Select the Owner Tab and click Edit Button, Select Administrators group and Click Apply.
5. Run the command prompt as Administrator and type:
cacls %windir%\system32\inetsrv /G <Insert Identity here where App pool is running>:F
Ex: cacls %windir%\system32\inetsrv /G RPAULO\WCFServiceUser:F
When deploying a website or a web service using Visual Studio 2010 we can use a new deployment functionality called Build Deployment Package; this builds a zip file that you can import in IIS. The default location of zip is at ProjectFolder\obj\Debug\Package\.
However in IIS Manager, the default installation doesn’t include option to import our package, additional components need to be installed called Web Deploy (download). After installing the add-on you should be able to see the import option in IIS.