WCF Service - could not be activated

I receive the following error when I make a request to WCF Service:

The requested service, 'net.tcp://localhost:9090/AppointmentServiceIISHost/AppointmentServiceIISHost.svc' could not be activated. See the server's diagnostic trace logs for more information.

Does anybody know what error usually means?
Lawrence AverySystem DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Many times these types of problems with WCF and net.tcp is due to the Net.Tcp Listener Adapter service not running.

check your Services list to see if that service is running. If not you may need to install it.
Lawrence AverySystem DeveloperAuthor Commented:
The Net.TCP listener is running. I have my wcf service defined in a folder other than under
c:\inetpub\wwwroot; could that be the problem?
I made an alias to it.

I looked in the event view found this:

This collection already contains an address with scheme net.tcp.  There can be at most one address per scheme in this collection.
Parameter name: item. ---> System.ArgumentException: This collection already contains an address with scheme net.tcp.  There can be at most one address per scheme in this collection.

What does that mean?

I have only one net.tcp binding defined per my default website and also enabled protocol on my wcf service to be net.tcp.
Lawrence AverySystem DeveloperAuthor Commented:
I am now attempting to access wcf service using  .NET 4.0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Need to look at your web.config file. I believe this has to do with the baseaddressprefixfilters. I had a bookmark to a post on another site but not sure if I can post it here. It basically has to do with having multiple host headers on a site. You can handle it with the prefix filters.
Lawrence AverySystem DeveloperAuthor Commented:
I tried that baseaddressprefixfilters. It did not work with 3.5 .NET. So I am trying .NET 4.0.
Lawrence AverySystem DeveloperAuthor Commented:
Here is my App.config and Web.config file for my WCF Service. If anyone can possibly tell me what is causing  the following problem:

The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost:9090/AppointmentServiceIISHost/AppointmentServiceIISHost.svc' is unavailable for the protocol of the address.

BTW I am using .NET 4.0 on a windows 7 --64 bit machine

My windows application log indicates this problem:

An error occurred while trying to start an app domain protocol listener channel.

Exception: System.IO.FileLoadException

Message: Could not load file or assembly 'System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied
Lawrence AverySystem DeveloperAuthor Commented:
I figured it out. All along the IIS 7.5 was trying to login with a  IIS_IUSERS group user into a database I was accessing.
However, my SQL Server did not have the IIS_IUSER user as a user and login. So that is why I kept failing. I finally saw something in the windows application log referring to MSSQLServer.

I changed my SqlConnection string to include a USER ID and Password.

Plus the WCF server directory had to have IIS_USER permission.
You see I was not running it from C:\ inetpub\wwwroot.

Finally after about 7 or 8 days I finally got it to run.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lawrence AverySystem DeveloperAuthor Commented:
I figured it out myself. See above comment.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.