凡事从积极的态度做起
记述技术(Web/BI/biztalk infopath/sharepoint)、人、事

BlogEngine.NET 1.3.1.0中的搜索的小Bug的修正方法

星期五, 13 六月 2008 11:24 by cleo

 

BlogEngine.NET 1.3.1.0版本在安装完之后,如果在搜索框中搜索内容,会出现如下错误:

“/”应用程序中的服务器错误。
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。

编译器错误信息: CS1010: 常量中有换行符

源错误:

行 183:      text = StripHtml(content);
行 184:            if (text.Length > 200)
行 185:                text = text.Substring(0, 200) + "?;
行 186:            text = "? + text.Trim() + "?;
行 187:    }

源文件: 。。。\search.aspx.cs    行: 185

解决办法:

在根目录找到文件search.aspx.cs ,找到185行,将代码修改成如下:

行 183:      text = StripHtml(content);
行 184:            if (text.Length > 200)
行 185:                text = text.Substring(0, 200) + "?";
行 186:            text = "?" + text.Trim() + "?";
行 187:    }

即可成功搜索。

第一个打分

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   BlogEngine.NET
Actions:   E-mail | del.icio.us | Permalink | 评论 (2) | 阅读 (50) | Comment RSSRSS comment feed

评论

添加评论


(将显示你的Gravatar图标)  

  Country flag

biuquote
  • 评论
  • 在线预览
Loading



 
酷站目录