Working on Chapter 11 - the part about implementing a custom profile to allow the user to select themes.
I've stripped everything out of the profile except the themes attribute.
<profile enabled="true">
<properties>
<add name="Theme"/>
</properties>
</profile>
I should mention that I'm a newbie and have implemented MS Access providers - based on a lot of stuff I've pulled off MSDN2. - That said, they work - membership, roles, and now profiles.
However, I do have a weird issue - when I put in the section about the HttpModules >
<httpModules>
<add name="Page" type="Wrox.Web.GlobalEvents.ThemeModule" />
</httpModules>
and added the theme.
vb module to the App_Code directory, I started getting the following error. . .
Error 4 Type 'ProfileCommon' is not defined. c:\inetpub\wwwroot\Basic_Provider\App_Code\
VB\Them eModule.
vb 33 26
http://localhost/Basic_Provider/
(BTW, I like the VS2005 copy error codes feature - I would have liked it better if I could have just selected any of the relevant text by clicking and dragging though)
I did lots of research on the web and tried all the fixes I could find - stopping and starting the webserver, killing the aspnet process, making a change to the web.config file, saving, loading a page, changing config back, saving, new method (instead of directcast - CType(ProfileBase.Create("ProfileTestVB", True), ProfileCommon),
essentially everything I could find. Finally, I dumped my config file, started with the Wrox application config file, dumped the parts like the shopping cart, the system.net, etc. that I wasn't using and, the error disappeared. Of course, the app didn't work, so I started adding back all of the stuff that I'd added.
Anyway, it's late, I'm rambling, the part of the config file that caused the error to occur was the compilation section. Based on another Wrox book - Professional ASP.Net2 (pg 79-80) and all the rah-rah about how language independent .NET 2 was, I added the following section to my web.config file:
<compilation debug="true" explicit="true">
<codeSubDirectories>
<add directoryName="
VB"/>
<add directoryName ="CS"/>
</codeSubDirectories>
</compilation>
My question is, what gives? I did this because I'm not great in C# and there were some membership pages that were written in C# that I wanted to incorporate in the site. I was going to re-work them because they were ugly, but the basic functionality was there. I thought Iââ¬â¢d cut short the development time. They worked fine beside my
vb providers until I added your ThemeModule.
vb. How come everything broke down?
Thanks for your time,
Joe.