This project is read-only.

saving page

Topics: Business Logic Layer
Feb 20, 2012 at 2:14 PM

I am trying to save a new page or update an existing one but for some reason I can't get it to work. I am using blog engine with a sql server DB, in debug mode i can see that the SavePage() method is executing properly and after that it supposed to go into the jquery.js file and form there to the UpdatePage(Page page) method on the DbBlogProvider.cs file. but for some reason the application exits on the jquery.js file without any exception or error message. 

does someone have any idea what supposed to be the issue? or maybe if there is a way to get more information about this issue? i will be more then happy to provide more information if you would point me to the right direction.

by the way, I have tried to debug the app using IE debugger but I didn't get anything new for it.  


Feb 21, 2012 at 7:00 AM

can someone please help? if more data is needed I'll be more then happy to provide it.

Feb 21, 2012 at 1:11 PM


If there's an issue with jquery.js as you say, a good client diagnostic tool would be Firebug for Firefox which should display an error in the console window.  You can also step through javascript with it.  Both Chrome and IE have their counterparts to Firebug, but I find Firebug the best.

Good luck,


Feb 22, 2012 at 6:59 AM

thanks for the advice, I used chrome debugger which is pretty good and I got this result:

  1. POST http://localhost:52457/admin/AjaxHelper.aspx/SavePage 500 (Internal Server Error)
    2. d.extend.ajaxjs.axd:2446
    3. (anonymous function)EditPage.aspx:356

if you can elaborate what I am seeing here it would be great. 

Feb 22, 2012 at 2:45 PM

Try this:

1. In the web.config file, turn off custom errors ( )

2. With chrome opened up to the page where you create pages, hit F12 (this should bring up the debug window)

3. Click on the Network button in the debug window.

4. Click save page (or update page - whatever is causing an error ).

5. In the debug window, there will hopefully be an item with a "Status" code of 500.  Click on that item, and then click on the response tab of that item, and post the info here.

Feb 22, 2012 at 6:07 PM


thanks for the help, here is the response code:

"Message":"Invalid web service call, missing value for parameter: \u0027orderNumber\u0027.","StackTrace":" at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"} 

it says i am missing a parameter named "orderNumber" that's a new parameter I have added myself. that's strange because I saw that this parameter did get a value and I have also made sure the I update the file AjaxHelper.aspx.cs with this new parameter. 

Feb 22, 2012 at 8:27 PM

Not sure what to tell you other than it seems that your service signature / request are off.

You can also use the debug window in Chrome to inspect your request to the server.  Instead of clicking on the "response" tab, click on the "headers" tab and verify that all of the expected data is being sent over to the server.  The error message seems to indicate that you are not passing in any data for "orderNumber". You should be able to verify that by examining the request.

Feb 23, 2012 at 6:32 AM


this is the request from the chrome debug:

{"id":"32d94559-5151-4ac5-9beb-385307258d45","content":"<p><span style=\"font-size: medium;\">זהו דף חדש לדוגמא של הזזת דפים בבלוג</span></p>","title":"דף לדוגמה","description":"","OrderNumber":"0","keywords":"","slug":"דף-לדוגמא","isFrontPage":false,"showInList":true,"isPublished":true,"parent":"-- No parent --"}

it seems that OrderNumber has a value after all, where else can I look to find the issue? 

Feb 23, 2012 at 7:23 AM

"OrderNumber" has a value... however, "orderNumber" does not. 

Try that :)

Feb 23, 2012 at 7:46 AM

thank you!!!

the issue was with the "dto" object, it was set to "OrderNumber" and not "orderNumber".