开发者

Relative path in Silverlight

I'm trying to use a relative pa开发者_如何学Cth to consume a Web Service from Silverlight but I have to use the full Path of the service (this service is working in the same web that has the xap file) and I want to use a relative path to make it work both in local and server.

This is working in a older version of the same Project so I think I've changed something in my project settings...

Any idea?

Thanks in advance!

Example Code I'm using:

<telerik:ReportViewer x:Name="Reportviewer1"
                               ReportServiceUri="http://localhost:11951/ReportService.svc"

I want this to work like this:

<telerik:ReportViewer x:Name="Reportviewer1"
                               ReportServiceUri="./ReportService.svc"


Finally I found the problem.

If you start your silverlight project from the asp.net project that contains it, relative paths work fine, but if you start the project with the silverlight project you can't use relative paths...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜