Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert MM Web Site to Web Application
Message
From
13/07/2011 17:53:11
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
13/07/2011 16:44:09
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01518088
Message ID:
01518116
Views:
37
>>>Hi Guys:
>>>
>>>We have trouble to convert MM 4.0 Web Site to a Web Application in Visual Studio 2010. The main problem is that any files in the Admin folder cannot be compiled and it doesn't recognize any MM controls.
>>>
>>>Any idea or experience with this kind of issues?
>>>
>>>Thanks,
>>>Adrian
>>
>>Lots of experience with it actually. I typically just create a blank WAP and copy all my files over to the new WAP project. Now I have a template to create a new MM Web Application Project. I am not sure what your options are at this point as to how much stuff you would have to move if you followed my method. Typically I do that right off before developing any work in the project.
>>
>>If you have lots of work in the project, then you can try to convert as you have done. The Web Site supports the App_Code folder but the WAP does not. I just name it CodeBase or something different and that part is fine. There is no real reason the Admin files would not build but is probably related to the other things that are a problem.
>>
>>If you can, just create a new Web Application Project, add the mm references, then copy all the files into the project. This takes little time really if you don't have tons of files already developed.
>>Timothy
>
>Thanks Tim for your reply. I did exactly what you described and I have managed to get by App_code but I have two major issues:
>1. The files in Admin page generate 177 errors. I tried to changes their properties from content to compile and the errors are still there.
>2. The Mere Mortals controls are not recognized in the aspx.cs file.
>
>Another thing is the Mere Mortals doesn't have a project template for Web Application. If it does the conversion may be easier.
>
>Thanks,
>Adrian

Adrian,

You are right there isn't a WAP template for MM, but if you create multiple applications you can create a WAP standard project and add all the mm files and references then save it. Otherwise, once you get yours converted you will be up and running.

The other issue that you may be experiencing has to do with the namespaces. The Website does not add the namespace declarations to the code files. You can add them yourself and is what I would do. This may be what is giving you the problem with the Admin pages. What are the errors you are getting? Just an example as you have so many but most likely just a simple fix will clear them all up.

The Mere Mortals controls not being recognized could be a couple of things. Verify you have valid references in the project for mm Web. Also verify the assembly references in Web.Config file are correct as well as the tag prefix section. Make sure all your namespaces are added and match. Lastly, did you right click the project and choose "Convert to Web Application Project" ? This must be done to get the designer files for each page. If you expand the page do you see two files or three? You need:
MyPage.aspx
MyPage.aspx.cs
MyPage.aspx.designer.cs

The designer files won't be there until after you run the convert choice from the right click menu of the project. Also some work would be needed on the Global.ascx file. You can create another Web Application Project and compare the notes.

If you want, I can send you a blank project that has all the mere mortals pieces in it from my template and you can just add your individiual project files to that. Or use it to compare your files to mine to see what you are missing.

I agree, I wish there was a template from MM for a Web Project. I won't create any more websites that are not WAP type. Been there, done that, not again.
Thanks
Timothy
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform