远程服务器返回错误

远程服务器返回错误

本文介绍了远程服务器返回错误:NotFound:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WCF服务中使用此功能

using this function in WCF service

      [OperationContract]
public IQueryable SelectAllTesting()
{
DataClasses1DataContext db = new DataClasses1DataContext();

return (IQueryable)(from a in db.Employees
                    join b in db.Companys on a.Employeeid equals b.Employeeid
                     select new { a.Employeeid, a.EmployeeName, b.Companyname });
}


和mainPage.xaml中的调用类似:


And A call in mainPage.xaml like:

public partial class MainPage : UserControl
    {
        ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();

        public MainPage()
        {
            InitializeComponent();

        }

        void client_SelectAllTestingCompleted(object sender, ServiceReference1.SelectAllTestingCompletedEventArgs e)
        {
            MessageBox.Show(e.ToString());
            dataGrid1.ItemsSource = (IQueryable)e.Result;
            MessageBox.Show(e.ToString());
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            client.SelectAllTestingCompleted += new EventHandler<ServiceReference1.SelectAllTestingCompletedEventArgs>(client_SelectAllTestingCompleted);
            client.SelectAllTestingAsync();
        }

    }


运行应用程序引发异常时,远程服务器针对此应用程序返回错误:NotFound.
请帮助,正在等待回复
在此先感谢


while running application throwing exception The remote server returned an error: NotFound.for this application
please help , m waiting for response
thanks in advance

推荐答案


这篇关于远程服务器返回错误:NotFound:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 13:16