Ooops! I can't find the page you're looking for

Aug 26, 2009 at 4:05 AM
Edited Aug 26, 2009 at 4:10 AM

I just setup my site and anytime I save as setting I get the following:

Ooops! I can't find the page you're looking for

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

This is in the address: http://www.mydomain.com/blog/error404.aspx?aspxerrorpath=/blog/admin/Pages/Settings.aspx

Not really sure why this is happening.  You help would be greatly apperciated.  I followed the install instructions:

Removed the read only flag on the root of my blog folder

Added the permission for IIS6.0 for asp.net user full permission for the AppData folder

Created the Application for the blog folder and made sure it was running .NET 2.0 I also made sure that i was running my .net 2.0 App Pool in IIS.

When I look at the properties of the AppData folder I see a greyed out check box.  If i remove it, it comes back.  I am able to change somethings just not other.  But I still get this message.

Regards,

Tucker

Coordinator
Aug 26, 2009 at 4:13 AM

In your web.config file, change the <customErrors> tag to the following which will result in you seeing the actual error message rather than being redirected to the generic error404.aspx page:

<customErrors mode="Off">

Jan 30, 2010 at 8:39 PM

Ben,

Thank you for the info. I have turned custom errors off, and now this is what I get when I go to my site. I refresh the page and it works.

Any ideas?

 

Server Error in '/' Application.

Access to the path 'D:\timmathews.com\www\App_Data\datastore\extensions\BBCode.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:\timmathews.com\www\App_Data\datastore\extensions\BBCode.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.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[UnauthorizedAccessException: Access to the path 'D:\timmathews.com\www\App_Data\datastore\extensions\BBCode.xml' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7714255
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +65
   System.IO.StreamWriter.CreateFile(String path, Boolean append) +62
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +58
   System.IO.StreamWriter..ctor(String path) +30
   BlogEngine.Core.Providers.XmlBlogProvider.SaveToDataStore(ExtensionType exType, String exId, Object settings) +183
   BlogEngine.Core.Providers.BlogService.SaveToDataStore(ExtensionType exType, String exId, Object settings) +33
   BlogEngine.Core.DataStore.ExtensionSettingsBehavior.SaveSettings(ExtensionType exType, String exId, Object settings) +48
   BlogEngine.Core.DataStore.SettingsBase.SaveSettings(Object settings) +23
   ExtensionManager.SaveToStorage() +104
   ExtensionManager.SetAdminPage(String extension, String url) +114
   seopack..ctor() +990

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
   ASP.global_asax.Application_Start(Object sender, EventArgs e) +630



Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

<!-- [UnauthorizedAccessException]: Access to the path 'D:\timmathews.com\www\App_Data\datastore\extensions\BBCode.xml' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path) at BlogEngine.Core.Providers.XmlBlogProvider.SaveToDataStore(ExtensionType exType, String exId, Object settings) at BlogEngine.Core.Providers.BlogService.SaveToDataStore(ExtensionType exType, String exId, Object settings) at BlogEngine.Core.DataStore.ExtensionSettingsBehavior.SaveSettings(ExtensionType exType, String exId, Object settings) at BlogEngine.Core.DataStore.SettingsBase.SaveSettings(Object settings) at ExtensionManager.SaveToStorage() at ExtensionManager.SetAdminPage(String extension, String url) at seopack..ctor() [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at ASP.global_asax.Application_Start(Object sender, EventArgs e) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
Coordinator
Jan 30, 2010 at 8:51 PM

I would make sure that Write permissions are setup for the ASPNET user on the App_Data folder.

BE needs to be able to save data to the App_Data folder.

It's usually the ASPNET or Network Service account that needs these permissions.

Coordinator
Jan 30, 2010 at 9:03 PM

It looks like you're running BE 1.5.  Did you upgrade from BE 1.4.5?  There was a problem in 1.4.5 that was fixed in 1.5 -- so just thinking if you did upgrade to 1.5 but maybe didn't upgrade all the files, that could be an issue.

The problem in BE 1.4.5 that was fixed before 1.5 was released is described here.

Jan 30, 2010 at 9:05 PM

I am using  BlogEngine.NET 1.5.0.7, I did not upgrade and I have given the aspnet account full control on the folder App_Data and all contents and subfolders.

Any other thoughts?

Jan 30, 2010 at 9:14 PM

I have no problem removing the site, deleting it entirely and starting over. I just don't want to lose my data. Would you recommend that?

Coordinator
Jan 30, 2010 at 9:14 PM

I remember seeing either this problem or another related problem which was because of a conflict in Extensions.  In particular, I think the person was using the SEOPack extension.  But it may not be just that extension.  Are you using any Extensions that don't come with BE?  I don't know how reproducible this problem is, but I would maybe try disabling those other extensions to see if this eliminates the error.

You might find some helpful information too searching the Discussions here for "bbcode".

Jan 30, 2010 at 9:24 PM

I do have the SEO pack extension, but I wasn't using it. I have it installed and I just disabled it. Still an issue. Does that mean you are giving up on me?

Coordinator
Jan 30, 2010 at 9:30 PM

After disabling the SEO Pack extension, are you still getting this error?

If you're still getting the error, and you have other extensions that don't come with BE, I would try disabling those too.

I have a strong feeling it's a conflict in the extensions that is causing this error.

Jan 30, 2010 at 9:40 PM

I am diabling all extensions that do not come with be. I am even deleting them after I disable them.

I am not feeling comfortable with my blog at this time. I love be, and I want to continue to use it. 

Can you tell me how to back up my posts and images and I will just delete it and reinstall it?

 I won't add any 3rd arty extensions this time.

Sound like a plan?

Coordinator
Jan 30, 2010 at 9:44 PM

If disabling these 'custom' extensions eliminates the error, then I don't think a re-installation is necessary.

If you want to re-install, you can of course.

The first thing to do is make a backup of everything.  If you're using the default XML storage, all your data is stored in the App_Data folder (if you're not using a DB).  The Posts are in App_Data\Posts and the images are in App_Data\files

After re-installing, I would just overwrite the App_Data folder with your backed up version of App_Data.

But again, if there are no more errors after disabling the extensions, I don't think you'll gain much by doing a re-installation.

Jan 30, 2010 at 9:53 PM

The errors are still there. I will give you a login, it is your name just as it is written in your post. That is your login and pass. I just tried to do that and this is what i got...

Man, this is doing my head in. Any thoughts? I have the site in debug mode. I have ASP.NET Machine Account (ILLDEVSERVER\ASPNET) full permissions on the directory App_Data.

What else can I do?

 

Server Error in '/' Application.

Access to the path 'D:\timmathews.com\www\App_Data\users.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:\timmathews.com\www\App_Data\users.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.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

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:

[UnauthorizedAccessException: Access to the path 'D:\timmathews.com\www\App_Data\users.xml' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7714255
   System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +66
   System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) +37
   System.Xml.XmlDocument.Save(String filename) +77
   BlogEngine.Core.Providers.XmlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +431
   System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +318
   System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +102
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +418
   System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +161
   System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

<!-- [UnauthorizedAccessException]: Access to the path 'D:\timmathews.com\www\App_Data\users.xml' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) at System.Xml.XmlDocument.Save(String filename) at BlogEngine.Core.Providers.XmlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) 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.admin_pages_users_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
Coordinator
Jan 30, 2010 at 10:03 PM
Edited Jan 30, 2010 at 10:03 PM

I tried logging in using my name as it is here (no spaces).  I used it for both the Username and Password, but couldn't login.

Based on this latest error where it couldn't write to the users.xml file, I'm guessing when you tried to add me, it didn't work.  You can check the users.xml file in the App_Data directory.  Probably my name isn't in there.  You can also check the timestamp of the users.xml file to see if it gets updated.

What about the Settings.xml file in the App_Data folder.  Try saving a change on the Settings tab in the control panel, and then see if the timestamp of the Settings.xml file gets updated.

Also, if you're on Windows Server 2003, which it looks like you are, the account to give permissions to may actually be the Network Service account, and not the ASPNET account.

I would give the Network Service account full permissions to the App_Data folder.

Coordinator
Jan 30, 2010 at 10:06 PM

Here's a way to verify what account your blog application is running under.  Create a new page named anything (e.g. account_check.aspx).  And put this content below inside of it:

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Security.Principal" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            litAccount.Text = WindowsIdentity.GetCurrent().Name;
    }
    
</script>


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>What account is ASP.NET running as ?</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        The account ASP.NET is running as: <asp:Literal ID="litAccount" runat="server"></asp:Literal>
    </div>
    </form>
</body>
</html>

Put this file on your server, and pull up the page in your browser.

Coordinator
Jan 30, 2010 at 10:09 PM

I was able to login with the pwd you sent me (thanks).  The first thing I tried doing was going to the Settings tab and clicked 'Save Settings'.  I immediately got an error about access denied to settings.xml.

I'm 99% sure this is a file permissions issue.

Check my post above for determining what account your blog is running under.  It's probably the Network Service account.  Once you determine it, then give full permissions to that account for the App_Data folder.

Jan 30, 2010 at 10:11 PM

http://www.timmathews.com/tim.aspx

Coordinator
Jan 30, 2010 at 10:12 PM

Cool.  You mentioned above you gave permissions to the ASPNET account.  But it's really the Network Service account that needs the permissions.  This is account tied to the application pool is IIS.

Jan 30, 2010 at 10:20 PM

So, I give permission to the Network Service account and everything seems to work. That is very weird. It worked for the last few days, no problem. I wonder why it started acting goofy.

BenAmada, you are awesome! I appreciate you taking your time to help an old know it all get something fixed.

:) Fricking awesome man, you made my day! Your account works, now, and I will leave it open for you, if you want.

Coordinator
Jan 30, 2010 at 10:22 PM
Edited Jan 30, 2010 at 10:24 PM

Thanks for the good news.  Yes, sort of strange that you were I guess able to create posts and upload images, but having these other issues ... or the issues may have just started.

At any rate, we should appreciate it working now!

P.S.  You can probably remove my account.  I appreciate it though ... but don't want other people logging in under me, and I'm having a hard enough time keeping up with my own blog.

Jan 30, 2010 at 10:27 PM

I meant for you to come in and have a look that it was working. I will kill the account now. Thank you very much once again.