470,636 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

compile errors when converting web site project to web application project

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
Mar 26 '07 #1
1 1653
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

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"John Dalberg" wrote:
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
Mar 28 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ravi Chaudhary | last post: by
6 posts views Thread by Kevin Atherton | last post: by
27 posts views Thread by Rene | last post: by
3 posts views Thread by walter | last post: by
3 posts views Thread by Dean Slindee | last post: by
1 post views Thread by =?Utf-8?B?SG93YXJkIFBpbnNsZXk=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.