In my code-behind in a VS2005 WAP project, when I attempt to modify a profile attribute by using Profile.WhateverTheAttributeNameIs, the Profile class cannont be located. This works fine in VS2005 Web Projects.
To reproduce, add a generic profile attribute in your web.config and then try to update or reference the profile attribute in your code behind. First, VS2005 won't even know what the "Profile." reference is and it definitely doesn't recognize your attributes.
This is not so much a bug as a difference in compilation models between web sites and web application projects. See the profile topic in the following for some more info:
The basic issue is that profiles are compiled dynamically by ASP.Net. In web sites your code files are also compiled dynamically by ASP.Net. So, ASP.Net is able to first compile the profiles and then add an accessor and reference to your page and compile
it afterwards. In Web Application Projects your code files are compiled on the client. They can not have references to dynamically created assemblies that do not exist or they will not compile.
This is a general issue for ASP.Net BuildProviders and and Web Application Projects. We do not have a general solution yet. The two build providers we get the most questions about are App_GlobalResources and Profiles. For these two we are trying to come
up with solutions. The thought is that we will generate proxy opjects that get compiled into your assembly on the client. The proxy objects for profiles will represent the state of the profiles in web.config at the time of compilation on the client. You
will have strongly typed access to the profiles through the proxy. The proxy will work something like the sample code in the link above.
Tim McBride
This posting is provided "AS IS" with no warranties, and confers no rights.
This is not so much a bug as a difference in compilation models between web sites and web application projects. See the profile topic in the following for some more info:
The basic issue is that profiles are compiled dynamically by ASP.Net. In web sites your code files are also compiled dynamically by ASP.Net. So, ASP.Net is able to first compile the profiles and then add an accessor and reference to your page and compile
it afterwards. In Web Application Projects your code files are compiled on the client. They can not have references to dynamically created assemblies that do not exist or they will not compile.
This is a general issue for ASP.Net BuildProviders and and Web Application Projects. We do not have a general solution yet. The two build providers we get the most questions about are App_GlobalResources and Profiles. For these two we are trying to come
up with solutions. The thought is that we will generate proxy opjects that get compiled into your assembly on the client. The proxy objects for profiles will represent the state of the profiles in web.config at the time of compilation on the client. You
will have strongly typed access to the profiles through the proxy. The proxy will work something like the sample code in the link above.
Any updates on when the above might actually happen?
that will generate a proxy object for your profile that will give you strongly typed access in pages. We won't have an official solution for strongly typed profile access until the next version of Visual Studio.
Tim McBride
This posting is provided "AS IS" with no warranties, and confers no rights.
that will generate a proxy object for your profile that will give you strongly typed access in pages. We won't have an official solution for strongly typed profile access until the next version of Visual Studio.
the link mentioned in this post is no more working because gotdotnet is being phased out.. please any other working link for
AspWebProfileGenerator
I've searched the web as well for AspWebProfileGenerator as well and cannot seem to find it anywhere else. Anyone have an idea or able to post it elsewhere?
I'm in the process of moving the ASP.NET WebProfile Generator project from GotDotNet to
http://www.codeplex.com/WebProfile. The link should be valid in the next week or two.
Tim McBride
This posting is provided "AS IS" with no warranties, and confers no rights.
tonyjo
Member
5 Points
1 Post
Profile Provider Intellisense Not Working?
Apr 17, 2006 10:36 PM|LINK
In my code-behind in a VS2005 WAP project, when I attempt to modify a profile attribute by using Profile.WhateverTheAttributeNameIs, the Profile class cannont be located. This works fine in VS2005 Web Projects.
To reproduce, add a generic profile attribute in your web.config and then try to update or reference the profile attribute in your code behind. First, VS2005 won't even know what the "Profile." reference is and it definitely doesn't recognize your attributes.
Thanks.
TJ
jamesqding
Member
55 Points
12 Posts
Re: Profile Provider Intellisense Not Working?
Apr 18, 2006 05:22 PM|LINK
It is interesting to see we have the same problem ( my post "About Profile Provider in WAP").
I think this should be a bug on IDE for WAP since it should generate the same code WebSite does in temp directory.
Anyone from ASP.Net WAP team, could you confirm this is a bug ???
Thanks
James
timmcb
Contributor
2379 Points
471 Posts
Microsoft
Re: Profile Provider Intellisense Not Working?
Apr 19, 2006 04:18 PM|LINK
This is not so much a bug as a difference in compilation models between web sites and web application projects. See the profile topic in the following for some more info:
http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx
The basic issue is that profiles are compiled dynamically by ASP.Net. In web sites your code files are also compiled dynamically by ASP.Net. So, ASP.Net is able to first compile the profiles and then add an accessor and reference to your page and compile it afterwards. In Web Application Projects your code files are compiled on the client. They can not have references to dynamically created assemblies that do not exist or they will not compile.
This is a general issue for ASP.Net BuildProviders and and Web Application Projects. We do not have a general solution yet. The two build providers we get the most questions about are App_GlobalResources and Profiles. For these two we are trying to come up with solutions. The thought is that we will generate proxy opjects that get compiled into your assembly on the client. The proxy objects for profiles will represent the state of the profiles in web.config at the time of compilation on the client. You will have strongly typed access to the profiles through the proxy. The proxy will work something like the sample code in the link above.
This posting is provided "AS IS" with no warranties, and confers no rights.
jamesqding
Member
55 Points
12 Posts
Re: Profile Provider Intellisense Not Working?
Apr 19, 2006 07:46 PM|LINK
Tim,
Thanks for the insight (server, client compilation, proxy) and pointer to Scott's turtorial (appendix 2).
ASP.Net 2.0 and WAP really rocks.
James
ken_willis
Member
10 Points
2 Posts
Re: Profile Provider Intellisense Not Working?
Aug 23, 2006 12:07 AM|LINK
Any updates on when the above might actually happen?
timmcb
Contributor
2379 Points
471 Posts
Microsoft
Re: Profile Provider Intellisense Not Working?
Aug 23, 2006 06:04 PM|LINK
Proxy objects for App_GlobalResources are available in the current version of Web Application Projects. I have provided an add-in on
http://workspaces.gotdotnet.com/AspWebProfileGenerator
that will generate a proxy object for your profile that will give you strongly typed access in pages. We won't have an official solution for strongly typed profile access until the next version of Visual Studio.
This posting is provided "AS IS" with no warranties, and confers no rights.
nettellect
Member
2 Points
1 Post
Re: Profile Provider Intellisense Not Working?
Jun 22, 2007 06:32 AM|LINK
the link mentioned in this post is no more working because gotdotnet is being phased out.. please any other working link for AspWebProfileGenerator
EngineerBill
Member
5 Points
4 Posts
Re: Profile Provider Intellisense Not Working?
Jun 25, 2007 06:15 PM|LINK
I've searched the web as well for AspWebProfileGenerator as well and cannot seem to find it anywhere else. Anyone have an idea or able to post it elsewhere?
timmcb
Contributor
2379 Points
471 Posts
Microsoft
Re: Profile Provider Intellisense Not Working?
Jun 25, 2007 06:28 PM|LINK
I'm in the process of moving the ASP.NET WebProfile Generator project from GotDotNet to http://www.codeplex.com/WebProfile. The link should be valid in the next week or two.
This posting is provided "AS IS" with no warranties, and confers no rights.