Error on post new blog

Topics: ASP.NET 2.0
Jun 29, 2007 at 7:37 PM
Edited Jun 29, 2007 at 7:40 PM
I just installed BlogEngine 1.0 on my local pc.
And now I can run default.aspx smoothly, but when I try to post a new blog, error occured.(detailed error information as below)
Firefox showed that error occured on line 370(please check below error info)
Even though, I checked that the data of the post was existed on App_Data folder.
And the post also can be showed on main page if I refresh the main page.
Could anybody please let me know what's the problem and how to fix it?

Thanks so much!

Detailed error info:(I'm Chinese)

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

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

源错误:

Line 368: public void RaiseCallbackEvent(string eventArgument)
Line 369: {
Line 370: string[] args = eventArgument.Split('?);
Line 371: string author = args0;
Line 372: string email = args1;


源文件: d:\BlogEngine.NET\BlogEngine\User controls\CommentView.ascx.cs 行: 370


显示详细的编译器输出:

C:\WINDOWS\system32> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\AppCode.drvo0chz.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Web.Mobile\2.0.0.0_b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Drawing\2.0.0.0_b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\assembly\dl3\25504f3e\00ab8f862d9dc701\BlogEngine.Core.DLL" /R:"C:\WINDOWS\assembly\GACMSIL\System.Web.Services\2.0.0.0_b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC32\System.Web\2.0.0.0_b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC32\System.Data\2.0.0.0_b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Xml\2.0.0.0_b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC32\System.EnterpriseServices\2.0.0.0_b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System\2.0.0.0_b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GACMSIL\System.Configuration\2.0.0.0_b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\AppWebz-zvsam.dll" /debug- /optimize+ /win32res:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\z-zvsam.res" /w:4 /nowarn:1659;1699 "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\AppWebz-zvsam.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\AppWebz-zvsam.1.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\blog\66640c04\2112ee2b\AppWebz-_zvsam.2.cs"


Microsoft (R) Visual C# 2005 编译器 版本 8.00.50727.42
用于 Microsoft (R) Windows (R) 2005 Framework 版本 2.0.50727
版权所有 (C) Microsoft Corporation 2001-2005。保留所有权利。

d:\BlogEngine.NET\BlogEngine\User controls\CommentView.ascx.cs(370,41): error CS1010: 常量中有换行符
d:\BlogEngine.NET\BlogEngine\User controls\CommentView.ascx.cs(370,41): error CS1012: 字符文本中的字符太多

版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.210

Jul 2, 2007 at 2:32 PM
This will not help you get rid of the problem, but I am pretty sure the error occur when Blogengine.Net tries to show your new post (after it has been saved to disk). This is why you can see the new post if you refresh the main page. So, you can still make new posts and blog visitors will see it on the main page.

Do you get this error if you click on the post headline (from the main page)? Clicking on the headline should direct the browser to the same page that blog engine shows after you save a new post. Knowing if you always get this error when trying to view a post or if it only happens when you save e new post will help people here to find the problem.

The error info says the error occured in CommentView.ascx.cs. Try making 2 new post, one with comments enabled and one with comments disabled. Do you get the same error in both cases?

Last of all, you can always reinstall BlogEngine.Net and hope that helps...

That is pretty much all the help I can offer.
Jul 5, 2007 at 12:24 PM
Hello Jesfer, thank you very much for your reply.
The problem was sloved,I found answer from a China Blogger's post.
And the problem is caused by following code

function AddComment()
{
// ...
var argument = author + "¤" + email + "¤" + website + "¤" + country + "¤" + content;
// ...
}

because my browser can't recognize the character "¤", so error occured.

and the solution is:

1,Change the original code of "CommentView.cs" as below

public void RaiseCallbackEvent(string eventArgument)
{
string[] args = eventArgument.Split(new string[] { "?/?/?" }, StringSplitOptions.None);
string author = args0;
string email = args1;
string website = args2;
string country = args3;
string content = args4;

// ...
}

2,change the original code of "CommentView.ascx" as below

function AddComment()
{
// ...
var argument = author + "?/?/?" + email + "?/?/?" + website +
"?/?/?" + country + "?/?/?" + content;
// ...
}

I just copied "Zhao's blog post", you can find his post on http://www.cnblogs.com/JeffreyZhao/archive/2007/06/06/BlogEngineEncodingProbleminSource_Code.html
Jul 6, 2007 at 1:57 AM
Hello Jesfer, thank you very much for your reply.
The problem was sloved,I found answer from a China Blogger's post.
And the problem is caused by following code

function AddComment()
{
// ...
var argument = author + "¤" + email + "¤" + website + "¤" + country + "¤" + content;
// ...
}

because my browser can't recognize the character "¤", so error occured.

and the solution is:

1,Change the original code of "CommentView.cs" as below

public void RaiseCallbackEvent(string eventArgument)
{
string[] args = eventArgument.Split(new string[] { "?/?/?" }, StringSplitOptions.None);
string author = args0;
string email = args1;
string website = args2;
string country = args3;
string content = args4;

// ...
}

2,change the original code of "CommentView.ascx" as below

function AddComment()
{
// ...
var argument = author + "?/?/?" + email + "?/?/?" + website +
"?/?/?" + country + "?/?/?" + content;
// ...
}

I just copied "Zhao's blog post", you can find his post on http://www.cnblogs.com/JeffreyZhao/archive/2007/06/06/BlogEngineEncodingProbleminSource_Code.html