Setting up SDL DXA .Net Web Application in local system

While having so much heard about SDL DXA (Digital Experience Accelerator) and being among one of the few community members, I decided to write this blog to walk you through (if you did not get chance to do so) the basic steps and set up we need to run the SDL DXA .Net Application working on your local system.

Please follow this steps to achieve that:

  • Make sure DXA publications are imported to CME. And you see 100, 200, 400 publications in Content Explorer.
  • Make sure Topology Manager is configured and localhost is set as one of the website in topology manager.
  • Download the DXA (SDL Digital Experience Accelerator .NET) from community site or from link given in SDL Docs Here
  • Extract the package and copy out SDL DXA .NET 1.5websrc contents to your choice of folder say D:SDLDXAWebappClientsrc
  • By default you will see severals dlls under srcSitebin folder.
  • Under srcSitebin, Create a folder config.
  • srcSitebinconfig should have following set of files:

1. cd_client_conf.xml

<?xml version="1.0" encoding="UTF-8"?>
 <ServiceConfig ConnectionTimeout="10000" CacheEnabled="true" CacheExpirationDuration="1" ServiceAvailabilityCheck="false">
 <DiscoveryService ServiceUri="https://<discovery_host_url>:8083/discovery.svc"/>
 <TokenService ClientId="cduser" ClientSecret="CDUserP@ssw0rd"/> </ServiceConfig>

Note: <discovery_host_url> can be localhost if you are setting up the webapp on the same server where discovery.svc is running or the host_url of the server. i.e something like – https://your-discovery-server:8083/discovery.svc

2. cd_ambient_conf.xml

Use default file came with DXA WebApp under SDL DXA .NET 1.5webweb8web-refconfig

3. logback.xml

Use this to set your Logs rules. You can set your log location in web.config as well but do remember that log location set in web.config will override the location set in logback.xml

4. Web.config

 <appSettings>
 <!-- SDL Web 8 CDaaS configuration settings: -->
 <add key="discovery-service-uri" value="https://your-discovery-server:8083/discovery.svc" />
 .
 .
 <add key="log-output" value="C:Tridionlogstoshibastagingcd_client.log" />
 <!-- CIL caching can be enabled on Staging; CIL 8.1.1+ will bypass the cache for XPM Session Preview. The service-caching-expiration setting is in seconds. -->
 .
 .
 <add key="oauth-enabled" value="true" /> <!-- toggled from false to True -->
 <add key="oauth-client-id" value="cduser" />
 <add key="oauth-client-secret" value="CDUserP@ssw0rd" /> <!-- "CDUserP@ssw0rd" is nothing but the "ClientSecret" value of <TokenService ClientId="cduser" ClientSecret="bla bla bla"/> of cd_client_conf.xml file. -->
 </appSettings>
  • Make sure port 8083 is open for you so that you can use discovery service.
  • Set localhost website in topology manager to use that locally in local computer
Hint: set-ttmwebsite -Id Website2 -BaseUrls @("https://your-cd-pres-server.dev.tridion.com", "http://localhost:60585")
 Note: Port is what you set or got by default while running the webapp using visual studio.
  • Since you have setup everything locally to start debugging your DXA site, you need to publish minimal pages to see your site running.
  • Publish below pages to the target you want to test against. To publish the minimal set of items, select and publish the following Pages in turn:
 Home/_Error Page Not Found
 Home/_Navigation
 Home/000 Home
 Home/Sitemap
 Home/_System/Publish Settings
 Home/_System/Publish HTML Design
 Home/_System/include/Content Tools
 Home/_System/include/Footer
 Home/_System/include/Header
 Home/_System/include/Left Navigation
  •  Run “DxaWebApp.sln” using visual studio. Build solution so that all the NuGet packages can be restored.
  • Hit rebuild solution and Run the DXA site application and you will see the page at http://localhost:60585/

Dxa localhost

  • That’s it. Everything is set up now. Enjoy 🙂

 

If you still need help, Please post your question on Tridion Stack Exchange (Trex)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s