NotFound!!!!--silverlight

stoneboys 2010-04-09 10:03:46
我写了一个小例子,在vs里面运行可以,但是在IIS里面却不行,总是出现以下的错误:都找了两天了。。。

Microsoft JScript 运行时错误: Unhandled Error in Silverlight 2 Application 远程服务器返回了错误: NotFound。 位于 System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
位于 System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
位于 XYGame.Share.HttpHelper.BeginResponse(IAsyncResult ar)
位于 System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
位于 System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
位于 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
位于 System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
位于 System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
...全文
216 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jv9 2010-04-11
  • 打赏
  • 举报
回复
1楼说的不错,很多错误可能会返回这个错误信息。我总结过以前项目中遇到过的相关问题,你可以参考一下。


Silverlight + WCF错误“The remote server returned an error: NotFound.”的解决方法

http://www.cnblogs.com/jv9/archive/2009/10/08/1578951.html
pojianbing 2010-04-10
  • 打赏
  • 举报
回复
在IIS发布silverlight要注意以下两点:

1. 配置MIME
xaml.xaml xaml+xml
.xap x-silverlight-app

2. 解决垮域访问

将跨域文件放在IIS根目录(一定要根目录 ,不是silverlight的部署目录)

crossdomain.xml

<?xml version="1.0" encoding="utf-8" ?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

pojianbing 2010-04-10
  • 打赏
  • 举报
回复
在IIS发布silverlight要注意以下两点:

1. 配置MIME
xaml.xaml xaml+xml
.xap x-silverlight-app

2. 解决垮域访问

将跨域文件放在IIS根目录(一定要根目录 ,不是silverlight的部署目录)

crossdomain.xml


stoneboys 2010-04-09
  • 打赏
  • 举报
回复
是访问数据的时候出错
xingjunli 2010-04-09
  • 打赏
  • 举报
回复
是silverlight不能现实,还是访问数据时出错??
websco 2010-04-09
  • 打赏
  • 举报
回复
把你发布在IIS上的Web.config发出来。
出现NotFound有几种可能:
1. 真的是NotFound,即所请求的地址不存在,或者服务未启动;
2. 服务端拒绝,如Silverlight端发送的数据量超过服务端所配置的允许接收的最大值;
3. 垮域访问(好像在错误中还会提示“垮域”字眼)?
The Windows Presentation Foundation (WPF) is Microsoft’s latest development platform for building next-generation Windows client applications. Silverlight, a subset of WPF, extends the platform to the web via the add-on mechanism available in most current browsers. As a subset of WPF, the ability to create rich Internet applications is unprecedented; however, there are some significant differences between the capabilities of Silverlight and WPF, as well as important differences in the programming features of the two technologies. There are several architectural reasons for the discrepancies between WPF and Silverlight. First and foremost is that Silverlight 2 is a downloadable plug-in running within a browser. In order to insure that the plug-in is a small as possible, Microsoft built a smaller version of the .Net Framework, one that is highly optimized for size and is a small subset of the full .NET Framework, to embed within it. WPF, on the other hand, has full access to the main .Net Framework and all its associated assemblies. The difference between the smaller, downloadable .Net Framework and the full desktop version is one of the major disparities between the two platforms. In addition, the fact that Silverlight is rooted within the browser, and inherits the limitations of that environment, further differentiates the two platforms. This whitepaper documents both the identical (or nearly so) functionality as well as the differences. WPF and Silverlight have many technological concepts in common: Dependency Properties, Data Binding, Custom Controls and Animation to name a few. In addition, this paper documents functionality implementations that may be available in only one technology or the other. For example, WPF implements a large library of controls for document handling, including printing and formatting large documents. Finally, this whitepaper outlines some strategies in obtaining code reuse across both technologies. Due to minor differences in implementations of common elements, developers need to carefully plan their development in order to reuse code in both platforms. Of course, since certain functionality may not exist in one platform, developers may need to reduce the scope of the application in those cases. One last note about this whitepaper: where appropriate, some information about the future version of Silverlight 3 has been provided. Please note that Silverlight 3 is currently in beta and any information may be subject to change. In addition, more Silverlight 3 information can be found at www.silverlight.net

8,741

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧