Home All Groups Group Topic Archive Search About

Broken WCF service reference in VS 2008

Author
26 Nov 2008 2:42 PM
Bill McCormick
I have somehow broken a service reference in one of my projects VS2008;
it will no longer run the Update Service Reference.

I made 2 changes:

1. Added a new endpoint to App.config
2. Merged the assembly that provided the contracts into another assembly.

I can get the update to to it's thing if I run an application outside of
VS that hosts the services, but it used to be that I did not have to do
that.

Thoughts?

Bill

Author
27 Nov 2008 10:39 AM
Hongye Sun [MSFT]
Hi Bill,

Thanks for your post.

Broken WCF service reference can be caused by many issues. In order to find
the root cause, we should know how VS2008 updates service reference. I will
explain it to you in detail. After that, I will provide you troubleshooting
steps.

When updating service reference in VS 2008, the IDE will do the following
actions:
1. Query app.config for endpoint address
2. Send HTTP request to server to get WSDL data
3. Go through referenced assemblies to find data types that can be reused.
(You can control this behavior in "Configure Service Reference")
4. Generate code based on the WSDL data. The found data type in the
previous step will be ignored.
5. Update app.config file with latest server information

Troubleshooting steps:
1. Collecting error message
When updating service reference failed, usually, VS2008 will report an
error message box. The error is very useful for us to narrow down the
problem. So please copy the message here.

2. Re-adding service reference
Delete and re-add the broken service reference can help to make sure that
the service URL is correct, so that VS2008 can works properly in actions #2
when updating service reference.

3. Uncheck reuse types in referenced assemblies
By uncheck this option, the problem can be narrow down to action #3.
To do it, right click the service reference entry to your service ->
Configure service references -> uncheck "Reuse types in referenced
assemblies".

Could you please have a try of the steps above? In the meanwhile, I am
performing a research on other possibilities of the issue and try to figure
out other methods to solve your problem.

P.S. Today is Thanksgiving Day. I'd like to take this opportunity to say
thanks to you.
Thank you for choosing Microsoft Newsgroup support. We will do our best to
bring you a satisfactory experience of the service.

Have a nice day.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Are all your drivers up to date? click for free checkup

Author
27 Nov 2008 2:25 PM
Bill McCormick
Hongye Sun [MSFT] wrote:
Show quoteHide quote
> Hi Bill,
>
> Thanks for your post.
>
> Broken WCF service reference can be caused by many issues. In order to find
> the root cause, we should know how VS2008 updates service reference. I will
> explain it to you in detail. After that, I will provide you troubleshooting
> steps.

> When updating service reference in VS 2008, the IDE will do the following
> actions:
> 1. Query app.config for endpoint address
> 2. Send HTTP request to server to get WSDL data
> 3. Go through referenced assemblies to find data types that can be reused.
> (You can control this behavior in "Configure Service Reference")
> 4. Generate code based on the WSDL data. The found data type in the
> previous step will be ignored.
> 5. Update app.config file with latest server information
>
> Troubleshooting steps:
> 1. Collecting error message
> When updating service reference failed, usually, VS2008 will report an
> error message box. The error is very useful for us to narrow down the
> problem. So please copy the message here.
>
> 2. Re-adding service reference
> Delete and re-add the broken service reference can help to make sure that
> the service URL is correct, so that VS2008 can works properly in actions #2
> when updating service reference.
>
> 3. Uncheck reuse types in referenced assemblies
> By uncheck this option, the problem can be narrow down to action #3.
> To do it, right click the service reference entry to your service ->
> Configure service references -> uncheck "Reuse types in referenced
> assemblies".
>

For #2 and after #3 above, it can't find any services in the solution.
Now, the only way I can add a service reference is to actually run the
app that provides them outside VS.

Bill
Author
28 Nov 2008 4:33 PM
Hongye Sun [MSFT]
Hi Bill,

Your reply is very helpful. From the error message, we have successfully
locate that the error happens when Visual Studio queries metadata from the
metadata address(http://localhost:8731/ScCmdSvc/mex). After researching in
our lab, we found that the error message "Metadata contains a reference
that cannot be resolved" usually is not the root cause of the problem. To
find the real cause, we have the following two ways:

1. ServiceModel Metadata Utility Tool (Svcutil.exe)
This tool is used by Visual Studio to generate service model code from
metadata endpoint. It will report more detailed error than Visual Studio
doesn. Here are the steps:
a. Open Visual Studio Command Prompt.
b. Type "svcutil http://localhost:8731/ScCmdSvc/mex" and check if it
reports errors.
It is documented at http://msdn.microsoft.com/en-us/library/aa347733.aspx.

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.

In the meanwhile, it will be much helpful if you can build a simplified
repro project and send it to us. We will reproduce the error in our lab and
you don't need to do so many troubleshooting on your side.

Another thing I need to confirm that if you are using VS 2008 RTM version.
Since that in VS 2008 beta version, there is a bug which causes the same
error as yours.

Please let us know if you have anything unclear. Thanks for your time.

Have a nice weekend.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
1 Dec 2008 5:43 PM
Bill McCormick
Hongye Sun [MSFT] wrote:
Show quoteHide quote
> Hi Bill,
>
> Your reply is very helpful. From the error message, we have successfully
> locate that the error happens when Visual Studio queries metadata from the
> metadata address(http://localhost:8731/ScCmdSvc/mex). After researching in
> our lab, we found that the error message "Metadata contains a reference
> that cannot be resolved" usually is not the root cause of the problem. To
> find the real cause, we have the following two ways:
>
> 1. ServiceModel Metadata Utility Tool (Svcutil.exe)
> This tool is used by Visual Studio to generate service model code from
> metadata endpoint. It will report more detailed error than Visual Studio
> doesn. Here are the steps:
> a. Open Visual Studio Command Prompt.
> b. Type "svcutil http://localhost:8731/ScCmdSvc/mex" and check if it
> reports errors.
> It is documented at http://msdn.microsoft.com/en-us/library/aa347733.aspx.

>svcutil http://localhost:8731/ScCmdSvc/mex
Command "svcutil" is not valid.
>

Is this a path problem? Or something else?

Bill
Author
2 Dec 2008 6:05 AM
Hongye Sun [MSFT]
Hi Bill,

It seems that Windows SDK is not installed on your machine.

To install Windows SDK, please download it at:
http://go.microsoft.com/fwlink/?LinkId=82431

Then, install it by following its release notes at:
http://download.microsoft.com/download/6/2/2/622d5f37-9510-463a-8760-08f8e03
0d807/ReleaseNotes.Htm#Downloading%20and%20Installing

After installing, you can use Visual Studio Command Prompt to run svcutil
tool.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
2 Dec 2008 4:45 PM
Bill McCormick
Hongye Sun [MSFT] wrote:
Show quoteHide quote
> Hi Bill,
>
> It seems that Windows SDK is not installed on your machine.
>
> To install Windows SDK, please download it at:
> http://go.microsoft.com/fwlink/?LinkId=82431
>
> Then, install it by following its release notes at:
> http://download.microsoft.com/download/6/2/2/622d5f37-9510-463a-8760-08f8e03
> 0d807/ReleaseNotes.Htm#Downloading%20and%20Installing
>
> After installing, you can use Visual Studio Command Prompt to run svcutil
> tool.
>

Sorry, that didn't work either:

>svcutil http://localhost:8731/ScCmdSvc/mex
Command "svcutil" is not valid.

The SDK setup created this:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

I had an existing
C:\Program Files\Microsoft SDKs\Windows\v6.0\bin

and

C:\Program Files\Microsoft SDKs\Windows\v5.0A\bin

from previous installs.

I put C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin in the system
PATH env var but that didn't seem to help either. Looks like there needs
to be some integration between VS and the SDK that is not there.

Again, I'm using VS 2005 & 2008 installed on the same machine with the
..NET 3.5SP1 and the WPFToolkit.


Thanks,


Bill
Author
3 Dec 2008 9:41 AM
Hongye Sun [MSFT]
Hi Bill,

This is strange, because I tested the setup file both in Windows Vista and
Windows 2003. It will create path as you specified in setup wizard. The SDK
bin folder does include the SvcUtil.exe tool.

In my machine, it is located at C:\Program Files\Microsoft
SDKs\Windows\v6.0\Bin\SvcUtil.exe. I think you have already installed other
version of Windows SDK so it creates a 6.0A folder for you. It is possible
that VS command prompt only search for 6.0 folder instead of 6.0A folder.
That may cause the problem.

Please take the following steps to figure out the problem:
1. Go to "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin" folder to
verify if SvcUtil.exe file exists.
2. If exists, Run "C:\Program Files\Microsoft Visual Studio
9.0\Common7\Tools\vsvars32.bat" batch file. Within that batch file, it will
set the Windows SDK folders.
3. If it is still not working, add both "C:\Program Files\Microsoft
SDKs\Windows\v6.0\bin" and "C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin" in PATH env var and restart command prompt. Visual
Studio Command Prompt will inherit the settings from PATH env var.
4. If it is still not working,  open command prompt, type "cd C:\Program
Files\Microsoft SDKs\Windows\v6.0A\bin" to change your current directory to
that folder and continue to use SvcUtil.exe tool.

Please let us know if it works. Thanks for your cooperation so far.

Have a nice day.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
9 Dec 2008 3:13 PM
Bill McCormick
Hongye Sun [MSFT] wrote:
Show quoteHide quote
> Hi Bill,
>
> This is strange, because I tested the setup file both in Windows Vista and
> Windows 2003. It will create path as you specified in setup wizard. The SDK
> bin folder does include the SvcUtil.exe tool.
>
> In my machine, it is located at C:\Program Files\Microsoft
> SDKs\Windows\v6.0\Bin\SvcUtil.exe. I think you have already installed other
> version of Windows SDK so it creates a 6.0A folder for you. It is possible
> that VS command prompt only search for 6.0 folder instead of 6.0A folder.
> That may cause the problem.
>
> Please take the following steps to figure out the problem:
> 1. Go to "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin" folder to
> verify if SvcUtil.exe file exists.
> 2. If exists, Run "C:\Program Files\Microsoft Visual Studio
> 9.0\Common7\Tools\vsvars32.bat" batch file. Within that batch file, it will
> set the Windows SDK folders.
> 3. If it is still not working, add both "C:\Program Files\Microsoft
> SDKs\Windows\v6.0\bin" and "C:\Program Files\Microsoft
> SDKs\Windows\v6.0A\bin" in PATH env var and restart command prompt. Visual
> Studio Command Prompt will inherit the settings from PATH env var.
> 4. If it is still not working,  open command prompt, type "cd C:\Program
> Files\Microsoft SDKs\Windows\v6.0A\bin" to change your current directory to
> that folder and continue to use SvcUtil.exe tool.
>
> Please let us know if it works. Thanks for your cooperation so far.
>
After following the above steps, it still does not work. Remember, the
problem I'm having is NOT that I cannot run SvcUtil; rather, that I
cannot update WCF service references inside VS (without running the
Windows Service that provides them.)

Thanks,

Bill
Author
10 Dec 2008 12:08 PM
Hongye Sun [MSFT]
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.
-----------------------------------------------

The third option for you is send us a small repro project, so that we can
perform a complete analyze on it in our lab. This is the most efficient way.

Thanks for your understanding.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
11 Dec 2008 3:39 PM
Bill McCormick
Hongye Sun [MSFT] wrote:
Show quoteHide quote
> 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>
Author
12 Dec 2008 6:18 AM
Hongye Sun [MSFT]
Hi Bill,

Thanks for your reply. The information you provided is very helpful. We are
much more clear about what causes this problem.

Possible Cause:
Visual Studio does not start WCF Service Host tool automatically when you
adding a service reference.

Usually, Visual Studio will automatically start a WcfSvcHost.exe process to
host WCF service when one wants to add a service reference. Before Visual
Studio start the host process, it checks two things:
1. Is the WCF Service in the same solution as the client application?
2. Is the WCF Service project one of the WCF service library project types?
(In your case, the WCF Service project should be "ScConnector")

I think in your case #1 requirement is met. Please let me know if it is not.

For the #2 requirement, it can be verified by: Right click project in
solution explorer -> Properties -> Check tabs on the right side and if
there is a tab named "WCF Options".

If there is no "WCF Options" tab, please do the following step to recreate
a new project:
1. Add new project into solution
2. Select project type: WCF Service Library type (e.g. Visual C# / WCF /
WCF Service Library) 3. Copy all the existing code files from old project
into new project.

In addition, in "WCF Option" tab, please check "Start WCF Service Host when
debugging another project in the same solution". This will ease you to
debug your client application.

Finally, after all the things above are done, try adding service reference
again and check if there is a new process named "WcfSvcHost.exe" in the
task manager.

Please let us know if there is anything unclear or missing here. Thanks for
your cooperations.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.') Microsoft
Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
12 Dec 2008 8:24 PM
Bill McCormick
Hongye Sun [MSFT] wrote:
Show quoteHide quote
> Hi Bill,
>
> Thanks for your reply. The information you provided is very helpful. We are
> much more clear about what causes this problem.
>
> Possible Cause:
> Visual Studio does not start WCF Service Host tool automatically when you
> adding a service reference.
>
> Usually, Visual Studio will automatically start a WcfSvcHost.exe process to
> host WCF service when one wants to add a service reference. Before Visual
> Studio start the host process, it checks two things:
> 1. Is the WCF Service in the same solution as the client application?
> 2. Is the WCF Service project one of the WCF service library project types?
> (In your case, the WCF Service project should be "ScConnector")
>
> I think in your case #1 requirement is met. Please let me know if it is not.
>
> For the #2 requirement, it can be verified by: Right click project in
> solution explorer -> Properties -> Check tabs on the right side and if
> there is a tab named "WCF Options".
>
> If there is no "WCF Options" tab, please do the following step to recreate
> a new project:
> 1. Add new project into solution
> 2. Select project type: WCF Service Library type (e.g. Visual C# / WCF /
> WCF Service Library) 3. Copy all the existing code files from old project
> into new project.
>
> In addition, in "WCF Option" tab, please check "Start WCF Service Host when
> debugging another project in the same solution". This will ease you to
> debug your client application.
>
> Finally, after all the things above are done, try adding service reference
> again and check if there is a new process named "WcfSvcHost.exe" in the
> task manager.
>

Sha-bang!!! That did it!! Following the procedure to fulfill
requirements for #2 did the trick. What happened is that at one point I
had created a WCF Service (as outlined above) but then subsequently
moved the source to ScConnector - which WAS NOT created as an WCF Service.

Thanks so much.

Bill
Author
15 Dec 2008 2:21 AM
Hongye Sun [MSFT]
Thanks for your confirmation and your great cooperation, Bill. I am very
glad that the issue was resolved after our effort. I am looking for working
with you again in future.

Thanks for using Microsoft Newsgroup Service.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
8 Dec 2008 6:48 PM
Bill McCormick
Bill McCormick wrote:
Show quoteHide quote
> Hongye Sun [MSFT] wrote:
>> Hi Bill,
>>
>> It seems that Windows SDK is not installed on your machine.
>>
>> To install Windows SDK, please download it at:
>> http://go.microsoft.com/fwlink/?LinkId=82431
>>
>> Then, install it by following its release notes at:
>> http://download.microsoft.com/download/6/2/2/622d5f37-9510-463a-8760-08f8e03
>>
>> 0d807/ReleaseNotes.Htm#Downloading%20and%20Installing
>>
>> After installing, you can use Visual Studio Command Prompt to run
>> svcutil tool.
>>
>
> Sorry, that didn't work either:
>
>  >svcutil http://localhost:8731/ScCmdSvc/mex
> Command "svcutil" is not valid.
>
> The SDK setup created this:
> C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
>
> I had an existing
> C:\Program Files\Microsoft SDKs\Windows\v6.0\bin
>
> and
>
> C:\Program Files\Microsoft SDKs\Windows\v5.0A\bin
>
> from previous installs.
>
> I put C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin in the system
> PATH env var but that didn't seem to help either. Looks like there needs
> to be some integration between VS and the SDK that is not there.
>
> Again, I'm using VS 2005 & 2008 installed on the same machine with the
> .NET 3.5SP1 and the WPFToolkit.
>

Are you still there? I'm waiting for some new guidance on this issue.

Thanks,

Bill
Author
9 Dec 2008 2:13 AM
Hongye Sun [MSFT]
Hi Bill,

I have posted my answer at 12/3/2008, just the next day of your last reply.
Can you see it at link:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=micros
oft.public.dotnet.languages.csharp&tid=392b04c6-c48d-4442-9af5-e008ec383834&
cat=&lang=&cr=&sloc=&p=1

Here is my answer:
---------------------------------------
This is strange, because I tested the setup file both in Windows Vista and
Windows 2003. It will create path as you specified in setup wizard. The SDK
bin folder does include the SvcUtil.exe tool.

In my machine, it is located at C:\Program Files\Microsoft
SDKs\Windows\v6.0\Bin\SvcUtil.exe. I think you have already installed other
version of Windows SDK so it creates a 6.0A folder for you. It is possible
that VS command prompt only search for 6.0 folder instead of 6.0A folder.
That may cause the problem.

Please take the following steps to figure out the problem:
1. Go to "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin" folder to
verify if SvcUtil.exe file exists.
2. If exists, Run "C:\Program Files\Microsoft Visual Studio
9.0\Common7\Tools\vsvars32.bat" batch file. Within that batch file, it will
set the Windows SDK folders.
3. If it is still not working, add both "C:\Program Files\Microsoft
SDKs\Windows\v6.0\bin" and "C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin" in PATH env var and restart command prompt. Visual
Studio Command Prompt will inherit the settings from PATH env var.
4. If it is still not working, open command prompt, type "cd C:\Program
Files\Microsoft SDKs\Windows\v6.0A\bin" to change your current directory to
that folder and continue to use SvcUtil.exe tool.
---------------------------------------

You may encounter tool's issue to receive my answer. I will send you email
to make sure you have got it from now on. Thanks.

Regards,
Hongye Sun (hong***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.

Bookmark and Share