PC Review


Reply
Thread Tools Rate Thread

compile errors when converting web site project to web application project

 
 
John Dalberg
Guest
Posts: n/a
 
      26th Mar 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      28th Mar 2007
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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile errors after converting to a Web Application Project from Howard Pinsley Microsoft ASP .NET 2 22nd Nov 2008 04:54 PM
List of free web site design, web site backgrounds, web site layoutsweb sites cyber Microsoft Frontpage 0 19th Dec 2007 09:36 AM
Converting VS 2005 Web Site Project to VS 2005 Web Application Project ITistic Microsoft ASP .NET 2 21st Aug 2007 09:56 PM
Lots of type 'xxxxxxx' is not defined errors when migrating web site project to web app project John Dalberg Microsoft ASP .NET 1 24th Mar 2007 03:21 PM
Web Site Project vs Web Application Project Ethan V Microsoft ASP .NET 2 25th Jun 2006 05:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:31 AM.