Compilation Error in Website or Web.config is missing

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/25/2011 5:58:29 PM
Gravatar
Total Posts 5

Compilation Error in Website or Web.config is missing

I am really hoping someone will have an answer for this problem.  We were investigating changing our web site over to mojoPortal.  We would then use mojoPortal to build custom modules off of for our other applications that need to be created.  The installation of mojoPortal was easy and the site was easy to use.  We downloaded the code using TortiseHG and everything went fine.  The site compiles each time with 19 warnings.  No big deal. 
I really want to use this project so I'm confident I've missed something easy.  Here is where I need some help.


My environment:
Microsoft Visual Studio 2010 Professional Version 10.0.30319.1 RTMRel All patches applied
CodeSmith Generator 5.3.4 Revision 12823 All patches applied
SQL 2008 R2  All patches applied

I initially started determining the viability of mojoPortal 3 weeks ago.  I went through the excellent videos and was able to build a module and attach it to mojoPortal with no problems.  Last Tuesday, I lost the ability to use the IDE or design mode in Visual Studio.   I receive this error message on the controls "This control cannot be displayed because its TagPrefix is not registered in this Web Form.  I found some articles and deleted by schema cache, but it did not work.  I then tested by opening modules in the WebStore.UI and was able to open the pages and use design mode.  Weird......I then created new projects from scratch and tried it again.  The same problem, but I also couldn't get the system to recognize any controls.  I then switched back the the WebStore UI project and encountered the same problems. 


After trying to get this to work for a couple of hours.  I decided my station needed a rebuild anyway and so I rebuilt my workstation, installed mojoPortal just fine and it compiled.  Then I tried to open a page within the WebStore.UI project.  I received the same error message "This control cannot be displayed because its TagPrefix is not registered in this Web Form.


Well, I decided I would not use the IDE and just code it all.  I created a new project.   Created a page using Code Smith and right after pasting the code on, I received the "Unrecognized tag prefix or device filter 'portal' on any control with <portal:  Anytime I tried to type in a <asp:control.........I get the "not a known element" error message.


Any help or suggestions would be appreciated.

8/26/2011 6:33:20 AM
Gravatar
Total Posts 18439

Re: Compilation Error in Website or Web.config is missing

In order for your custom project to recognize those tags you need to have references from your project to the mojoPortal.Web and mojoPortal.Web.Controls projects.

Then you need to copy the <pages><controls ... section from the mojoPortal Web.config file into the Web.config file of your project. This section is where the tags are declared.

Hope that helps,

Joe

8/26/2011 10:48:42 AM
Gravatar
Total Posts 5

Re: Compilation Error in Website or Web.config is missing

I'm seeing some weird things and I'm almost wondering if I'm encountering some bugs within the IDE for Visual Studio.  I added another web.config file to the folder where I have the ASPX filesl located, but not at the root of the UI.project since one already existed there.  Things started to recognize the <portal again.  I then removed that web.config file and everything seemed to remain the way it should.  I then removed my web.config file at the UI.project level and created a new one.  I copied the <pages><controls> from the Web.UI project into the new web.config file and everything seemed to remain the way it should.  I guess if experience this again, I'll add an additional web.config file to the folders, then remove it.

Thanks for pointing me in a direction to try.

8/26/2011 11:32:12 AM
Gravatar
Total Posts 18439

Re: Compilation Error in Website or Web.config is missing

ok, my advice was assuming that you were working with the mojoPortal source code and that you have your custom feature in its own project as recommended in our developer documentation.

I recommend watch the series of videos about building a guest book which walks through how to setup your projects and do custom development of features that plug into mojoPortal.

A few other things also worth looking at:

I would not add any web.config files under existing folders nor custom folders in mojoPortal. The Web.config file in your custom project is not used at runtime it is only so it can resolve the tags at compile time.

Hope that helps,

Joe

8/26/2011 11:36:29 AM
Gravatar
Total Posts 18439

Re: Compilation Error in Website or Web.config is missing

I will note that there can be problems in design mode because of the way we structure our projects. I don't use design mode at all myself so I don't encounter those problems. To get design mode working in a custom project requires spoofing our master page in the project, but design mode is not really useful for design. The way we support multiple sites and site specific skins can only resolve the css, theme and master page correctly at runtime not in design mode.

Hope that  helps,

Joe

1/13/2012 12:16:04 PM
Gravatar
Total Posts 5

Re: Compilation Error in Website or Web.config is missing

For others who might encounter this problem, as soon as we applied a new custom skin, the designer started working again.  We had already built 95% everything without the designer, it's just a nice to have.

We are thrilled with the product and will be releasing our new web site in the very near future.

You must sign in to post in the forums. This thread is closed to new posts.