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.

how to create App_Code folder in MonoX project ? (Closed) (Mono Support )

Viewed 88459 time(s), 16 post(s) 5/30/2012 5:02:16 PMby super
super

super

5/30/2012 5:02:16 PM
I have downloaded the MonoX project.
I have another asp.net project and I am trying to merger the other asp.net project in MonoX.
The other project has a lot of stuff in "App_Code" folder so I just copied and pasted the folder as it is in the MonoX in Visual Studio.

But I am getting error message that "App_Code" folder is not allowed because monoX is a pre-compiled.

1) How to solve this ?

2) If monoX uses other location for the .cs classes etc, Do I need to change location in ever page of other asp.net to location different location in monoX project ?

3) Do I need source code of monoX to add "App_Code" folder ? If yes, how to get source code ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

5/30/2012 7:27:13 PM
Hi, To solve your first problem remove a file from the root of the monox called similar precompile*.config. Monox is a WAP ASP.NET app so it doesn't have app_code so you can place your old app_code anywhere you like. You don't need source code for this to work. Let me know if you need anything else. Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
super

super

5/30/2012 8:28:03 PM
That worked but now I am getting these error, I added all the files and folder of other asp.net application in monoX

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

Error 104 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'GetProfile' and no extension method
'GetProfile' accepting a first argument of type
'System.Web.Profile.DefaultProfile' could be found (are you missing a using
directive or an assembly reference?)

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

Error 107 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'GetProfile' and no extension method
'GetProfile' accepting a first argument of type
'System.Web.Profile.DefaultProfile' could be found (are you missing a using
directive or an assembly reference?)

Error 108 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'Employer' and no extension method 'Employer'
accepting a first argument of type 'System.Web.Profile.DefaultProfile' could be
found (are you missing a using directive or an assembly reference?)

Error 109 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'Employer' and no extension method 'Employer'
accepting a first argument of type 'System.Web.Profile.DefaultProfile' could be
found (are you missing a using directive or an assembly reference?)

Error 110 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'Employer' and no extension method 'Employer'
accepting a first argument of type 'System.Web.Profile.DefaultProfile' could be
found (are you missing a using directive or an assembly reference?)

Error 111 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'Employer' and no extension method 'Employer'
accepting a first argument of type 'System.Web.Profile.DefaultProfile' could be
found (are you missing a using directive or an assembly reference?)

Error 112 'System.Web.Profile.DefaultProfile'
does not contain a definition for 'Employer' and no extension method 'Employer'
accepting a first argument of type 'System.Web.Profile.DefaultProfile' could be
found (are you missing a using directive or an assembly reference?)

This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

5/31/2012 6:30:06 AM
Hi,

this is common issue when converting app from Web Site project type to WAP project type. Please read the following posts and get back to us if you need more help.

ProfileCommon Issue

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

super

5/31/2012 5:30:44 PM
Ok I added the required stuff in the webconfig. My other asp.net project that I am trying to add in MonoX has a few fields like FirstName, username, email, lastname, resume, companyID etc uses ASP.NET profile.

So I added the following in webconfig like this and this solved the problem.


<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="UserName" type="System.String"/>
<add name="Email" type="System.String"/>
<add name="FirstName" type="System.String" allowAnonymous="true"/>
<add name="LastName" type="System.String" allowAnonymous="true"/>
<group name="JobSeeker">
<add name="ResumeID" type="System.Int32"/>
</group>
<group name="Employer">
<add name="CompanyID" type="System.Int32"/>
</group>
</properties>

</profile>



Now I am able to use same membership which is of MonoX in my other project as I have merged two projects. MonoX and ASP.NET job starter kit.

I am having one problem though, when I try to view any users profile page like this: http://localhost:61865/MonoX/profile/LeeHiggins/

I get this error message:




Server Error in '/MonoX' Application.


Configuration Error Description:
An error occurred during the processing of a configuration file required to
service this request. Please review the specific error details below and modify
your configuration file appropriately.

Parser Error Message: The
Profile property 'FirstName' allows anonymous users to store data. This requires
that the AnonymousIdentification feature be enabled.

Source Error:






Line 510: <add name="UserName" type="System.String"/>
Line 511: <add name="Email" type="System.String"/>
Line 512: <add name="FirstName" type="System.String" allowAnonymous="true"/>
Line 513: <add name="LastName" type="System.String" allowAnonymous="true"/>
Line 514: <group name="JobSeeker">
This content has not been rated yet. 
6018 Reputation 709 Total posts
super

super

5/31/2012 5:31:38 PM
i would deeply appreciate if anyone can help me, once i am done with this i would be happy to share/contribute this project with everyone here.
This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

5/31/2012 5:54:35 PM
Ok, we will review this and get back to you.
This content has not been rated yet. 
15993 Reputation 2214 Total posts
super

super

5/31/2012 7:04:40 PM
thank you, i will wait for your reply.
This content has not been rated yet. 
6018 Reputation 709 Total posts
super

super

5/31/2012 7:09:46 PM
FYI: I am using this ASP.NET 3.5 Job site starter kit: http://www.asp.net/downloads/starter-kits/job

This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

6/1/2012 7:26:43 AM
Hi,

to fix the error you have please take a look at the following MSDN reference guide anonymousIdentification. Isn't it a bit strange that you are allowing unauthenticated visitors to enter First and Last name ?

Line 512: <add name="FirstName" type="System.String" allowAnonymous="true"/>
Line 513: <add name="LastName" type="System.String" allowAnonymous="true"/>

Note: MonoX profile can be modified only by the authenticated users.

Let me know if you need anything else.

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