I stumbled upon this project ASP.NET WebProfile Generator
Why would I need proxy class to access profile?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Because ASP.NET only supports Profiles out-of-the-box with the Web Site option. If you are using a Web Application Project (WAP), then you have to roll your own.
The problem stems from the fact that the Web Application Project does not have the Profile object automatically added to each page as with the Web Site project, so we cannot get strongly-typed programmatic access to the profile properties defined in our web.config file.
Good news is that it’s very doable:
- ASP.NET: Web Site versus Web Application Project
- How to add a Login, Roles and Profile system to an ASP.NET 2.0 app in only 24 lines of code
- Web Profile Builder
- Web Profile Builder for Web Application Projects
- Writing a custom ASP.NET Profile class
- ASP.NET Profiles in Web Application Projects
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0