Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have an "Hello world" WCF Service running in IIS. I have created a client in a separate solution which calls the service and returns the Standard "You Entered TEST" - works great.

I now want to step into the Service code via debug. I go to my client and attach to w3wp.exe but when I get to my call to the service

string xxx = client.GetData("TEST");


RealProxy.cs not found


I have looked everywhere but failed to find an answer to this. Appreciate any help I can get to be able to debug a simple WCF service running in IIS.

regards
Pat
Posted
Comments
Rajat_RJT 4-Mar-15 6:13am    
I think your file is missing from a dll. Try to add again that dll and
check following link-
http://referencesource.microsoft.com/#mscorlib/system/runtime/remoting/realproxy.cs

1 solution

Hi Rajat.

I have references to the following specified in both server & client solutions:

System
Ssystem.Net
System.Runtime.Remoting
System.Runtime.Serialization
System.ServiceModel

But still getting the same RealProxy.cs error (see below)

Locating source for 'f:\dd\NDP\clr\src\BCL\System\Runtime\Remoting\RealProxy.cs'. (No checksum.)
The file 'f:\dd\NDP\clr\src\BCL\System\Runtime\Remoting\RealProxy.cs' does not exist.
Looking in script documents for 'f:\dd\NDP\clr\src\BCL\System\Runtime\Remoting\RealProxy.cs'...
Looking in the projects for 'f:\dd\NDP\clr\src\BCL\System\Runtime\Remoting\RealProxy.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src\vccorlib\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: f:\dd\NDP\clr\src\BCL\System\Runtime\Remoting\RealProxy.cs.
The debugger could not locate the source file 'f:\dd\NDP\clr\src\BCL\System\Runtime\Remoting\RealProxy.cs'.

Below is my Client

C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.ServiceModel;

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

                ServiceReference2.Service1Client client = new ServiceReference2.Service1Client();
                string xxx = client.GetData("TEST123");


        }
    }
}



Here is my Server code

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfServiceLibrary7
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class Service1 : IService1
    {
        public string GetData(string value)
        {
            return string.Format("You entered: {0}", value);
        }

        public CompositeType GetDataUsingDataContract(CompositeType composite)
        {
            if (composite == null)
            {
                throw new ArgumentNullException("composite");
            }
            if (composite.BoolValue)
            {
                composite.StringValue += "Suffix";
            }
            return composite;
        }
    }
}



As you can see it is just a standard wcf client/server. But each time I attach to process and press F11 on

string xxx = client.GetData('TEST123')

I get the RealProxy.cs error.Is there anything obvious that I am doing wrong ?

regards
Pat
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900