Self-Hosted WCF Application Deployment Problem
I have a middle-ware project/application that all of the in-coming and out-going requests through TCP are Add-ins.
And one of the front-side add-ins is a Self-Hosted Web Service through WCF that allows anonymous connection.
It is working properly when I run it with Debugging; I can access the Web-Service properly in my test-client application and even in a Web-browser.
However, when I'm going to run it without Debugging, I can't access the Web Service in my test application and Web-Browser.
Thanks for any help.
Re: Self-Hosted WCF Application Deployment Problem
Any idea about this problem?
Thanks.
Re: Self-Hosted WCF Application Deployment Problem
Is the service started???? Because the debugger automatically starts the service,
Re: Self-Hosted WCF Application Deployment Problem
Yes, it is started.
When I try to start another service using a console command with; it raise an exception that tells me that the URL is already in use.
Re: Self-Hosted WCF Application Deployment Problem
Do you get an error? or just: page not found?
Re: Self-Hosted WCF Application Deployment Problem
I think I found out the problem.
The project is a console-based middle-ware application which establishes multiple socket connections for inbound and outbound requests as plug-ins through System.Addins.
And one of these add-ins is a self-hosted Web Service through WCF.
The pre-requisites for this class-library project(Self-hosted Web Service) to become an add-in; it must add a reference of the Addin.View DLL and implement one of the class-library's abstract classes. The output file(DLL) must be placed in Addins directory but the Addins.View DLL must not be copied there or it won't be loaded as its add-ins.
But the WCF's service won't start probably because of it can't find its reference DLLs.
Re: Self-Hosted WCF Application Deployment Problem
Quote:
Originally Posted by
Lightning
Do you get an error? or just: page not found?
On the Web Browser; the error message is Unable to Connect but through WCF Test Client(WcfTestClient.exe); the error message is:
Quote:
Error: Cannot obtain Metadata from
http://localhost:8001/PRG?wsdl 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/?Link...55.WS-Metadata Exchange Error URI:
http://localhost:8001/PRG?wsdl Metadata contains a reference that cannot be resolved: 'http://localhost:8001/PRG?wsdl'. An error occurred while receiving the HTTP response to
http://localhost:8001/PRG?wsdl. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. The underlying connection was closed: An unexpected error occurred on a receive. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote hostHTTP GET Error URI:
http://localhost:8001/PRG?wsdl There was an error downloading 'http://localhost:8001/PRG?wsdl'. The underlying connection was closed: An unexpected error occurred on a receive. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host
Re: Self-Hosted WCF Application Deployment Problem
This error means that you don't have a "mex" endpoint defined in you config file.
ex.
<endpoint address="" binding="basicHttpBinding" contract="Test.TestSevice">
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
Re: Self-Hosted WCF Application Deployment Problem
The config file exists but when the reference DLL, the Addin.View part, have a copy in the directory where my WCF-based front-end plug-in located, it doesn't work.
But if the Addin.View DLL is present on the plug-ins directory; it can't be read as a plug-in.
Re: Self-Hosted WCF Application Deployment Problem
I'll re-open this issue.
The WCF-based web-service and it's WSDL can be browse through a Web Browser in both debug and without debugging.
I can add the reference and call the methods from my test applications in debug mode(server), but when I run the server without debugging and add reference or call a method; I can't browse the service through a web browser and it shows the error message "Connection Reset".
To be able to see the service in a browser during the "run without debugging"; I need to re-run the application in debug mode then re-run it without debugging.
Thanks for the help.
Re: Self-Hosted WCF Application Deployment Problem
Not sure if someone's ask this but is the console app actually running when you attempt to browse to it? I don't know what you're referring to by run without debugging and rerunning here. If this is a console based self hosted WCF service, then you need to keep it running at all times.
Re: Self-Hosted WCF Application Deployment Problem
Hi Mendhak, about running without debugging; I'm referring about the sub-menu under the Debug menu in MSVS2008 and I'm sure the console and service is running.