问题描述
1-我会为你改善我的问题,因为我不会写评论服务器有问题.....
我在运行Windows XP和Vista的台式计算机中有WCF服务,并且有一个名为客户端"的移动应用程序项目...当我生成代理时,我在服务运行期间在通用提示符下执行了此步骤:
1- i will improve my question for u because i coudn''t write comment the server has problem.....
i have WCF service in my desktop computer running windows xp and vista and i have the mobile applictaion project called "Client"... when i genrated the proxy i made this step in commond prompt during the service running :
NetCFSvcUtil http://localhost:8731/Design_Time_Addresses/Server/Service1
这个生成了2个文件Greeting_Service.cs和CFClientBase.cs
而且我都把这两个都放在了Client中;
这是我在Client中的代码:
and this genrated 2 files Greeting_Service.cs and CFClientBase.cs
and i puted both in Client;
and this is my code in Client :
System.ServiceModel.Channels.Binding binding = GreetingServiceClient.CreateDefaultBinding();
string address = GreetingServiceClient.EndpointAddress.Uri.ToString();
GreetingServiceClient m_proxy = new GreetingServiceClient(binding, new EndpointAddress(address));
string result = m_proxy.Greet(textBox1.Text).ToString();
textBox2.Text = result;
当我尝试运行服务和客户端时,此部分的CFClientBase.cs中会出现上述错误
返回requestChannel.Request(msg);
我尝试从此Client \ Client \ bin \ Debug \ Client.exe运行客户端",并且运行良好
..............
当我尝试使用您的解决方案并将生成代理的命令更改为...
when i try to run the service and the client the error above is appear in CFClientBase.cs at this part
return requestChannel.Request(msg);
and i tried to run the "Client" from this Client\Client\bin\Debug\Client.exe and it run fine
..............
when i try ur solution and change my command for genrate proxy to ...
NetCFSvcUtil http://192.168.1.76:8731/Design_Time_Addresses/Server/Service1
这是相同的错误.
it is the same error.
and thx for ur replay mr fredik.
推荐答案
这篇关于运行客户端移动应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!