2012-03-26 85 views
0

我在现有的mvc视图中托管Silverlight应用程序。我得到臭名昭着的从Silverlight调用时发生域服务错误

"remote server returned an error-> notfound"

当我尝试访问mvc应用程序中定义的域服务。
在拉琴,我得到这个错误:

The IControllerFactory 'DrcMvcWeb.Infrastructure.DrcControllerFactory' did not return a controller for the name 'ClientBin'.

我需要映射到域名服务呼叫的路由?这是我第一次使用Silverlight和RIA服务,迄今为止的体验并不好。

回答

0

它看起来像是在服务的路径中包含ClientBin文件夹(您的SL应用程序所在的位置)。您应该能够使用相对路径(从该点)沿着树走到实际的服务位置。例如:

string urlPath = new Uri(Application.Current.Host.Source, "../Services/MyService").AbsoluteUri; 
相关问题