Oqtane Blog

The Oqtane Blog is the official communication channel for Oqtane.  Keep up to date with the latest project information. Share your feedback and insights with the community. Guest bloggers are welcome!

Text/HTML

Installing Oqtane on IIS

It is possible to install Oqtane without using Visual Studio. However in order to do this you need to become familiar with the specifics of hosting a Blazor application. In this article we will install an Oqtane release locally on a Windows 10 machine using IIS.

Step 1 - Install IIS

- *Note: even if you have IIS already installed you will want to ensure the appropriate options are enabled/disabled
- Use the search icon next to your Windows Start button to search for "Turn Windows features on or off"
- Scroll down to Internet Information Services and enable it ( this will enable the default options for IIS )
- Expand the Internet Information Services option ( using [+] ) and scroll down to World Wide Web Services and expand it as well
- Within Application Development Features make sure that WebSocket Protocol is enabled ( this is needed for SignalR )
- Within Common HTTP Features make sure WebDAV Publishing is disabled ( if it is enabled it will conflict with Blazor )
- click Ok to complete the installation

Step 2 - Install Url Rewrite Module

- Navigate to https://www.iis.net/downloads/microsoft/url-rewrite
- Download and install

Step 3 - Install .NET Core Hosting Bundle

- Navigate to https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer
- Download and install ( note that the current .NET Core version is 3.1 )
- Restart your machine

Step 4 - Install LocalDB

- *Note: this step is only required if you do not have access to SQL Server or want to use a locally installed database. If you have Visual Studio installed you can also install LocalDB by choosing the .NET Desktop Development workload in the Visual Studio installer.
- Navigate to https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
- choose Express Advanced or the LocalDB package in order to install LocalDB

Step 5 - Install Oqtane

- Download the latest Install package from https://github.com/oqtane/oqtane.framework/releases ( ie. Oqtane.Framework.1.0.1_Install.zip )
- Extract the files to a directory where you plan to host your application

Step 6 - Configure IIS App Pool

- Use the search icon next to your Windows Start button to search for "Internet Information Services (IIS) Manager"
- expand the top node identifying your machine in the left-hand pane
- right-click on Application Pools and select "Add Application Pool"
- provide a Name for the application pool ( ie "oqtane" )
- for .NET CLR version specify No Managed Code
- click Ok
- in the main Application Pools pane select the pool you just created
- in the right-hand Actions pane select the Advanced Settings option
- scroll down to Process Model and find the Identity option
- set the Identity to "LocalSystem" ( this provides the necessary permission for IIS to interact with the file system and LocalDB )

Step 7 - Configure IIS Website

- in Internet Information Services in the left-hand pane right-click on Sites and select "Add Website"
- provide a name ( ie. "oqtane" ) and use the Select... button to choose the Application Pool you created above
- specify the path to the root directory where you extracted the Oqtane files earlier
- specify a Host name ( ie. "oqtane.dev" )

Step 8 - Add a Host entry

- Use the search icon next to your Windows Start button to search for "Notepad" and right-click the entry in the Best Match results and choose Run As Administrator
- choose File / Open and navigate to C:\Windows\System32\drivers\etc
- add an entry to the file for the host name you created in the previous step and map it to 127.0.0.1 ( ie. 127.0.0.1 oqtane.dev )
- choose File / Save

Step 9 - Navigate to Site

- open your favorite browser ( ie. Firefox Developer Edition ) and navigate to the host name you created above ( ie. oqtane.dev )
- the Oqtane install wizard should be displayed
- enter your database connection details ( if you are using LocalDB then you can simply accept the default settings )
- enter your site administrator password and email - click Install

About the Author

Shaun Walker is the original creator of Oqtane and DotNetNuke, Web Application Frameworks for ASP.NET which have spawned the largest and most successful Open Source community projects native to the Microsoft platform. He has 25+ years professional experience in architecting and implementing enterprise software solutions for private and public organizations. Based on his significant community contributions he has been recognized as a Microsoft Most Valuable Professional (MVP) as well as an ASPInsider for over 10 consecutive years. He was recognized by Business In Vancouver in 2011 as a leading entrepreneur in their Forty Under 40 business awards, and is currently the Chairman of the Advisory Council for Microsoft's .NET Foundation. Shaun is currently a Technical Director and Enterprise Guildmaster at Softvision.

What Do You Think?



Comments are closed.