Image description in Blog Entries - Doesn't display

Topics: ASP.NET 2.0
Nov 21, 2009 at 4:26 PM
Edited Nov 21, 2009 at 4:27 PM

I am running a blog on TheVacationAdvisors.com and everything seems to work except for 2 things:

1. It won't let me add pictures or files to the pages or blog entries. I get the following message:

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).

You can also try to search for the page you were looking for:

2. The contact form on the blog does not work. Although it says that the message was sent, I did not receive the test messages. I am not sure what I am doing wrong. On the other hand, the contact form on TheVacationAdvisors.com/blog says right away that the form does not work but once again I am not sure why.</label>
Can you please help with these issues?
Thank you again.
Coordinator
Nov 22, 2009 at 12:22 AM

I would search the Discussions for answers.  There's at least a couple of dozen messages related to "Ooops! I can't find the page you're looking for".

Ooops! I can't find the page you're looking for
http://blogengine.codeplex.com/Thread/View.aspx?ThreadId=66978

I would search the Discussions for the second issue too.

Nov 22, 2009 at 8:21 AM

I’ve changed as much could and still generate the following message which I don’t know how to fix:

Server Error in '/' Application.


Access to the path 'd:\hosting\joelubina\App_Data\files\2009\11\' 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:\hosting\joelubina\App_Data\files\2009\11\' 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:

Line 103:                 string folder = Server.MapPath(virtualFolder);

Line 104:                 if (!Directory.Exists(folder))

Line 105:                          Directory.CreateDirectory(folder);

Line 106:

Line 107:                 control.PostedFile.SaveAs(folder + fileName);


Source File: d:\hosting\joelubina\admin\Pages\Pages.aspx.cs Line: 105

Stack Trace:

[UnauthorizedAccessException: Access to the path 'd:\hosting\joelubina\App_Data\files\2009\11\' is denied.]

   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7712627

   System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) +7565637

   System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity) +150

   System.IO.Directory.CreateDirectory(String path) +6

   admin_Pages_pages.Upload(String virtualFolder, FileUpload control, String fileName) in d:\hosting\joelubina\admin\Pages\Pages.aspx.cs:105

   admin_Pages_pages.btnUploadImage_Click(Object sender, EventArgs e) in d:\hosting\joelubina\admin\Pages\Pages.aspx.cs:82

   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111

   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110

   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.3053

I’ve changed as much as I could. For the message “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.” When I right click the file in the FTP site, I get the message that the server does not allow changing of permission. When I try to do it on my computer, I can’t add ASP.NET to the permissions. I managed to add EVERYONE and gave them all permissions but still get the same error message. Please help.

From: BenAmada [mailto:notifications@codeplex.com]
Sent: November-22-09 1:24 AM
To: jozef.lubina@rogers.com
Subject: Re: Posting pictures in Blog Entries - Doesn't work [blogengine:75804]

From: BenAmada

I would search the Discussions for answers. There's at least a couple of dozen messages related to "Ooops! I can't find the page you're looking for".

Ooops! I can't find the page you're looking for
http://blogengine.codeplex.com/Thread/View.aspx?ThreadId=66978

I would search the Discussions for the second issue too.

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

Coordinator
Nov 22, 2009 at 10:58 AM

That's a much more helpful message!

BE needs to be able to write to the App_Data folder.  In this case, it needs write permissions in order to save the image/file to disk within the App_Data folder.

So you will want to give Write permissions to the ASPNET user for the entire App_Data folder.  If the site is hosted somewhere, they usually have an option to setup folder permissions.  If you're hosting the site yourself, usually the account to give write permissions to is the Network Service account.

Nov 22, 2009 at 11:30 AM

Thank you very much! The site is hosted with GoDaddy and adding write permission to the folder did the trick. The only issue I now run into is that the image description does not show on the images when I put the cursor on it. It works on the blog http://TheVacationAdvisors.com/blog but does not work in the main TheVacationAdvisors.com site (see example http://thevacationadvisors.com/category/Destination-Malta.aspx). Any suggestions on why this is happening? Thanks a lot for all your help once again!