Oshyn Home Page
  • expertise
    • Overview
    • Contact Us |
    • Latest work: www.miramax.com
  • solutions
    • Overview
    • Content Management
      • Common Issues
      • Choosing a CMS
      • Training
      • Drupal Development
      • Jahia Integration
      • Sitecore Consulting
      • Open Text Web Solutions RedDot CMS
      • EPiServer CMS Consulting
    • E-commerce
    • SOA
    • Portals & Collaboration
    • Web Strategy
    • Mobile Platforms
    • Social Media
    • Contact Us |
    • Latest work: www.miramax.com
  • work
    • Overview
    • Client Quotes
    • Contact Us |
    • Latest work: www.websense.com
  • resources
    • Overview
    • News & Events
    • Newsletters
    • Blog
    • White Papers
    • Success Stories
    • Press Kit
    • Contact Us |
    • Latest work: www.disneydvd.com
  • partners
    • Overview
    • Agency Partner Program
    • Technology Partners
    • Contact Us |
    • Latest work: www.nea.org
  • company
    • Overview
    • Contact
    • Careers
    • Leadership Team
    • News & Events
    • Social Responsibility
    • Contact Us |
    • Latest work: www.icon4x4.com
Creating an EPiServer VB Site from Visual Studio
  • Tweet
Wednesday, January 27, 2010  /   Diego Vergara Diego Vergara
close

Diego Vergara


Diego is a Senior Developer at Oshyn.

Creating an EPiServer VB Site from Visual Studio

Along with EPiServer CMS comes the integration with Visual Studio, this module provide us pre-build structure to create a clean site from the IDE.  However, we have a small limitation that this module just works with C#, and even thought most people will be fine with it, there are some cases where the client requirement is to build the templates on Visual Basic.  Well, even though we all will think what a lazy job to find the way to make everything work on Visual Basic, I would like to pass along the news that it isn’t hard once you know what to do.


So let's start by describing each step:

1.    Let's create a basic C# EPiServer Project:  Go to File, New Project, select the project type C# and the EPiServer Project.  This will create a clean EPiServer Project with all the needed components.

2.    Create a common ASP.Net Web Application with the similar steps as above but just selecting an ASP.Net application under the project type Visual Basic.

3.    Once we have the two projects let's copy some of the C# project files to the Visual Basic project.
The folders with all the files inside we will copy are:  Folder App_Browsers, App_Data, bin, lang, Web Services.  Then we will also copy the following files from the root folder of the project:  ApplicationInitializing, connectionString, EPiServerLog, FileSummary, Global and the Web config.

4.    Having all the file structure, now let's open the two projects.  On the Web Config of the Visual Basic Project we need to find the following line of code:

<compilation defaultLanguage="c#" debug="true" />

Replace the default language parameter from c# to vb.  

Here we have to very carefull,  on that config file we will also fine the lines:

<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">

This lines are for code that will be compiled at runtime and that code will still be in c# so we must keep the c#; cs; csharp parameters

5.    Now we have to look for the port that our application is going to use, usually is 6666 and you can see on the lines of the web config file:

<sites>
<site siteId="unknown" description="Example Site">
<siteSettings categoryId="1" enableScheduler="true" enableEvents="true" enableRemoteEvents="false" errorMailHandler="~/util/SendErrorReport.aspx" globalErrorHandling="RemoteOnly" globalErrorMail="" httpCacheExpiration="0:0:0" httpCacheability="Public" httpCacheVaryByCustom="path" httpCacheVaryByParams="id,epslanguage" indexingDelayAfterPublish="0:0:20" indexingTextRegExp="[\p{N}\p{L}]{1}[\p{N}\p{L}-\._]*[\p{N}\p{L}]{1}" logServiceUrl="soap.tcp://localhost/TimeSpanAnalyzerView" mirroringFileWriteRetryDelay="0:0:5" mirroringHtmlTextEncoding="" mirroringRetries="5" mirroringRetryDelay="0:0:1" pageCacheSlidingExpiration="12:0:0" pageFolderVirtualPathProvider="SitePageFiles" pageOfficeStartId="0" pageRootId="1" pageUseBrowserLanguagePreferences="false" pageValidateTemplate="false" pageWastebasketId="2" remoteCacheListenerShortNames="" remotePageCacheSlidingExpiration="2:0:0" remoteWebServiceCulture="0" sgmlParserDecodeCharEntities="false" stringCompressionThreshold="0" stringDelayedLoadThreshold="0" subscriptionHandler="EPiServer.Personalization.SubscriptionMail,EPiServer" uiDefaultPanelTab="0" uiEditorColors="" uiEditorCssPaths="" uiEditorHeight="250" uiEditorValueOptions="0" uiEditorWidth="500" uiImageTransparencyReplacement="White" uiKeepUserLoggedOn="true" uiMaxVersions="0" uiOptimizeTreeForSpeed="false" uiSafeHtmlTags="b,i,u,br" uiShowGlobalizationUserInterface="true" uiTheme="" uiVersionMerging="true" urlRewriteExtension="" urlRebaseKind="ToRootRelative" operationCompatibility="None" pageStartId="1" siteDisplayName="EPiServerVb" siteUrl="http://localhost:6666/EPiServerVb/" uiUrl="http://localhost:6666/EPiServerVb/ui/" utilUrl="http://localhost:6666/EPiServerVb/util/" />
</site>
</sites>

On the last lines you can see the site URL, uiUrl and utilUrl, this port is where our application has to work, so to make sure of it, go to the Solution Explorer and right-click on the project and select properties.  On the properties let's go to the Web Tab and select Use Visual Studio Development Server and select the specific port option.  Here we must set the port equals as the port we have on the web comfit (in this case 6666), then look at the Virtual path - it should be EPiServerVb.




6.    Finally to finish the configuration of the site we have to add the References. Go to the Solution Explorer, right-click the project and select Add Reference.

On the newly appearing window go to the Browse tab, then the bin folder and select all the .dll files there. Once the reference is done, on the Solution Explorer go to the Reference Folder, select all the new references and on the properties select the Local Copy as true.

7.    Now that we have the site configured and ready to run, let's modify the default page so it will work.  

The code behind of the Default.aspx page should be as:

Imports System.Collections.Generic
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports EPiServer
Imports EPiServer.Core
Imports EPiServer.DataAbstraction
Imports EPiServer.Web.WebControls


Partial Public Class _Default

Inherits EPiServer.TemplatePage

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

End Class

Here we are importing the EPiServer Libraries and Inheriting the page from the Template Page.  

Additionally on the Default.aspx, let's add any html text code so we will have some content, a hello world will work just fine for now.

8.    Finally, we just need to set the Users and Roles.  On the Solution Explorer click the Project and go the ASP.NET Configuration, the icon is ,   this will open the Site Administration Tool.
On this tool, select the Provider Tab and the options SqlServerMembershipProvider and SqlServerRoleProvider.
Then on the Security tab create the following roles:  Administrators and WebAdmins
Finally create a user with the Administrators role.

9.    Run the application; you should see the default page at http://localhost:6666/EPiServerVb/Default.aspx.  Now let's enter the Admin console of the CMS by going to http://localhost:6666/EPiServerVb/util/login.aspx, log in with the user you created and then go back to the http://localhost:6666/EPiServerVb/Default.aspx.  Now right click on the text you created and you will see the options to enter the CMS Console just like a C# Project.

10.    Now that the site is running you can create templates and Page Types.  Just one last Note, when you create a Page Type you have to define the path of the template as /EPiserverVb/TemplatePage.aspx because the application is running under the virtual path EPiServerVb.
  • Share
  • Facebook    0
  • Twitter    0
Trackback Link
http://www.oshyn.com/BlogRetrieve.aspx?BlogID=1907&PostID=116094&A=Trackback
Trackbacks
Post has no trackbacks.

blog comments powered by Disqus

Pages: Previous Next

TwitterFacebookLinkedIn

Blog Authors

Christian Burne Christian Burne
question button image

 



Captcha Image

question button image
Subscribe Subscribe Subscribe Subscribe Subscribe
OTHER CATEGORIES
  • ALL

  • General

  • Web Content Management

  • Sitecore CMS

  • Open Text

  • Jahia

  • Drupal

  • EpiServer

  • SOA

  • Social Media and Mobile

  • Software Development

  • Visit Bloggers Profiles

RELATED POSTS
  • OpenText Management Server 10: Navigation Manager Design
  • OpenText Management Server and Delivery Server 10: Access Content Elements of Different Pages
  • 10 Reasons Why a CMS is Important to Your Business
  • Oshyn's Top 10 Favorite Posts from 2011
  • SaaS WCM TCO Comparisons are Premature
  • Using Sitecore WebControl to Customize Google Calendar Reminder Button
  • Oshyn's Review of the 2011 Gartner Magic Quadrant
  • Agile Project Management Using JIRA and Greenhopper
  • Content in OpenText Delivery Server & Moderation in Management Server
  • Storing Sitecore Media Assets - Database or File System

WHITE PAPERS
    ajax rotator

    Web Content Management, Social Media, Content: Three Kings for Your Website Web Content Management, Social Media, Content: Three Kings for Your Website (846 KB)
    Companies pursuing online marketing success, including Social Media, can increase the power of their online presence with right strategy and technology to maximize online visibility and engagement. Download this FREE white paper on the WCM, Social Media, and Content triad.

    Drupal Performance Tuning Drupal Performance Tuning (1213 KB)
    In this Free White Paper Oshyn evaluates Drupal Performance Tuning, sharing the results of testing response time and Requests Per Second (RPS) that a server can hold before the response rate becomes unacceptable. In this paper you will learn about optimizing performance of a website through changes to settings and the server.

    Enterprise Drupal: Social Media, Mobile, and Rich Media in your Website Enterprise Drupal: Social Media, Mobile, and Rich Media in your Website (1015 KB)
    In this free WCM white paper, Oshyn examines advanced Drupal capabilities: Multisite Environment, Access Control and Security, Enhanced User Profiles, Custom Breadcrumbs, Mobile Support, Podcasts, Advanced Multimedia, Locations and Maps, Internationalization and Locale based content, Events and Scheduled Tasks, Rules Actions and E-Commerce Solutions.

    Drupal Multilingual Drupal Multilingual (636 KB)
    There are several multilingual installation methods for Drupal. In this free white paper Oshyn evaluates and recommends several methods of using Drupal Open Source CMS to manage websites in multiple languages.

    Drupal Social Media Drupal Social Media (1297 KB)
    Looking for an Open Source CMS to for “Social Media Optimization” of your website? Download this free white paper, “Drupal and Social Media”, to learn about the extensive Social Media this Open Source CMS offers to create a dynamic and engaging website and online community.

    Drupal Multisite Options Drupal Multisite Options (427 KB)
    There are several multisite installation methods for Drupal. In this free white paper Oshyn evaluates and recommends several methods of using Drupal Open Source CMS to manage multiple sites.

    Open Source CMS: Is It Right for your Organization Open Source CMS: Is It Right for your Organization (496 KB)
    In this free white paper, “Open Source CMS: Is It Right for your Organization?” we share an in-depth look at the pros and cons of using Open Source Content Management Systems (CMS) or Open Source Web Content Management (WCM) platforms. Oshyn helps clients select CMS/WCM solutions based on the specific requirements of each client.

    Affiliate Content Sharing in a CMS/WCM World Affiliate Content Sharing in a CMS/WCM World (273 KB)
    The Content Editors at your company have created GREAT content! Now how do you share it? In this Free white paper learn several methods for using a Content Syndication tool to automatically repurpose content and how Content Sharing can generate business value.

    Sitecore and Social Media - An Interactive Web Content Management Platform Sitecore and Social Media - An Interactive Web Content Management Platform (898 KB)
    Social Media has revolutionized how people interact with business. In this white paper Oshyn’s Lead Sitecore Developer, Prasanth Nittala, discusses key points from the perspectives of marketing and Web development that make Sitecore a compelling choice for engaging in Social Media via your website. This Sitecore white paper draws from Oshyn’s expertise as a certified Sitecore partner, helping organizations understand the distinct capabilities offered by Sitecore CMS.

    The Business Case for Leveraging Open Text Web Solutions Delivery Manager The Business Case for Leveraging Open Text Web Solutions Delivery Manager (451 KB)
    This free white paper explores the evolving needs of small and medium size businesses and explains how the Open Text Web Solutions Delivery Manager (formerly RedDot LiveServer) can help businesses build their brand, reputation, and client base. This white paper examines strategies, key points and tips to leverage the features available in Open Text Web Solutions (RedDot CMS) to achieve an impactful user experience and to maximize visitor engagement through a reliable and powerful implementation.

    Open Text Best Practices: Part One Open Text Best Practices: Part One (763 KB)
    Authored by Oshyn Senior Consultant, Adaeze Okorie, this free CMS white paper draws from Oshyn’s vast experience as an Open Text Certified Partner, in helping organizations define strategies to meet business goals while implementing Open Text Web Solutions (RedDot CMS). Specifically in this free white paper Adaeze Okorie discusses strategies, key points and tips to leverage the features available in Open Text Web Solutions (RedDot CMS) to achieve an effective, reliable and robust implementation.

    Improving the ROI of Business Software: Service Oriented Architecture from a Business Perspective Improving the ROI of Business Software: Service Oriented Architecture from a Business Perspective (398 KB)
    Software selection and technology decision making should no longer be left to the IT department alone. By gaining an understanding of Service-Oriented Architecture, business people outside of the IT department will be better positioned to maximize the ROI of the company's technology platforms. Download this free white paper to learn more.

    Getting Over Social Media Marketing Paralysis for B2B Getting Over Social Media Marketing Paralysis for B2B (2254 KB)
    Many companies are well aware that Social Media has become critically important to engaging audiences and promoting online "presence" while some wonder how to approach their C-level executives and prove that it is not all hype. With so many ways to engage in Social Media, how can they get buy-in and begin execution with so many different venues and tools available? Staying on the sidelines and becoming a latecomer might make it more difficult to create a convincing "social" presence. Put the ove

    Performance Tuning Open Text Web Solutions Management Server and Delivery Server Performance Tuning Open Text Web Solutions Management Server and Delivery Server (235 KB)
    If you've made an investment in Open Text Web Solutions (formerly RedDot) Web Content Management products, you’ve undoubtedly experienced performance issues. While every CMS requires tuning, Open Text Web Solutions - RedDot is especially susceptible to mis-configuration and poor performance as the out-of-the-box installation comes untuned and ready for Development Environments only. In this FREE white paper we share performance tuning expertise as an Open Text Certified Partner that has optimize

    The Business Case for Leveraging Open Text Web Solutions Within Higher Education The Business Case for Leveraging Open Text Web Solutions Within Higher Education (430 KB)
    Academic institutions have a long reputation for being slower to adopt new technologies for their audiences. However, many schools are taking serious steps in improving the online experience they are providing. This white paper explores the unique needs of the higher education market, applying new tools & trends and specifically how the Open Text Web Solutions’ Delivery Manager (formerly known as RedDot LiveServer) can be leveraged to achieve those goals.

    SEO Best Practices within a Content Management System SEO Best Practices within a Content Management System (712 KB)
    In this free white paper, we share Search Engine Optimization (SEO) tips and best practices to follow when implementing a Content Management System (CMS). Certain features and functionality will help your content editors make website changes faster while minimizing the risk of human error. Download this free white paper to learn strategies to improve search engine rankings.

    Best Practices for Sitecore CMS Best Practices for Sitecore CMS (1121 KB)
    Sitecore CMS is an extensive Web Content Management (WCM) platform for the mid-market. It offers reduced IT expenditures, a streamlined content lifecycle, and a return of content control to the subject matter experts. The newest incarnation of Sitecore CMS version 6.0 is a mature product that incorporates standard social media components such as wikis, blogs, RSS syndication and “e-mail a friend” features.

    Optimizing SEO in your CMS (WCM) Optimizing SEO in your CMS (WCM) (3108 KB)
    Oshyn's Christian Burne spoke in depth about SEO in CMS at the Gilbane San Francisco Conference on June 3rd, 2009. Christian discussed the pressues of keyword competition and how the CMS can add tremendous power to climbing Google SERPs and other search engine rankings. The presentation was later part of a featured article on CMSWire. We've made the presentation available in PDF format. Download now to learn more about strategies for using your CMS to optimize SEO.

    The Best CMS for You: Tips on How to Select Your Next CMS The Best CMS for You: Tips on How to Select Your Next CMS (909 KB)
    As websites continue to grow in size, features and functionality, the visitors to these websites are also becoming more demanding and have higher expectations than ever before. Companies who committed valuable time and resources to web strategies just five years ago are finding they must re-evaluate and explore new options as their content, features and online offerings must keep pace with the constant and rapid movement in the digital marketplace. For many of these companies, there is a strong.

    Oshyn Sample Voluntary Product Accessibility Template (VPAT) Oshyn Sample Voluntary Product Accessibility Template (VPAT) (741 KB)
    Section 508 requires that when federal government and agencies procure, develop, and maintain or use electronic and information technology (EIT), they must ensure that it is accessible and in compliance with Section 508 standards developed by the Architectural and Transportation Barriers Compliance Board (Access Board). Oshyn understands these requirements and has delivered reports like these countless times.

    Sitecore CMS Implementation Best Practices Sitecore CMS Implementation Best Practices (481 KB)

    TwitterFacebookLinkedInAlltopFeatured in Alltop
    Oshyn, Inc.17785 Center Court Drive N Cerritos, CA 90703    1.888.483.1770 newbusiness@oshyn.com
    2012 Copyright Oshyn. All rights reserved.
    • View Mobile Version
    • Terms of Use
    • Privacy Policy
    • Contact Us