More in this section

Forums / Developing with Sitefinity / Project structure with stand alone applications

Project structure with stand alone applications

8 posts, 0 answered
  1. Jamie
    Jamie avatar
    25 posts
    Registered:
    07 Aug 2012
    08 Oct 2008
    Link to this post
    I need some help deciding on the best way to structure my Sitefinity project. My overall vision is that our web site will use Sitefinity as the CMS but also include many stand-alone ASP.NET projects. For example, our public facing site will be managed by Marketing using CMS. The site will include stand-alone applications for requesting quotes, tracking orders, etc. that will only be visible to authorized users. Each of these apps will probably be a single ASP.NET solution. I would like to use Sitefinity's security features to restrict the stand-alone apps so that administration is centralized (single sign on), as well as to access images and other shared content.

    I started by grouping the stand-alone applications as page groups in Sitefinity but I am concerned about deployment. The stand-alone apps will need to be promoted through test and QA environments before going live.

    How should I structure this in Sitefinity?
  2. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    08 Oct 2008
    Link to this post
    Hello Jamie,

    Thanks for contacting us.

    I believe the best solutions is breaking the application down into user controls and making a secured intra-site module. This would support the following features:
    • Only select users have access to the stand-alone application
    • Only one sign-on is needed for the module, since it would be located in the Sitefinity modules tab
    • The module will have a consistent look of all the other modules, such as being integrated within Sitefinity and appearing in the toolbox as a list of user controls
    • By using an ORM such as LINQ, you can ensure that your application is protected from SQL injection attacks because the ORM uses parameterized queries
    I hope that this provides a solution to your technical issue. Feel free to contact us if you have any questions.

    All the best,
    Joe
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Jamie
    Jamie avatar
    25 posts
    Registered:
    07 Aug 2012
    08 Oct 2008
    Link to this post
    • Thanks for the reply, Joe. I have done some reading and modules sound like a strong possibility but I still have some concerns:
    • - The current design of the first (of many) applications as an ASP.NET project consists of 12 pages and 30 user controls. I'm not sure if I can/want to refactor it to use only user controls which appears to be a requirement for a module.
    • - The applications must be under source control, ideally as stand-alone projects. This leads me to believe that I should be looking at pluggable modules.

    I can see some advantages to using modules, including some possible re-use of their user controls. Would this scenario be possible: I create an OrderStatus module that contains a user control, among others, that displayed pending orders for customer. Could I display just the pending orders control from the module on a dashboard page?

    Thanks again, Jamie

  4. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    09 Oct 2008
    Link to this post
    you can add your existing pages into sitefinity as external pages. they will be linked to and included in the sitefinity system, but you cannot edit them in the sitefinity editor. If you want to be able to edit pages in the sitefinity editor, I am fairly certain that you will have to refactor your code into user controls.

    intra site modules are developed as user controls as well, the only difference is that the administration side of the module (such as adding items, changing descriptions) is done within the sitefinity administration section (as opposed to a custom admin section with its own login). pluggable modules would probably be the best approach if you want to use source control, although if you dont need the sitefinity admin integration, I would suggest you look at external pages as a possible option.

    our city site does this. most of our website is sitefinity pages, with all content either being dropped onto the page (such as blogsview, generic content, etc) or custom user controls dropped onto the page in a similar fashion .however we have a separate section that is part of the same domain, but all the logic is self-contained, so we just linked to each page as an external page, even though the pages are themselves physically located as a subfolder to the main site. I hope this makes sense, if not let me know and i'll give you more details.

    regarding your last question, yes if you make a control generic enough, there is nothing stopping you from reusing it anywhere on your site.

    hope that this was helpful in some way!
  5. Jamie
    Jamie avatar
    25 posts
    Registered:
    07 Aug 2012
    09 Oct 2008
    Link to this post
    That was helpful. After playing around with modules, I don't think they're the way to go for this project. I don't want to tightly couple my project to Sitefinity.

    The key point for me is to centralize user management, authentication, and authorization. I can set permissions on the external page so it appears that this solution may work. I will need to access the user's credentials from within my stand-alone application, any advice for that requirement?
  6. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    09 Oct 2008
    Link to this post
    since sitefinity uses the standard asp.net authorization and membership system, all you have to do is use that api to authenticate users. Be sure to use the correct provider. I believe the default provider is "Sitefinity".
  7. Jamie
    Jamie avatar
    25 posts
    Registered:
    07 Aug 2012
    09 Oct 2008
    Link to this post
    Thanks, but I'm unable to access the Sitefinity membership store. I've copied the connection string and membership sections to my ne project and added a references to Telerik.DataAccess.dll and System.Data.SqlClient. I'm able to hit a login page but after submitting I get a configuration error "Object reference not set to an instance of an object." that refers to the providers section.

    Is it possible to use the TelerikMembershipProvider outside of a Sitefinity site? If so, what am I missing?

    Thanks, Jamie
  8. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    17 Oct 2008
    Link to this post
    Hi Jamie,

    Yes, it is possible to use TelerikMembershipProvider outside of a Sitefinity. Probably you are missing some configuration settings in the web.config. Please make sure that you have the following configuration elements:
    <?xml version="1.0"?> 
    <configuration> 
      <configSections> 
        <sectionGroup name="telerik"
          <section name="dataAccess" type="Telerik.DataAccess.Configuration.SectionHandler, Telerik.DataAccess" requirePermission="false"/> 
          <section name="framework" type="Telerik.Framework.Configuration.SectionHandler, Telerik.Framework" requirePermission="false"/> 
        </sectionGroup> 
      </configSections> 
      <connectionStrings> 
        <add name="Sitefinity" connectionString="..." providerName="System.Data.SqlClient" /> 
      </connectionStrings> 
      <system.web> 
        <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity"
          <providers> 
            <clear /> 
            <add connectionStringName="DefaultConnection" applicationName="/" 
              name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" /> 
          </providers> 
        </roleManager> 
        <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType=""
          <providers> 
            <clear/> 
            <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> 
          </providers> 
        </membership> 
        <profile defaultProvider="Sitefinity"
          <providers> 
            <clear/> 
            <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/> 
          </providers> 
          <properties> 
            <add name="FirstName"/> 
            <add name="LastName"/> 
          </properties> 
        </profile> 
      </system.web> 
      <telerik> 
        <dataAccess defaultConnection="DefaultConnection"
          <connections> 
            <add name="DefaultConnection" driver="Nolics.ORMapper.DataProviders.SqlServer2005Provider" 
              connectionStringName="Sitefinity" /> 
          </connections> 
        </dataAccess> 
        <framework> 
          <caching defaultProvider="memoryCache"
            <providers> 
              <add name="memoryCache" type="Telerik.Caching.MemoryCachingProvider, Telerik.Framework" /> 
            </providers> 
            <cacheDependency mode="InMemory"/> 
          </caching> 
          <modules> 
          </modules> 
          <services> 
          </services> 
          <tools> 
          </tools> 
          <assemblies> 
          </assemblies> 
          <controlDesigners> 
          </controlDesigners> 
          <propertySelectors> 
          </propertySelectors> 
        </framework> 
      </telerik> 
    </configuration> 

    Also you should have the following assemblies in your bin folder:
    Telerik.DataAccess.dll
    Telerik.Framework.dll
    Nolics.Engine.v4.2.dll

    Hole this is helpful.

    Kind regards,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
8 posts, 0 answered