compile errors when converting web site project to web application project

J

John Dalberg

I converted a working web site project to a web application project and I
am getting a bunch of warnings and compile errors.

All code using .NET's profile class is giving an error.

example line:
txtName.Text = Profile.FirstName

gives an error:
... FirstName' is not a member of 'Profile'.

Even though it worked before migration and I have an attribute for it in
web.config:

...... <properties>
<add name="FirstName" type="System.String"
provider="AspNetSqlMembershipProvider"/>

and then I am getting lots of warnings for the web.config file. See below.
The warnings might be the cause for the profile errors because it couldn't
read the attributes for the profile but why is Visual Studio giving
warnings about the web.config file?



Message 1 Could not find schema information for the element
'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'.
C:\Inetpub\wwwroot\insite_test\Web.config 1 4 insite_test
Message 2 Could not find schema information for the element
'http://schemas.microsoft.com/.NetConfiguration/v2.0:appSettings'.
C:\Inetpub\wwwroot\insite_test\Web.config 2 3 insite_test
Message 3 Could not find schema information for the element
'http://schemas.microsoft.com/.NetConfiguration/v2.0:add'.
C:\Inetpub\wwwroot\insite_test\Web.config 3 4 insite_test
Message 4 Could not find schema information for the attribute 'key'.
C:\Inetpub\wwwroot\insite_test\Web.config 3 8 insite_test
Message 5 Could not find schema information for the attribute
'value'. C:\Inetpub\wwwroot\insite_test\Web.config 3 26
insite_test Message 6 Could not find schema information for the
element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:add'.
C:\Inetpub\wwwroot\insite_test\Web.config 4 4 insite_test
Message 7 Could not find schema information for the attribute 'key'.
C:\Inetpub\wwwroot\insite_test\Web.config 4 8 insite_test

and lots more of 'Could not find schema information.." warnings.


John Dalberg
 
G

Guest

You need to add a WebProfile class since the provider normally expects an
APP_CODE folder. Scott Guthrie covers this on his blog and there is even an
add-in to generate the required class. Sorry, can't remember exactly where it
is.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top