This project is read-only.

'Profiles' link throwing exception

Topics: ASP.NET 2.0
Oct 5, 2008 at 2:24 PM
I've just upgraded to 1.4.5 from 1.3 and the 'profiles' link in the admin menu is not working. I'm not a developer, but with some direction can usually get it right. The following is the exception being thrown. It appears to me it's looking for a file 'profiles' in the App_Data folder, which there isn't any . I don't use the Profiles option anyway and would be okay with removing it from the menu, but I haven't found the menu generation file (Menu1 ?).  Any help would be appreciated..-Michelle

*****  begin error msg  *****

Server Error in '/BlogEngine' Application.

Could not find a part of the path 'd:\hshome\maduquette\\BlogEngine\App_Data\profiles'.

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.IO.DirectoryNotFoundException: Could not find a part of the path 'd:\hshome\maduquette\\BlogEngine\App_Data\profiles'.

Source Error:

Line 30: 	private void SetProfile(string name)
Line 31: {
Line 32: AuthorProfile pc = AuthorProfile.GetProfile(name);
Line 33: if (pc != null)
Line 34: {

Source File: d:\hshome\maduquette\\BlogEngine\admin\Pages\Profiles.aspx.cs    Line: 32

Stack Trace:

[DirectoryNotFoundException: Could not find a part of the path 'd:\hshome\maduquette\\BlogEngine\App_Data\profiles'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +492
System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +1559
System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) +37
BlogEngine.Core.Providers.XmlBlogProvider.FillProfiles() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Providers\XmlProvider\Profiles.cs:138
BlogEngine.Core.AuthorProfile.get_Profiles() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\AuthorProfile.cs:45
BlogEngine.Core.AuthorProfile.GetProfile(String username) in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\AuthorProfile.cs:284
admin_profiles.SetProfile(String name) in d:\hshome\maduquette\\BlogEngine\admin\Pages\Profiles.aspx.cs:32
admin_profiles.Page_Load(Object sender, EventArgs e) in d:\hshome\maduquette\\BlogEngine\admin\Pages\Profiles.aspx.cs:22
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Oct 5, 2008 at 3:10 PM
Does this direcory exist? 'd:\hshome\maduquette\\BlogEngine\App_Data\profiles'
If it does make sure to give Network Service permissions to write to it.
Oct 5, 2008 at 6:54 PM
Taylex wrote:
Does this direcory exist? 'd:\hshome\maduquette\\BlogEngine\App_Data\profiles'
If it does make sure to give Network Service permissions to write to it.

The directory exists, but the destination file 'profiles' does not.
So for a simpler solution, where do I find the Menu1 master? If I can remove the 'profiles' menu item from the admin menu list, I'll be happy with that.

Oct 5, 2008 at 8:28 PM
Edited Oct 5, 2008 at 8:29 PM
Never really messed with it before but the menu is rendered from admin/menu.ascx and menu.ascx references ~/web.sitemap.
So in theory if you remove it from web.sitemap it should accomplish what you wish to do.
Not sure if that will fix your error though, let us know how it goes.
Oct 5, 2008 at 9:14 PM
Right on!

I removed <siteMapNode url="~/admin/Pages/Profiles.aspx" title="profiles"  description=""  roles="administrators, editors"/> from the web.sitemap file and the misbehaving 'profiles' link  is no more..

From my lurking and occasional questions on this site, you all are making me appear like I know what I'm doing ;o)

Thank you!

Oct 5, 2008 at 10:42 PM
Actually it is questions like these that are making me learn what I am doing. I hate unanswered questions on the forum ; /
Oct 5, 2008 at 10:53 PM
well that's good to know.. I'll keep that in mind!! ;o)
Thanks again..
Nov 1, 2008 at 5:21 AM
I know you already solved the issue one way, and it's been a few weeks since this thread was started, but...

Came across the same problem myself upgrading 1.3.1 to 1.4.5 and was looking into a solution myself.  Since mine was an upgrade as well, I recopied my existing APP_DATA folder from backup into the upgrade installation.

Based on the error the error message and the information posted here, I traced the problem down to not having the Profiles folder in APP_DATA along with file inside.  Once I copied that up too, the profiles tab seems to be working now.

Hope it stays that way.  Just thought I'd add my two cents.