WCF Service won't work when published

Discussion in 'ASP .Net' started by JM_newsgroups, Sep 26, 2009.

  1. Hello,

    I got a WCF service to be consumed properly from a test web
    application on my local workstation in debug mode. However, when I
    publish the service to a server and call that service from my test web
    application, I get the following message. It acts like it's still
    trying to consume the service running on my local VS2008 web server,
    based on the port number. I've looked at the service web.config on
    the server as well as my test web application web.config, and I see
    nothing that tells me that would explain this behavior. When I add
    the service reference, it properly inserts the URL of the remote
    server in the web app web.config. I'm wondering if this all has
    something to do with the endpoint address, but I can't be sure. I've
    matched the endpoint addresses on both web.configs. On the remote
    server, I have a website dedicated to the service, to the URL is
    something like http://server1name/mynewservice.svc. I had this all
    working at one point, and something broke it. Thanks!

    -----------------


    {An ExceptionDetail, likely created by
    IncludeExceptionDetailInFaults=true, whose value is:

    System.Net.Sockets.SocketException: No connection could be made
    because the target machine actively refused it 127.0.0.1:49347

    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
    SocketAddress socketAddress)

    at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)

    at System.Net.ServicePoint.ConnectSocketInternal(Boolean
    connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
    address, ConnectSocketState state, IAsyncResult asyncResult, Int32
    timeout, Exception& exception)}
     
    JM_newsgroups, Sep 26, 2009
    #1
    1. Advertising

  2. Looks like in your Service config ...

    system.ServiceModel >> services >> service >> endpoint node, address
    attribute you might have configured the endpoint address to be
    http://localhost/mynewservices.svc instead of
    http://server1name/mynewservice.svc

    Cheers,
    -Naraen

    ~~~~~~~~~~~~~~~~~~~~~~
    Naraendirakumar R.R.
    Developer & Consultant
    ~~~~~~~~~~~~~~~~~~~~~~


    JM_newsgroups wrote:
    > Hello,
    >
    > I got a WCF service to be consumed properly from a test web
    > application on my local workstation in debug mode. However, when I
    > publish the service to a server and call that service from my test web
    > application, I get the following message. It acts like it's still
    > trying to consume the service running on my local VS2008 web server,
    > based on the port number. I've looked at the service web.config on
    > the server as well as my test web application web.config, and I see
    > nothing that tells me that would explain this behavior. When I add
    > the service reference, it properly inserts the URL of the remote
    > server in the web app web.config. I'm wondering if this all has
    > something to do with the endpoint address, but I can't be sure. I've
    > matched the endpoint addresses on both web.configs. On the remote
    > server, I have a website dedicated to the service, to the URL is
    > something like http://server1name/mynewservice.svc. I had this all
    > working at one point, and something broke it. Thanks!
    >
    > -----------------
    >
    >
    > {An ExceptionDetail, likely created by
    > IncludeExceptionDetailInFaults=true, whose value is:
    >
    > System.Net.Sockets.SocketException: No connection could be made
    > because the target machine actively refused it 127.0.0.1:49347
    >
    > at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
    > SocketAddress socketAddress)
    >
    > at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
    >
    > at System.Net.ServicePoint.ConnectSocketInternal(Boolean
    > connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
    > address, ConnectSocketState state, IAsyncResult asyncResult, Int32
    > timeout, Exception& exception)}
     
    Naraendira Kumar R.R., Sep 26, 2009
    #2
    1. Advertising

  3. Thank you for the reply. However, I checked that item. That's not
    the issue.


    On Sep 25, 9:37 pm, "Naraendira Kumar R.R." <> wrote:
    > Looks like in your Service config ...
    >
    > system.ServiceModel >> services >> service >> endpoint node, address
    > attribute you might have configured the endpoint address to behttp://localhost/mynewservices.svcinstead ofhttp://server1name/mynewservice.svc
    >
    > Cheers,
    > -Naraen
    >
    > ~~~~~~~~~~~~~~~~~~~~~~
    > Naraendirakumar R.R.
    > Developer & Consultant
    > ~~~~~~~~~~~~~~~~~~~~~~
    >
    > JM_newsgroupswrote:
    > > Hello,

    >
    > > I got a WCF service to be consumed properly from a test web
    > > application on my local workstation in debug mode.  However, when I
    > > publish the service to a server and call that service from my test web
    > > application, I get the following message.  It acts like it's still
    > > trying to consume the service running on my local VS2008 web server,
    > > based on the port number.  I've looked at the service web.config on
    > > the server as well as my test web application web.config, and I see
    > > nothing that tells me that would explain this behavior.  When I add
    > > the service reference, it properly inserts the URL of the remote
    > > server in the web app web.config.  I'm wondering if this all has
    > > something to do with the endpoint address, but I can't be sure.  I've
    > > matched the endpoint addresses on both web.configs.  On the remote
    > > server, I have a website dedicated to the service, to the URL is
    > > something likehttp://server1name/mynewservice.svc.  I had this all
    > > working at one point, and something broke it.  Thanks!

    >
    > > -----------------

    >
    > > {An ExceptionDetail, likely created by
    > > IncludeExceptionDetailInFaults=true, whose value is:

    >
    > > System.Net.Sockets.SocketException: No connection could be made
    > > because the target machine actively refused it 127.0.0.1:49347

    >
    > >    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
    > > SocketAddress socketAddress)

    >
    > >    at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)

    >
    > >    at System.Net.ServicePoint.ConnectSocketInternal(Boolean
    > > connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
    > > address, ConnectSocketState state, IAsyncResult asyncResult, Int32
    > > timeout, Exception& exception)}
     
    JM_newsgroups, Sep 26, 2009
    #3
  4. On Sep 26, 7:57 pm, JM_newsgroups <> wrote:
    > Thank you for the reply.  However, I checked that item.  That's not
    > the issue.
    >
    > On Sep 25, 9:37 pm, "Naraendira Kumar R.R." <> wrote:
    >
    > > Looks like in your Service config ...

    >
    > > system.ServiceModel >> services >> service >> endpoint node, address
    > > attribute you might have configured the endpoint address to behttp://localhost/mynewservices.svcinsteadofhttp://server1name/mynewservice.svc

    >
    > > Cheers,
    > > -Naraen

    >
    > > ~~~~~~~~~~~~~~~~~~~~~~
    > > Naraendirakumar R.R.
    > > Developer & Consultant
    > > ~~~~~~~~~~~~~~~~~~~~~~

    >
    > > JM_newsgroupswrote:
    > > > Hello,

    >
    > > > I got a WCF service to be consumed properly from a test web
    > > > application on my local workstation in debug mode.  However, when I
    > > > publish the service to a server and call that service from my test web
    > > > application, I get the following message.  It acts like it's still
    > > > trying to consume the service running on my local VS2008 web server,
    > > > based on the port number.  I've looked at the service web.config on
    > > > the server as well as my test web application web.config, and I see
    > > > nothing that tells me that would explain this behavior.  When I add
    > > > the service reference, it properly inserts the URL of the remote
    > > > server in the web app web.config.  I'm wondering if this all has
    > > > something to do with the endpoint address, but I can't be sure.  I've
    > > > matched the endpoint addresses on both web.configs.  On the remote
    > > > server, I have a website dedicated to the service, to the URL is
    > > > something likehttp://server1name/mynewservice.svc.  I had this all
    > > > working at one point, and something broke it.  Thanks!

    >
    > > > -----------------

    >
    > > > {An ExceptionDetail, likely created by
    > > > IncludeExceptionDetailInFaults=true, whose value is:

    >
    > > > System.Net.Sockets.SocketException: No connection could be made
    > > > because the target machine actively refused it 127.0.0.1:49347

    >
    > > >    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
    > > > SocketAddress socketAddress)

    >
    > > >    at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)

    >
    > > >    at System.Net.ServicePoint.ConnectSocketInternal(Boolean
    > > > connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
    > > > address, ConnectSocketState state, IAsyncResult asyncResult, Int32
    > > > timeout, Exception& exception)}


    It turns out it was an errant load of an XSL file from my built-in web
    server.
     
    JM_newsgroups, Sep 28, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Billy Zhang
    Replies:
    7
    Views:
    1,267
    Steven Cheng [MSFT]
    Jul 31, 2008
  2. Simon
    Replies:
    0
    Views:
    1,024
    Simon
    Oct 13, 2009
  3. Cindy Lee
    Replies:
    1
    Views:
    2,123
    Mr. Arnold
    Mar 19, 2010
  4. Curt K
    Replies:
    3
    Views:
    459
    John Saunders [MVP]
    Jun 15, 2007
  5. kellygreer1

    Web Service versus WCF Service (and Books)

    kellygreer1, Nov 8, 2007, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    159
    Andrew Faust
    Nov 9, 2007
Loading...

Share This Page