Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

17 views
Skip to first unread message

Mikhail S

unread,
Nov 20, 2009, 6:15:27 PM11/20/09
to
I can't 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 ***

Mr. Arnold

unread,
Nov 20, 2009, 9:41:53 PM11/20/09
to
Mikhail S wrote:
> I can't 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.

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's
not a Web application.


> 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
> // *************************

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 didn't
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.

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


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.

Mikhail S

unread,
Nov 23, 2009, 6:50:26 PM11/23/09
to

Thank you Mr. Arnold for quick respond.
By creating new Web Wcf Service project and new WCF service library
project I discover that in the same time svcutil.exe can find service
successfully while WCFTestClient.exe can't add service.


By the way, you wrote:
> select IIS as the infrastructure
> to use and not File System

what means "not File System"? In the VS2008 I can see 3 options for
servers:
- use VS Development server (is this means file system?)
- use local IIS web server
- use custom web server

Mr. Arnold

unread,
Nov 24, 2009, 1:18:25 PM11/24/09
to
Mikhail S wrote:
> Thank you Mr. Arnold for quick respond.
> By creating new Web Wcf Service project and new WCF service library
> project I discover that in the same time svcutil.exe can find service
> successfully while WCFTestClient.exe can't add service.
>
> By the way, you wrote:
>> select IIS as the infrastructure
>> to use and not File System
>
> what means "not File System"? In the VS2008 I can see 3 options for
> servers:
> - use VS Development server (is this means file system?)

Yes, the above is the file system.

0 new messages