首页 新闻 会员 周边

webservice 问题 异常描述: 由于 ContractFilter 在 EndpointDispatcher 不匹配,因此 Action 为“http://

0
悬赏园豆:10 [已关闭问题] 关闭于 2013-09-26 14:58

webservice 和 wpf 交互

webservice 代码:

        
类名头添加了
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.None)]
方法:
        /// <summary>
        /// 获取地区编码
        /// </summary>
        /// <param name="mac">mac地址</param>
        /// <returns></returns>
        [WebMethod(Description="获取地区编码")]
        public string GetAreaId(string mac)
        {
            string areaId = string.Empty;
            string ip = GetClientIP();
            dalFringers.GetAreaIdByIpAddress(ip, mac, ref areaId);
            return areaId;
        }    
View Code

详细异常:

异常描述: 由于 ContractFilter 在 EndpointDispatcher 不匹配,因此 Action 为“http://tempuri.org/IExpertWebServiceManager/GetAreaId”的消息无法在接收方处理。这可能是由于协定不匹配(发送方和接收方 Action 不匹配)或发送方和接收方绑定/安全不匹配。请检查发送方和接收方是否具有相同的协定和绑定(包括安全要求,如 Message、Transport、None)。
异常类型:System.Reflection.TargetInvocationException
发 生 源:mscorlib
目标位置:InvokeMethod
堆栈跟踪:   在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   在 System.Delegate.DynamicInvokeImpl(Object[] args)
   在 System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.ContentElement.RaiseEvent(RoutedEventArgs e)
   在 DevExpress.Xpf.Bars.BarItem.RaiseItemClick(BarItemLink link)
   在 DevExpress.Xpf.Bars.BarItem.OnItemClick(BarItemLink link)
   在 DevExpress.Xpf.Bars.BarItemLink.OnClick()
   在 DevExpress.Xpf.Bars.BarItemLinkControl.OnClick()
   在 DevExpress.Xpf.Bars.BarButtonItemLinkControl.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   在 System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   在 System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   在 System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   在 System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   在 System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   在 System.Windows.Input.InputManager.ProcessStagingArea()
   在 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   在 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   在 System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   在 System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
shrimp liao的主页 shrimp liao | 初学一级 | 园豆:135
提问于:2013-09-26 14:33
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册