Visual Studio
(1)
App Pool
(1)
ASP.NET
(1)
WCF
(1)
IIS
(1)
XP
(1)
Tool
(1)
Exchange
(1)

WCF service on IIS 5.1 does not works (XP Pro)

Asked By Mikhail S
20-Nov-09 06:15 PM
I cannot get standalone working service. It works perfectly under VC2008
(under ASP.NET development server). It works by Ctrl+F5 until
development server is active. If I stop development server (should be
IIS turn), then it stop working.
My solution includes web project and client project.

WCF Test Client shows followed error message:
// *************************
Error: Cannot obtain Metadata from http://localhost:2899/Service1.svc If
this is a Windows (R) Communication Foundation service to which you have
access, please check that you have enabled metadata publishing at the
specified address.  For help enabling metadata publishing, please refer
to the MSDN documentation at
http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error
URI: http://localhost:2899/Service1.svc    Metadata contains a reference
that cannot be resolved: 'http://localhost:2899/Service1.svc'.    Could
not connect to http://localhost:2899/Service1.svc. TCP error code 10061:
No connection could be made because the target machine actively refused
it 127.0.0.1:2899.     Unable to connect to the remote server    No
connection could be made because the target machine actively refused it
127.0.0.1:2899HTTP GET Error    URI: http://localhost:2899/Service1.svc
There was an error downloading 'http://localhost:2899/Service1.svc'.
Unable to connect to the remote server    No connection could be made
because the target machine actively refused it 127.0.0.1:2899
// *************************

And svcutil shows:
// *************************
C:\Program Files\Microsoft Visual Studio 9.0\VC>svcutil
http://localhost:2899/Service1
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version
3.0.4506.2152]
Copyright (c) Microsoft Corporation.  All rights reserved.

Attempting to download metadata from 'http://localhost:2899/Service1'
using WS-Metadata Exchange or DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version
3.0.4506.2152]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot obtain Metadata from http://localhost:2899/Service1

If this is a Windows (R) Communication Foundation service to which you
have access, please check that you have nabled metadata publishing at
the specified address.  For help enabling metadata publishing, please
refer to the MSDN documentation at http://go .microsoft.com/fwlink
?LinkId=65455.

WS-Metadata Exchange Error
URI: http://localhost:2899/Service1
Metadata contains a reference that cannot be resolved:
'http://localhost:2899/Service1'.

Could not connect to http://localhost:2899/Service1. TCP error code
10061: No connection could be made because the target machine actively
refused it 127.0.0.1:2899.

Unable to connect to the remote server
No connection could be made because the target machine actively
refused it 127.0.0.1:2899

HTTP GET Error
URI: http://localhost:2899/Service1
There was an error downloading 'http://localhost:2899/Service1'.

Unable to connect to the remote server
No connection could be made because the target machine actively
refused it 127.0.0.1:2899
// *************************

I publish my web project directly to root: C:\Inetpub\wwwroot\

Thoughts?

Mikhail


*** Sent via Developersdex http://www.developersdex.com ***

Mikhail S wrote:If the WCF dev. server app is not converted over to an ASP.

Mr. Arnold replied to Mikhail S
20-Nov-09 09:41 PM
If the WCF dev. server app is not converted over to an ASP.NET Web
application against IIS, with an IIS Web virtual directory created for
the application, and creation App Pool entry of the App pool, then it is
not a Web application.



Well the first thing you should have done is typed in
http://localhost/Service1.svc into the Web browser address bar to see if
the Web Service would show its information, which should be on port 80,
the default -- no need to enter a port 80 of localhost:80. If it did not
show by you using the browser first, then something is wrong.

The bottom line is the service is not there listing on port:2899,
because there is no WCF Servic1.svc application there listening.



You should start over and create a WCF Web service project and select
IIS as the infrastructure to use and not File System, you right click
the project in the VS solution and go to Properties and tell it to
create the virtual directory, which the default is port 80, and it will
connect the application to the IIS App Pool.

You can also convert the VS File System Dev solution over to an IIS
ASP.Net Web application too. You can use Google and look it up.
Post Question To EggHeadCafe