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.

.Net Profiles..  (Mono Support )

Viewed 24653 time(s), 3 post(s) 3/5/2011 1:38:36 PMby shawndg
shawndg

shawndg

3/5/2011 1:38:36 PM
I went thru the example posted here..

http://www.mono-software.com/blog/post/Mono/38/Support-for-ASP-NET-profiles-in-MonoX/

And As soon as I try the first part.. to rem out those lines.. I get a error..

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the
compilation of a resource required to service this request. Please
review the following specific error details and modify your source code
appropriately.

Compiler Error Message: CS0246: The type or
namespace name 'ProfileCommon' could not be found (are you missing a
using directive or an assembly reference?)


Source Error:


Line 119: }
Line 120:
Line 121: protected ProfileCommon Profile {
Line 122: get {
Line 123: return ((ProfileCommon)(this.Context.Profile));

dont work..
<!-- Asp.Net compiles the profile to the App_Code.dll which can't be shiped with the MonoX CMS because custom projects needs to have ability of having custom code put in to the Asp.net folder App_Code (which is compile it to the App_Code.dll) -->
        <!--"System.Collections.Specialized.StringCollection" type is added to show that complex types are ignored for now-->
        <!--<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
            <providers>
                <remove name="AspNetSqlProfileProvider"/>
                <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="MonoX" type="System.Web.Profile.SqlProfileProvider"/>
            </providers>
            <properties>
            </properties>
        </profile>-->
     
    <!--ENABLE CUSTOM USER PROFILE FILEDS-->
     
        <profile enabled="true" defaultProvider="AspNetSqlProfileProvider"  >
        <providers>
          <remove name="AspNetSqlProfileProvider"/>
          <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="MonoX" type="System.Web.Profile.SqlProfileProvider" />
        </providers>
        <properties>
          <add name="GPSLocation" defaultValue="45.562141,18.676414"/>
          <add name="Children" />
          <add name="RecentSearchList"
               type="System.Collections.Specialized.StringCollection"
               serializeAs="Xml"
                />
          <add name="Hometown" type="String" serializeAs="String" />
          <add name="IsModerator" type="bool"  />         
          <group name="Bio">
            <add name="Title" type="string" />
            <add name="Description" type="String" />
          </group>
          <group name="Publication">
            <add name="Title" type="string" />
            <add name="Description" type="String" />
            <add name="Date" type="DateTime" />
          </group>
          <add name="ClubJoinedYear" type="int"  />
          <add name="MoneyDonated" type="decimal"  />         
        </properties>
    </profile>


works:

    <!-- Asp.Net compiles the profile to the App_Code.dll which can't be shiped with the MonoX CMS because custom projects needs to have ability of having custom code put in to the Asp.net folder App_Code (which is compile it to the App_Code.dll) -->
    <!--"System.Collections.Specialized.StringCollection" type is added to show that complex types are ignored for now-->
    <profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
        <providers>
            <remove name="AspNetSqlProfileProvider"/>
            <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="MonoX" type="System.Web.Profile.SqlProfileProvider"/>
        </providers>
        <properties>
        </properties>
    </profile>
 
<!--ENABLE CUSTOM USER PROFILE FILEDS-->
 
    <!--<profile enabled="true" defaultProvider="AspNetSqlProfileProvider"  >
    <providers>
      <remove name="AspNetSqlProfileProvider"/>
      <add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="MonoX" type="System.Web.Profile.SqlProfileProvider" />
    </providers>
    <properties>
      <add name="GPSLocation" defaultValue="45.562141,18.676414"/>
      <add name="Children" />
      <add name="RecentSearchList"
           type="System.Collections.Specialized.StringCollection"
           serializeAs="Xml"
            />
      <add name="Hometown" type="String" serializeAs="String" />
      <add name="IsModerator" type="bool"  />         
      <group name="Bio">
        <add name="Title" type="string" />
        <add name="Description" type="String" />
      </group>
      <group name="Publication">
        <add name="Title" type="string" />
        <add name="Description" type="String" />
        <add name="Date" type="DateTime" />
      </group>
      <add name="ClubJoinedYear" type="int"  />
      <add name="MoneyDonated" type="decimal"  />         
    </properties>
</profile>-->

This content has not been rated yet. 
1871 Reputation 252 Total posts
khorvat

khorvat

3/5/2011 3:50:11 PM
Hi,

one of our users already had an issue related to "ProfileCommon" class, it is a Asp.Net issue and to fix the error you have you need uncomment profile section (without the custom properties), then open your project in a VS and compile the project. After that you can add your custom fields.

You can find more about the issue here, let us know if this has solved your issue.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
khorvat

khorvat

3/8/2011 10:31:40 AM
Did you solve the "ProfileCommon" isssue ?
This content has not been rated yet. 
15993 Reputation 2214 Total posts