MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Extend Profile  (Mono Support )

Viewed 8554 time(s), 10 post(s) 7/29/2013 7:42:44 AMby viendermaurya
viendermaurya

viendermaurya

7/29/2013 7:42:45 AM
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

This content has not been rated yet. 
35 Reputation 5 Total posts
mev9669

mev9669

7/29/2013 8:30:38 AM
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.
This content has not been rated yet. 
515 Reputation 67 Total posts
viendermaurya

viendermaurya

7/29/2013 9:09:42 AM
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
This content has not been rated yet. 
35 Reputation 5 Total posts
mev9669

mev9669

7/29/2013 10:15:32 AM
Please have a look at http://www.mono-software.com/blog/post/Mono/95/Building-a-custom-ASP-NET-project-based-on-MonoX/
This content has not been rated yet. 
515 Reputation 67 Total posts
viendermaurya

viendermaurya

7/29/2013 3:46:53 PM
I followed the link but as soon as I am adding the monoProfileSample.aspx.cs then it starts giving same error.
This content has not been rated yet. 
35 Reputation 5 Total posts
viendermaurya

viendermaurya

7/29/2013 4:49:05 PM
Not able to find the reference of Resources.
using MonoSoftware.MonoX.Resources;

Please help.

This content has not been rated yet. 
35 Reputation 5 Total posts
khorvat

khorvat

7/30/2013 6:14:35 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
mev9669

mev9669

7/30/2013 8:05:44 AM
open Visual studio solution explorer and make sure that Resources folder exists with all the Resource files inside the Monox folder.. 
This content has not been rated yet. 
515 Reputation 67 Total posts
viendermaurya

viendermaurya

8/6/2013 10:01:26 AM
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>


This content has not been rated yet. 
35 Reputation 5 Total posts
khorvat

khorvat

8/6/2013 10:02:53 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts