日期:2014-05-19  浏览次数:20371 次

WCF和WCF的问题
请问一下  
我用WPF的Application程序引用WCF是可以用的  
但是  
我建WPF的XAMLBrowserApplication程序再引用   就报下面的错误  
Cannot   create   instance   of   'Page1 '   defined   in   assembly   'XAMLBrowserApplication1,   Version=1.0.2300.36101,   Culture=neutral,   PublicKeyToken=null '.   Exception   has   been   thrown   by   the   target   of   an   invocation.   Error   in   markup   file   'Page1.xaml '   Line   1   Position   7.

代码很简单
代码   private   void   ButtonClick(object   sender,   RoutedEventArgs   e)  
{  
ATMServices.AccountActivitiesClient   myService   =   new   WPFApplication.ATMServices.AccountActivitiesClient();  
textBox1.Text   =   myService.Returnstring();  

}

------解决方案--------------------
'Page1.xaml ' 这个有问题
------解决方案--------------------
这么高深
------解决方案--------------------
厉害,帮顶
------解决方案--------------------
帮顶
------解决方案--------------------
帮你顶
------解决方案--------------------
路过帮顶
------解决方案--------------------
没有问题的
把你的Page1.xaml贴出来看看
------解决方案--------------------
看看page标签对不对
<Page x:Class= "WPFBrowserApplication1.Page1 "
xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation "
xmlns:x= "http://schemas.microsoft.com/winfx/2006/xaml "
Title= "Page1 ">
------解决方案--------------------
这就WCF了...
------解决方案--------------------
好多天了,没搞定嘛?
可怜我公司电脑还是 Win2K。