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

Viewed 91082 time(s), 16 post(s), 5/30/2012 5:02:16 PM - by super
5/30/2012 5:02:16 PM
6018 Reputation 709 Total posts

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 ?

1
5/30/2012 7:27:13 PM
15993 Reputation 2214 Total posts

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

2
5/30/2012 8:28:03 PM
6018 Reputation 709 Total posts

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?)

3
5/31/2012 6:30:06 AM
15993 Reputation 2214 Total posts

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

4
5/31/2012 5:30:44 PM
6018 Reputation 709 Total posts

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">

5
5/31/2012 5:31:38 PM
6018 Reputation 709 Total posts

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.

6
5/31/2012 5:54:35 PM
15993 Reputation 2214 Total posts

Ok, we will review this and get back to you.

7
5/31/2012 7:04:40 PM
6018 Reputation 709 Total posts

thank you, i will wait for your reply.

8
5/31/2012 7:09:46 PM
6018 Reputation 709 Total posts

FYI: I am using this ASP.NET 3.5 Job site starter kit: http://www.asp.net/downloads/starter-kits/job

9
6/1/2012 7:26:43 AM
15993 Reputation 2214 Total posts

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

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