Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Saturday, August 07, 2010

Makes it easier to deploy in VS2010 (using web.debug.config and web.release.config)

From the instructions here:

http://www.sitefinity.com/devnet/forums/sitefinity-3-x/set-up-installation/installing-sitefinity-as-a-web-application-in-visual-studio.aspx

The biggest part is that SiteFinity uses User Profiles which are not available at design time in a web application (therefore it doesn’t compile).  To get around this we use the Web Profile Builder, which is a wrapper class which acts as a workaround.

This was the only code I had issue with:

//ProfileCommon profile = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true);

WebProfile profile = new WebProfile(WebProfile.Create(CreateUserWizard1.UserName, true));
 
Then we convert to a Web Application.  The major difference is that in web sites each page has its code-behind compiled into a seperate library, whereas in a web application all code behind gets compiled into a single library.

There is a secondary file too called yourpage.aspx.designer.cs which moves all of the control declarations into it (a partial class).  This allows VS2k5, 2k8, 2010 to generate code without dumping into the main .cs class, and allows the class access to the controls on the page.

Used FileZilla and it all works.  Now, next post on VS2010 publishing / deploying!

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview