Oops....Default.aspx page

Topics: ASP.NET 2.0, Business Logic Layer
Oct 23, 2010 at 11:55 AM

My blog www.devaski.com was normal.
There were no posts done recently, but since few days the home page giving the following error

 

Ooops! An unexpected error has occurred.

This one's down to me! Please accept my apologies for this - I'll see to it that the developer responsible for this happening is given 20 lashes (but only after he or she has fixed this problem).

I cannot understand, is it a database server error, or someone hacked the coding of the site? Hosting support working on solving the issues......

Any experience and immediate solutions.

Coordinator
Oct 23, 2010 at 4:38 PM

I noticed the Login page comes up.  If you are able to login, then try going back to the homepage and see if the error still occurs.  Its designed where when you see that error message you're getting, if you're logged in then it will output error details below the message.

If you're unable to login, you could temporarily modify the error.aspx.cs file in the root of the blog.  In there is this line of code:

if (Page.User.IsInRole(BlogSettings.Instance.AdministratorRole) && HttpContext.Current.Items.Contains(contextItemKey))
If you change that to the following, then anyone (logged in or not) will be able to see the error details.

if (HttpContext.Current.Items.Contains(contextItemKey))
Seeing the error details will hopefully give us an idea of what is causing the problem.

Oct 23, 2010 at 6:13 PM
On 23/10/10 10:08 PM, BenAmada wrote:
if (HttpContext.Current.Items.Contains(contextItemKey))
Thanks for the help.

here is the report.
Actually I had a space disk issue, I sorted it out...however error remains the same.

With Warm Regards
Devarajan G

Ooops! An unexpected error has occurred.

This one's down to me! Please accept my apologies for this - I'll see to it that the developer responsible for this happening is given 20 lashes (but only after he or she has fixed this problem).

Error Details:

Url : http://devaski.com/login.aspx

Raw Url : /login.aspx

Message : The state information is invalid for this page and might be corrupted.

Source : System.Web

StackTrace : at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)

at System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState)

at System.Web.UI.HiddenFieldPageStatePersister.Load()

at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()

at System.Web.UI.Page.LoadAllState()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest()

at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at ASP.login_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\cba3ff1a\7e65c26e\App_Web_s6rxe0ib.10.cs:line 0

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

TargetSite : Void ThrowError(System.Exception, System.String, System.String, Boolean)

Message : Invalid viewstate.

Client IP: 59.92.81.77

Port: 49369

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11

ViewState: /wEPDwUKMTg0Njc5MTQ2MmQYAgUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgQFH2N0bDAwJGNwaEJvZHkkTG9naW4xJFJlbWVtYmVyTWUFJWN0bDAwJGNwaEJvZHkkTG9naW4xJExvZ2luSW1hZ2VCdXR0b24FGGN0bDAwJExvZ2luU3RhdHVzMSRjdGwwMQUYY3RsMDAkTG9naW5TdGF0dXMxJGN0bDAzBR1jdGwwMCRjcGhCb2R5JGNoYW5nZXBhc3N3b3JkMQ8QZGZkZA==,/wEPDwUKLTE2MDM2NDU0M2QYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgIFGGN0bDAwJExvZ2luU3RhdHVzMSRjdGwwMQUYY3RsMDAkTG9naW5TdGF0dXMxJGN0bDAz

Referer: http://devaski.com/login.aspx

Path: /login.aspx

Source :

StackTrace :

TargetSite :

Message : Invalid character in a Base-64 string.

Source : mscorlib

StackTrace : at System.Convert.FromBase64String(String s)

at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)

at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)

at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)

at System.Web.UI.HiddenFieldPageStatePersister.Load()

TargetSite : Byte[] FromBase64String(System.String)


-- 
Devaski
M: +91 9884487089
Coordinator
Oct 23, 2010 at 6:18 PM

That's helpful -- there are some error details in there.  I don't remember seeing this error message before, and it looks as though it's more of a general ASP.NET issue.

Fortunately, there's some helpful looking results that come up when Googling the error message.  I would suggest checking some of these results out and try implementing some of the suggestions.

The state information is invalid for this page and might be corrupted. Invalid character in a Base-64 string

Oct 23, 2010 at 7:00 PM
I have followed tried the web.config options like viewstate and pagelength.. Issue remain the same.

I suspecting Firewall, Hosting company yet revert about their report..I will wait..
Thanks a lot for the help.

With Warm Regards
Devarajan G

2010/10/23 BenAmada <notifications@codeplex.com>

From: BenAmada

That's helpful -- there are some error details in there. I don't remember seeing this error message before, and it looks as though it's more of a general ASP.NET issue.

Fortunately, there's some helpful looking results that come up when Googling the error message. I would suggest checking some of these results out and try implementing some of the suggestions.

The state information is invalid for this page and might be corrupted. Invalid character in a Base-64 string

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089

Oct 27, 2010 at 3:56 PM
Hello,

Hosting company is not able to solve the issue even after 72 hours.
I have tried testing with the previous version which was in Backup.

I presume, the error is the Windows Server and ASP.NET settings and files.
Is there any obvious solution from BlogEngine settings which can solve this error.

Just a follow up email....

Thanks and Regards
Devarajan G
www.devaski.com


2010/10/24 devarajan.g <devarajan@gmail.com>
I have followed tried the web.config options like viewstate and pagelength.. Issue remain the same.

I suspecting Firewall, Hosting company yet revert about their report..I will wait..
Thanks a lot for the help.


With Warm Regards
Devarajan G

2010/10/23 BenAmada <notifications@codeplex.com>

From: BenAmada

That's helpful -- there are some error details in there. I don't remember seeing this error message before, and it looks as though it's more of a general ASP.NET issue.

Fortunately, there's some helpful looking results that come up when Googling the error message. I would suggest checking some of these results out and try implementing some of the suggestions.

The state information is invalid for this page and might be corrupted. Invalid character in a Base-64 string

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089




--
Devarajan.G
Hand Phone : +91 9884487089

Coordinator
Oct 27, 2010 at 4:48 PM

Did you try this particular one with "viewStateEncryptionMode" ?

viewStateEncryptionMode
http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/

It's a little strange, because ViewState is something that is processed when a POST occurs, i.e. when you are submitting to the server.  In this case, this error occurs when pulling up your homepage (a GET).  Normally ViewState isn't processed in this case since nothing is being posted to the server.

Are you using an unmodified version of BE?  If you've modified it in anyway, I would try reverting back to the original version of BE.  Do you have any custom extensions or widgets, or anything custom for that matter?  I'm wondering if some custom piece of code is trying to retrieve remote content, or do something like that and failing while doing that.

Oct 27, 2010 at 6:03 PM
replies below
thanks

2010/10/27 BenAmada <notifications@codeplex.com>

From: BenAmada

Did you try this particular one with "viewStateEncryptionMode" ?

Yes I did to "never"....it was not helpful.

viewStateEncryptionMode
http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/

It's a little strange, because ViewState is something that is processed when a POST occurs, i.e. when you are submitting to the server. In this case, this error occurs when pulling up your homepage (a GET). Normally ViewState isn't processed in this case since nothing is being posted to the server.

Are you using an unmodified version of BE? If you've modified it in anyway, I would try reverting back to the original version of BE. Do you have any custom extensions or widgets, or anything custom for that matter? I'm wondering if some custom piece of code is trying to retrieve remote content, or do something like that and failing while doing that.

Yes, I am just using web release unmodified except theme change.
CoComments, I have Google Analytic & Flag counter Java scripts ..

I did check the previous version 1.4 which was in my backup as application root at web server. That one also giving same error. So I conclude it as security updates of ASP.NET dll might be giving problems.

Now, I am trying to upload new release 1.6.1 and check as root app at devaski.com



Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089

Oct 27, 2010 at 6:23 PM
http://devaski.com/BE161/
can you check the latest one it works fine..any comments?

2010/10/27 devarajan.g <devarajan@gmail.com>
replies below
thanks

2010/10/27 BenAmada <notifications@codeplex.com>

From: BenAmada

Did you try this particular one with "viewStateEncryptionMode" ?

Yes I did to "never"....it was not helpful.

viewStateEncryptionMode
http://delroger.wordpress.com/2008/08/19/invalid-character-in-a-base-64-string-aspnet/

It's a little strange, because ViewState is something that is processed when a POST occurs, i.e. when you are submitting to the server. In this case, this error occurs when pulling up your homepage (a GET). Normally ViewState isn't processed in this case since nothing is being posted to the server.

Are you using an unmodified version of BE? If you've modified it in anyway, I would try reverting back to the original version of BE. Do you have any custom extensions or widgets, or anything custom for that matter? I'm wondering if some custom piece of code is trying to retrieve remote content, or do something like that and failing while doing that.

Yes, I am just using web release unmodified except theme change.
CoComments, I have Google Analytic & Flag counter Java scripts ..

I did check the previous version 1.4 which was in my backup as application root at web server. That one also giving same error. So I conclude it as security updates of ASP.NET dll might be giving problems.

Now, I am trying to upload new release 1.6.1 and check as root app at devaski.com



Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089




--
Devarajan.G
Hand Phone : +91 9884487089

Coordinator
Oct 27, 2010 at 6:59 PM

The new one ( http://devaski.com/BE161/ ) seems to be working.  There was one initial error which might be related to not having Write permissions on the App_Data folder, but after that, it's coming up without the ViewState errors you're getting on your main site.

You could try replacing the blog on your main site with this one (1.6.1).  Make a backup first of your current blog before replacing (just in case).

I think your theme is not causing the problem.  I say this because on your main site, if I try changing the theme via http://devaski.com/?theme=Standard (to force the Standard theme), the error still appears.

Oct 27, 2010 at 7:03 PM
Thanks Ben,

I think..I need to break my head..moving here and there..and restoring back to the site...

As such I was able login to BE161 and could access the settings of main site...I predict comments where the spam bug may be lying...
is there way I can delete all comments by offline.?

Regards
Devarajan G

On 28/10/10 12:29 AM, BenAmada wrote:

From: BenAmada

The new one ( http://devaski.com/BE161/ ) seems to be working. There was one initial error which might be related to not having Write permissions on the App_Data folder, but after that, it's coming up without the ViewState errors you're getting on your main site.

You could try replacing the blog on your main site with this one (1.6.1). Make a backup first of your current blog before replacing (just in case).

I think your theme is not causing the problem. I say this because on your main site, if I try changing the theme via http://devaski.com/?theme=Standard (to force the Standard theme), the error still appears.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com



-- 
Devaski
M: +91 9884487089
Coordinator
Oct 27, 2010 at 7:09 PM

The comments would be stored in each of the XML files in the App_Data\Posts folder.  You could go into each XML file and delete the comments.  Then restart the blog by making any change to the web.config file (add a space, etc).  Because posts & comments are cached in memory, if you don't restart the blog, then any manual changes you may have made to the XML files won't be detected.

Having said that, I'm not sure how a bad comment would cause this ViewState error you've had.

Oct 27, 2010 at 7:19 PM
i am taking backup......first..then i will think. how to find a solution.

thanks anyway for the kind help
with warm regards
devarajan g

2010/10/28 BenAmada <notifications@codeplex.com>

From: BenAmada

The comments would be stored in each of the XML files in the App_Data\Posts folder. You could go into each XML file and delete the comments. Then restart the blog by making any change to the web.config file (add a space, etc). Because posts & comments are cached in memory, if you don't restart the blog, then any manual changes you may have made to the XML files won't be detected.

Having said that, I'm not sure how a bad comment would cause this ViewState error you've had.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089

Oct 27, 2010 at 7:22 PM

Access to the path 'D:\Webs\acedot0001\BE161\App_Data\datastore\extensions\AkismetFilter.xml' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\Webs\acedot0001\BE161\App_Data\datastore\extensions\AkismetFilter.xml' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.


Sir, do you get any smoke from the above error.....?

2010/10/28 devarajan.g <devarajan@gmail.com>
i am taking backup......first..then i will think. how to find a solution.

thanks anyway for the kind help
with warm regards
devarajan g

2010/10/28 BenAmada <notifications@codeplex.com>

From: BenAmada

The comments would be stored in each of the XML files in the App_Data\Posts folder. You could go into each XML file and delete the comments. Then restart the blog by making any change to the web.config file (add a space, etc). Because posts & comments are cached in memory, if you don't restart the blog, then any manual changes you may have made to the XML files won't be detected.

Having said that, I'm not sure how a bad comment would cause this ViewState error you've had.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089




--
Devarajan.G
Hand Phone : +91 9884487089

Oct 27, 2010 at 7:30 PM
AkismetFilter....

2010/10/28 devarajan.g <devarajan@gmail.com>

Access to the path 'D:\Webs\acedot0001\BE161\App_Data\datastore\extensions\AkismetFilter.xml' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\Webs\acedot0001\BE161\App_Data\datastore\extensions\AkismetFilter.xml' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.


Sir, do you get any smoke from the above error.....?

2010/10/28 devarajan.g <devarajan@gmail.com>

i am taking backup......first..then i will think. how to find a solution.

thanks anyway for the kind help
with warm regards
devarajan g

2010/10/28 BenAmada <notifications@codeplex.com>

From: BenAmada

The comments would be stored in each of the XML files in the App_Data\Posts folder. You could go into each XML file and delete the comments. Then restart the blog by making any change to the web.config file (add a space, etc). Because posts & comments are cached in memory, if you don't restart the blog, then any manual changes you may have made to the XML files won't be detected.

Having said that, I'm not sure how a bad comment would cause this ViewState error you've had.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Devarajan.G
Hand Phone : +91 9884487089




--
Devarajan.G
Hand Phone : +91 9884487089




--
Devarajan.G
Hand Phone : +91 9884487089

Coordinator
Oct 27, 2010 at 8:42 PM

I saw that error too when I first pulled up your blog at /BE161.

I would double check that Write permissions are enabled on the App_Data folder.  That's the typical reason for this error.

You may have write permissions on for the main App_Data folder, but if you're running this out of the BE161 folder, you would want to make sure the be161\App_Data folder also has Write permissions enabled.

Oct 28, 2010 at 5:37 AM

- copied 1.6.1
- Replaced Theme folder
- Replace App_Data > Was giving same error > Deleted all posts > Pasted few by few > Deleted Comments post by post.

I suspect..some smart spam comments which holding or...number of comments in a single post was giving an issue!

- The site is functional now..


THANKS BEN for the MORAL support.

-----------------
With Best Regards
Devarajan G
www.devaski.com - my blog
M: +91 9884487089

"Whatever you do, do well, and may success attend your efforts"


BenAmada wrote:

From: BenAmada

I saw that error too when I first pulled up your blog at /BE161.

I would double check that Write permissions are enabled on the App_Data folder. That's the typical reason for this error.

You may have write permissions on for the main App_Data folder, but if you're running this out of the BE161 folder, you would want to make sure the be161\App_Data folder also has Write permissions enabled.

Read the full discussion online.

To add a post to this discussion, reply to this email (blogengine@discussions.codeplex.com)

To start a new discussion for this project, email blogengine@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

May 8, 2014 at 2:26 PM
Dear Ben
Greetings!

Hope you are doing good.

I need a help on my blog.

below is the error. and i have tried help on this page https://blogengine.codeplex.com/discussions/262643 ..however the issue is remaining when a post is clicked.


Do suggest.
Warm Wishes
Devarajan G

Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   App_Code.Controls.RecaptchaControl.OnInit(EventArgs e) in c:\rtur\src\Codeplex\Wap\BlogEngine\BlogEngine.Web\AppCode\Extensions\Recaptcha\RecaptchaControl.cs:488
   System.Web.UI.Control.InitRecursive(Control namingContainer) +140
   System.Web.UI.Control.InitRecursive(Control namingContainer) +311
   System.Web.UI.Control.InitRecursive(Control namingContainer) +311
   System.Web.UI.Control.InitRecursive(Control namingContainer) +311
   System.Web.UI.Control.InitRecursive(Control namingContainer) +311
   System.Web.UI.Control.InitRecursive(Control namingContainer) +311
   System.Web.UI.Control.InitRecursive(Control namingContainer) +311
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480