Silverlight 3 浏览器之间的不同行为

发布于 2024-08-12 08:44:30 字数 1570 浏览 2 评论 0原文

我有一个正常运行的 silverlight 项目,它只是一个检索一些值的列表框。该项目在 Internet Explorer 中可以正确运行,但在 Safari 4 或 Firefox 3.5 中无法正确运行...... silverlight 在行为方面是否存在一些差异,这些差异可能因浏览器而异?

这是在非 IE 浏览器中发生的错误

拒绝设置不安全标头“Accept-Charset”错误: System.InvalidOperationException:保存时发生错误 变化。有关详细信息,请参阅内部异常。 ---> System.Data.Services.Http.WebException:内部错误 'HttpWebResponse.NormalizeResponseStatus'。

在 System.Data.Services.Http.HttpWebResponse.NormalizeResponseStatus(Int32& 状态代码)

在 System.Data.Services.Http.HttpWebResponse..ctor(HttpWebRequest 请求,Int32 statusCode,字符串responseHeaders)

在 System.Data.Services.Http.HttpWebRequest.CreateResponse()

在 System.Data.Services.Http.HttpWebRequest.EndGetResponse(IAsyncResult 异步结果)

在 System.Data.Services.Client.QueryAsyncResult.AsyncEndGetResponse(IAsyncResult 异步结果)

--- 内部异常堆栈跟踪结束 ---

在 System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject obj, InvokeType invokeType, String memberName, ScriptParam[] args)

在 System.Windows.Browser.ManagedObject.Invoke(InvokeType invokeType、Int32 成员 ID、ScriptParam[] args)

在 System.Windows.Hosting.ScriptingInterface.InvokeScriptableMember(托管对象 obj、InvokeType invokeType、Int32 成员ID、ScriptParam[] args、 脚本参数& p结果)

在 System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr pHandle、Int32 nMemberID、Int32 nInvokeType、Int32 nArgCount、 ScriptParam[] pArgs, ScriptParam& pResult、ExceptionInfo& pExcepInfo)

I have a silverlight project that runs normally, its just a listbox that retrieivies some value. This project run correctly in Internet explorer but do not runs correctly in Safari 4 or Firefox 3.5....
Does silverlight have some difference in terms of behavior that can vary from browser to browser?

Here's the error that happens in the non IE Browsers

Refused to set unsafe header "Accept-Charset" Error:
System.InvalidOperationException: An error occurred while saving
changes. See the inner exception for details. --->
System.Data.Services.Http.WebException: Internal error at
'HttpWebResponse.NormalizeResponseStatus'.

at
System.Data.Services.Http.HttpWebResponse.NormalizeResponseStatus(Int32&
statusCode)

at System.Data.Services.Http.HttpWebResponse..ctor(HttpWebRequest
request, Int32 statusCode, String responseHeaders)

at System.Data.Services.Http.HttpWebRequest.CreateResponse()

at
System.Data.Services.Http.HttpWebRequest.EndGetResponse(IAsyncResult
asyncResult)

at
System.Data.Services.Client.QueryAsyncResult.AsyncEndGetResponse(IAsyncResult
asyncResult)

--- End of inner exception stack trace ---

at System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject
obj, InvokeType invokeType, String memberName, ScriptParam[] args)

at System.Windows.Browser.ManagedObject.Invoke(InvokeType
invokeType, Int32 memberID, ScriptParam[] args)

at
System.Windows.Hosting.ScriptingInterface.InvokeScriptableMember(ManagedObject
obj, InvokeType invokeType, Int32 memberID, ScriptParam[] args,
ScriptParam& pResult)

at System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr
pHandle, Int32 nMemberID, Int32 nInvokeType, Int32 nArgCount,
ScriptParam[] pArgs, ScriptParam& pResult, ExceptionInfo& pExcepInfo)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怪我鬧 2024-08-19 08:44:30

Silverlight 使用主机浏览器提供的 HTTP 堆栈来访问服务器上的数据。因此,不同浏览器的 HTTP 行为方式可能会有所不同。看起来这里可能就是这种情况。

Silverlight uses the HTTP stack provided by the host browser to access data from the server. Hence there can be variations in the way HTTP behaves from one browser to another. This looks like it may be the case here.

江湖彼岸 2024-08-19 08:44:30

除了 Anthony 所写的之外,您还可以从默认使用的浏览器 HTTP 堆栈切换到 Silverlight HTTP 堆栈(在 Silverlight 3 中引入,AFAIR)。

只要我遇到类似的问题并找到解决方案,我就写了 post 通过一些代码示例对此进行了详细说明。

In addition to what Anthony wrote, you can switch from Browser HTTP stack, which is used by default to Silverlight HTTP stack (introduced in Silverlight 3, AFAIR).

As long as I faced similar problem and found a solution, I wrote a post elaborating on this with some code samples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文