当前位置: 代码迷 >> ASP.NET >> Illegal characters in path 异常,请高手指教
  详细解决方案

Illegal characters in path 异常,请高手指教

热度:2831   发布时间:2013-02-25 00:00:00.0
Illegal characters in path 错误,请高手指教
这个错误不经常出现,我用了MS的URL重写组件 "URLRewriter "后出现的.

请问这个网址哪里非法了?       /post/t-2643841

平台是:   asp.net   2.0

下面是错误提示:


Exception   information:  
        Exception   type:   ArgumentException  
        Exception   message:   Illegal   characters   in   path.  
 
Request   information:  
        Request   URL:   http://www.xxx.com/post/t-2643841 "  
        Request   path:   /post/t-2643841 "  
        User   host   address:   xx.xx.xx.xx
        User:    
        Is   authenticated:   False  
        Authentication   Type:    
        Thread   account   name:   NT   AUTHORITY\NETWORK   SERVICE  
 
Thread   information:  
        Thread   ID:   20  
        Thread   account   name:   NT   AUTHORITY\NETWORK   SERVICE  
        Is   impersonating:   False  
        Stack   trace:         at   System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String   siteID,   VirtualPath   path)
      at   System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath2.MapPath(String   siteID,   VirtualPath   vpath)
      at   System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath   virtualPath,   Boolean   permitNull)
      at   System.Web.CachedPathData.GetConfigPathData(String   configPath)
      at   System.Web.CachedPathData.GetVirtualPathData(VirtualPath   virtualPath,   Boolean   permitPathsOutsideApp)
      at   System.Web.HttpContext.GetFilePathData()
      at   System.Web.HttpContext.GetConfigurationPathData()
      at   System.Web.Configuration.HttpCapabilitiesBase.GetBrowserCapabilities(HttpRequest   request)
      at   System.Web.HttpRequest.get_Browser()
      at   System.Web.Mobile.ErrorHandlerModule.RequiresAdaptiveErrorReporting(HttpContext   context,   Exception   error)
      at   System.Web.Mobile.ErrorHandlerModule.Application_Error(Object   source,   EventArgs   e)

------解决方案--------------------------------------------------------
-这个估计是非法字符
------解决方案--------------------------------------------------------
-一般是没有问题的,只不过在正则中也算的上是个关键字.关键还是要跟踪..
  相关解决方案