继续运行“指定的值具有无效的HTTP标头字符。参数名称:name"收到原始通知(MPN)的HttpNotificationReceived回调时出错 [英] Keep running into "Specified value has invalid HTTP Header characters. Parameter name: name" Error when recieving HttpNotificationReceived callback for raw notifications (MPN)

查看:1276
本文介绍了继续运行“指定的值具有无效的HTTP标头字符。参数名称:name"收到原始通知(MPN)的HttpNotificationReceived回调时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继续遇到"指定的值包含无效的HTTP标头字符。参数名称:name"收到原始通知(MPN)的HttpNotificationReceived回调时出错。


回调发生,但失败并显示以下堆栈跟踪:


> System.Net.dll!System.Net.ValidationHelper.CheckBadWebHeaderChars(string name,bool isHeaderValue)+ 0x166 bytes


  System.Net.dll!System.Net.WebHeaderCollection.this [string] .set(字符串名称,字符串值)


  Microsoft.Phone.dll!Microsoft.Phone.Notification.HttpNotificationChannel.OnNotificationReceived(System.IntPtr blob1,uint blobSize1,System.IntPtr blob2,uint blobSize2)+ 0xd2 bytes


  Microsoft.Phone.dll!Microsoft.Phone.Notification.HttpNotificationChannel.ChannelHandler(uint eventType,System.I ntPtr blob1,uint int1,System.IntPtr blob2,uint int2)+ 0x10 bytes


  Microsoft.Phone.dll!Microsoft.Phone.Notification.HttpNotificationChannel.Dispatch(object threadContext)+ 0x74 bytes


  mscorlib.dll!System.Threading.ThreadPool.WorkItem.WaitCallback_Context(object state)+ 0x18 bytes


  mscorlib.dll !System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext,System.Threading.ContextCallback callback,object state)+ 0x63 bytes


  mscorlib.dll!System.Threading.ThreadPool.WorkItem.doWork(object o)+ 0x47 bytes


  mscorlib.dll!System.Threading.Timer.ring()+ 0x70 bytes


 

解决方案

这是推送通知发生此错误的第一个报告,我可以找到...


以前是否正常工作,最近才出现问题?


您使用的所有网络连接类型是否都会出现问题? 

  (例如:DTPT,WiFi,移动电话)


如果只有DTPT或WiFi ......您是否有任何代理或网关可以添加或更改标题?


FWIW:
$
如果标题名称包含空格,制表符,回车符,换行符或以下字符之一,则抛出异常:()<> @ ,;: \"?'/ [] = {}


I Keep running into "Specified value has invalid HTTP Header characters. Parameter name: name" Error when recieving HttpNotificationReceived callback for raw notifications (MPN).

The call back occurs, but fails with the following stack trace:

> System.Net.dll!System.Net.ValidationHelper.CheckBadWebHeaderChars(string name, bool isHeaderValue) + 0x166 bytes
  System.Net.dll!System.Net.WebHeaderCollection.this[string].set(string name, string value)
  Microsoft.Phone.dll!Microsoft.Phone.Notification.HttpNotificationChannel.OnNotificationReceived(System.IntPtr blob1, uint blobSize1, System.IntPtr blob2, uint blobSize2) + 0xd2 bytes
  Microsoft.Phone.dll!Microsoft.Phone.Notification.HttpNotificationChannel.ChannelHandler(uint eventType, System.IntPtr blob1, uint int1, System.IntPtr blob2, uint int2) + 0x10 bytes
  Microsoft.Phone.dll!Microsoft.Phone.Notification.HttpNotificationChannel.Dispatch(object threadContext) + 0x74 bytes
  mscorlib.dll!System.Threading.ThreadPool.WorkItem.WaitCallback_Context(object state) + 0x18 bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x63 bytes
  mscorlib.dll!System.Threading.ThreadPool.WorkItem.doWork(object o) + 0x47 bytes
  mscorlib.dll!System.Threading.Timer.ring() + 0x70 bytes
 

解决方案

This is the first report of this error happening with Push notifications, that I can find...

Was this working previously and the problem just recently start happening?

Does the problem occur on all network connection types you use? 
  (ex: DTPT, WiFi, Cellular)

If only DTPT or WiFi... do you have any proxy or gateway that could be adding or altering headers?

FWIW:
The exception is thrown if a header name contains a space, tab, carriage return, linefeed, or one of the following characters: ()<>@,;:\"'/[]?={}


这篇关于继续运行“指定的值具有无效的HTTP标头字符。参数名称:name&quot;收到原始通知(MPN)的HttpNotificationReceived回调时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆