Hongye said:
Hi Bill,
Thanks for your reply and cooperation so far.
We are still on the way to troubleshoot the Visual Studio issue. The
problem now is that Visual Studio error message is too simple to locate the
root cause of the issue and we need tools like SvcUtil and Fiddler to help
us to gather detailed information.
In order to resolve this issue, here are the steps:
1. Check Visual Studio's error and we narrow down it into metadata getting
issue. (Already done)
2. Use SvcUtil or Fiddler tool to find the root cause of the error, because
Visual Studio itself doesn't report detailed message. (In progress)
3. Send the detailed error information to us.
4. We will find the root cause and resolution of the issue by the
information from the tools.
Now, the problem is at step 2 because you are unable to use SvcUtil to get
the detailed error messages. If there is some misunderstanding here, can
you clarify it to us?
An alternative way is using Fiddler. Can you follow the instructions that I
posted in my previous post? For your convenience, I copied it here:
-----------------------------------------------
2. Capture HTTP traffic (Fiddler.exe)
Visual Studio will send HTTP request (Get/Post) to
http://localhost:8731/ScCmdSvc/mex. The basic idea of this method is to
capture the HTTP traffic and view what server returns.
Here are the steps:
1. Download and install Fiddler2 from
http://www.fiddlertool.com/Fiddler2/version.asp
2. Open Fiddler, enable capture traffic(F12) and clear all sessions (CTRL +
X).
3. In service configuration file, change the endpoint from localhost to the
machine name. The request to localhost will not pass through Fiddler.
4. In Visual Studio, add service reference or update service reference.
5. Go back to Fiddler to check the traffic.
6. Select all the sessions and save them as ArchiveZip file and send it to
us.
-----------------------------------------------
Hongye,
The Fiddler session archive is attached.
When I try to "Discover" services in the solutions (under Add Service
Reference,) the response is "No services found in the solution." If I
enter the Address (
http://engineeringhead:8731/ScCmdSvc) manually, I see
the error details below; this is also when Fiddler was able to do a
capture (attached).
I'm thinking the problem may be with the structure of my solution. I
need to provide more detail on the this:
1. The WCF Service is provided at runtime by a Windows Service
(ScConnectorSvc.) Again, if I run the the Windows Service, the WCF Add
Service utility under VS can make a connection; it can see the service,
run the update, etc.
2. The WCF Service is provided to ScConnectorSvc
(ns=Aceco.eZ80WIN.ScConnectorSvc) through the ScConnector DLL; these are
2 different projects under VS.
3. The app.config (below) file is part of both projects. I guess I'm not
sure where exactly this should go.
4. The ns for ScConnector is Aceco.eZ80WIN.ScConnector and the WCF
Service classes are in a sub-ns called
Aceco.eZ80WIN.ScConnector.RemoteCommands. The source files for the
classes are in a sub directory RemoteCommands below the main ScConnector
project dir.
Let me know if you need anymore detail.
Bill
--------Error Details from VS----------
There was an error downloading '
http://engineeringhead:8731/ScCmdSvc'.
The request failed with HTTP status 502: Fiddler - Connection Failed.
Metadata contains a reference that cannot be resolved:
'
http://engineeringhead:8731/ScCmdSvc'.
The remote server returned an unexpected response: (502) Fiddler -
Connection Failed.
The remote server returned an error: (502) Bad Gateway.
If the service is defined in the current solution, try building the
solution and adding the service reference again.
---------app.config----------
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="StartDelay" value="0" />
<add key="LogConfig" value="LogConfig.xml" />
</appSettings>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the
config file must be added to the host's
app.config file. System.Configuration does not support config files
for libraries. -->
<system.serviceModel>
<services>
<service behaviorConfiguration="ScCmdSvc"
name="Aceco.eZ80WIN.ScConnector.RemoteCommands.ScCmdSvc">
<endpoint address="ScBinCmd" binding="basicHttpBinding"
name="ScBinCmd"
contract="Aceco.eZ80WIN.ScConnector.RemoteCommands.IScBinCmdService">
</endpoint>
<endpoint address="ScMdCmd" binding="basicHttpBinding"
name="ScMdCmd"
contract="Aceco.eZ80WIN.ScConnector.RemoteCommands.IScMdCmdService">
</endpoint>
<endpoint address="ScPlantCmd" binding="basicHttpBinding"
name="ScPlantCmd"
contract="Aceco.eZ80WIN.ScConnector.RemoteCommands.IScPlantCmdService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding"
name="MetaData" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="
http://engineeringhead:8731/ScCmdSvc" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ScCmdSvc">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint
above before deployment -->
<serviceMetadata httpGetEnabled="True" />
<!-- To receive exception details in faults for debugging
purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>