Mono Support Extend Profile 

Viewed 15500 time(s), 10 post(s), 7/29/2013 7:42:44 AM - by viendermaurya
7/29/2013 7:42:45 AM
35 Reputation 5 Total posts

Dear All,

I am following the link to expend the User Profile.

http://www.mono-software.com/blog/post/Mono/98/How-to-Extend-MonoX-and-ASP-NET-Profile/

I am using the sample zip file SampleSolution_4_7_33xx.zip".

When I am running the application , I am getting error "Error 1 The type or namespace name 'Resources' does not exist in the namespace 'MonoSoftware.MonoX' (are you missing an assembly reference?) C:\ApplicationData\Projects\FDMeet\Backup\MonoX\MonoX\ProjectName\ProfileSamples\MonoXProfileTemplates\MonoXProfileSample.aspx.cs 
"
Please let me know where to find the resources causing the error.

Here is the couple of steps I did.
1) I downloaded the latest version of the Monox and installed in IIS. Its running successfully.
2) Now, I want to extend the profile and I downloaded the Sample zip file and added in the Monox.
3) When I am building the Sample Solution then , its giving error as mentioned above.

Please help me.

Thanks.

Virender Maurya

1
7/29/2013 8:30:38 AM
515 Reputation 67 Total posts

There is are two file in Monox/T4Templates.delete the two files. i had the similar issue. Also I am trying to to Create a custom registeration form. Please let me know if you manage to get this working.

2
7/29/2013 9:09:42 AM
35 Reputation 5 Total posts

Dear mev9669,

I have tried deleting the files in the folder mentioned by you. but it stills giving me same error.

Files deleted :-
Paths.tt
RewrittenPaths.tt

Regards,

Virender

3
7/29/2013 10:15:32 AM
515 Reputation 67 Total posts

Please have a look at http://www.mono-software.com/blog/post/Mono/95/Building-a-custom-ASP-NET-project-based-on-MonoX/

4
7/29/2013 3:46:53 PM
35 Reputation 5 Total posts

I followed the link but as soon as I am adding the monoProfileSample.aspx.cs then it starts giving same error.

5
7/29/2013 4:49:05 PM
35 Reputation 5 Total posts

Not able to find the reference of Resources.
using MonoSoftware.MonoX.Resources;

Please help.

6
7/30/2013 6:14:35 AM
15993 Reputation 2214 Total posts

Hi,

Not able to find the reference of Resources.
using MonoSoftware.MonoX.Resources;
I just want to let you know that we have moved MonoX resources out of the main project so you should reference the MonoX.Localization.dll in order to have the using clause in your code.

Regards

7
7/30/2013 8:05:44 AM
515 Reputation 67 Total posts

open Visual studio solution explorer and make sure that Resources folder exists with all the Resource files inside the Monox folder.. 

8
8/6/2013 10:01:26 AM
35 Reputation 5 Total posts

Thanks Khorvat and Mev9669. I followed your instructions and problem is now solved.

Now I am trying to add one more field in UserProfile.
1) I have added field in UserProfile table.
2) Added record in LocalizationSource table.
3) Added DAL and DBSpecific project in my MonoSolution.
4) Updated DAL, DBSpecific code and MonoSolution code.

and I was feeling that It will now work but somewhere its giving me error. Do you have any idea why the error is coming and what does it mean.


The prefetch path element at index 0 in the passed in prefetch path for root entity type 93 is meant for root entity type 92 which isn't a subtype of 93. This means that you've added a prefetch path node to a Path of an unrelated entity, for example adding OrderDetailsEntity.PrefetchPathProduct to a prefetch path for CustomerEntity. 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. <br>
<br>
Exception Details: System.ApplicationException: The prefetch path element at index 0 in the passed in prefetch path for root entity type 93 is meant for root entity type 92 which isn't a subtype of 93. This means that you've added a prefetch path node to a Path of an unrelated entity, for example adding OrderDetailsEntity.PrefetchPathProduct to a prefetch path for CustomerEntity.<br>
<br>
Source Error: <br>
<br>
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. <br>
Stack Trace: <br>
<br>
[ApplicationException: The prefetch path element at index 0 in the passed in prefetch path for root entity type 93 is meant for root entity type 92 which isn't a subtype of 93. This means that you've added a prefetch path node to a Path of an unrelated entity, for example adding OrderDetailsEntity.PrefetchPathProduct to a prefetch path for CustomerEntity.]<br>
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, Boolean forceParameterizedPPath) +911<br>
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchPrefetchPath(IEntityCollection2 rootEntities, IRelationPredicateBucket filterBucket, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath) +54<br>
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchAdditionalPrefetchPath(IPrefetchPath2 prefetchPath, Context contextToUse, IEntity2 fetchedEntity, IRelationPredicateBucket filterToUse) +210<br>
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingFilter(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath, Context contextToUse, IRelationPredicateBucket filter, ExcludeIncludeFieldsList excludedIncludedFields) +1018<br>
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) +327<br>
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath) +91<br>
MonoSoftware.LLBLGen.Repository.FetchEntity(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath) +89<br>
MonoSoftware.MonoX.Repositories.UserProfileRepository.GetUserProfile(Guid userId) +266<br>
MonoSoftware.MonoX.BusinessLayer.UserProfileBLL.GetCachedUserProfile(Guid userId) +206<br>
MonoSoftware.MonoX.BaseProfilePage.OnInit(EventArgs e) +126<br>
MonoSoftware.MonoX.Pages.Profile.MyWall.OnInit(EventArgs e) +2236<br>
System.Web.UI.Control.InitRecursive(Control namingContainer) +569<br>
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2237<br>


9
8/6/2013 10:02:53 AM
15993 Reputation 2214 Total posts

Hi,

when you say you added a DAL do you mean the DAL project available at GitHub or ? If you did, have you changed the DAL adapter to point out to your database and did you refresh the DAL project from LLBLGen designer so he can add your newly added fields ?

Regards

10
This is a demo site for MonoX. Please visit Mono Software for more info.