Web Site Project to Web Application Project drawbacks/repercussions

Topics: General
Sep 5, 2011 at 11:55 AM

Hi guys

Due to the fact that we do not need web site project (WSP) advantage of rapid site changes and easy maintenance,
cos Composite C1 is doing that for us, but we do need possibility to add source code as links and/or easier unit
testing, we have tried and managed to convert C1 WSP to web application project. 

Another inspiration was discussion: http://compositec1.codeplex.com/discussions/259324?ProjectName=compositec1

Are there any drawbacks/repercussions that You would expect from WAP??


  1. add new WAP
  2. add refrences (new dir let say libs\ copy everything from original WSP to this dir) add refs from this dir
  3. compile
  4. copy/add all files (it is possible in VS solution explorer)
  5. WAP + right click + Convert to WAP -> fails!!!!
  6. change all aspx pages w/o <Page> directive by adding empty <Page> directive to it
  7. repeat step 5 -> ok
  8. exclude duplicate code behind files ( only 1)
  9. build/run

if you do step 5 in original WSP (suggestion: You guys do it? of course if this is not ap huge problem), then You got
to repeat step 4 (copying/adding files and conversion on WAP) 

There is solution with both project type versions.







Sep 6, 2011 at 10:23 AM

Hi again


Las execution of "find replace all" before test and zipping of solution did this:

<%@ Page %>
<?xml version="1.0" encoding="UTF-8"?>

And it should be
<?xml version="1.0" encoding="UTF-8"?>
<%@ Page %>

Some functions just froze and log were full of XmlExceptions.


Solution will be on the link above within an hour



Sep 6, 2011 at 11:17 AM


Our guys did few more tests and it seems that it works...




Composite C1  username Admin password 123456.

it seems like it is possible to convert existing sites to app with above explained steps....




Feb 14, 2012 at 7:53 PM
Edited Feb 14, 2012 at 7:54 PM

I wonder how you are going to manage an upgrade when there is a new version of Composite C1. Since you modified many of the original files it is hard to see what you need to copy in. Please share your experience and vision. Thanks!

Feb 15, 2012 at 10:46 AM


Sorry for delay, but I'm working on some other stuff, so I needed to pull backups and restore those test solutions.

OK. To make long story short:

  • just took v3.1
  • did steps from above
    • this time - new nasty idea: Created MVC3  app
  • errors:
    • in 60 aspx Page directive missing I think 60 was count
    • in ??? ascx Register directive (aspui namespace prefix tag was missing)
  • rebuild
    • few duplicate objects in *.Design.aspx.cs - commented out!
  • run - works


  • replacement
    • brute force insertion (nobrainer) of <Page> directive
      • no go - cos if there can be only one <Page> directive!!
    • more intelligent SED/regex script is gonna be needed
      • probably (the simple one) nullyfy (replace existing with String.Empty and then insert <Page>)
      • need more time for that
    • semi automatic
      • notepad++ in batch script that opens 60 files...
      • I did it in 3 minutes


WebSite vs WebApp
This is known religious war...
From my point of view there is no need for WebSite advantages (primarily partial updating of WebSite, cos
Composite C1 is *usually* deployed as a whole - there is no replacement of specific URLs - aspx or html pages

  • AFAIK 
    • <Page> directive in aspx pages should not break WebSite Project
    • <Register> to I believe (I admit I have to test it)
  • Solution/Workaround options:
    • option 1: Composite guys do the changes for next versions
      Note: I'm not imposing solution, just constructive suggestion!!!!!!
      • There are few files with <!DOCTYPE html> - 
        Are those valid xhtml??!
        if not, this would be nice to remove those! Just to have clean code!
    • option 2: script + manual changes for those who want to convert!
      I can write scripts if this is needed, but right now I'm trying to do some other stuff too...

I'll write short writeup ASAP and put it on our website....