Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@ This project sets up a "homepage" that lists the Aras Innovator instances instal

Release | Notes
--------|--------
[v1.1.0](https://github.com/ArasLabs/aras-homepage/releases/tag/v1.1.0) | Added ability to populate instance list from IIS instead of folder.
[v1.0.0](https://github.com/ArasLabs/aras-homepage/releases/tag/v1.0.0) | First release. Tested on Internet Explorer, Edge, Firefox, Chrome.

#### Supported Aras Versions

Project | Aras
--------|------
[v1.1.0](https://github.com/ArasLabs/aras-homepage/releases/tag/v1.1.0) | All Aras Versions
[v1.0.0](https://github.com/ArasLabs/aras-homepage/releases/tag/v1.0.0) | All Aras Versions


## Installation

### Pre-requisites

This project requires you to have the IIS Management Service feature enabled. You can find this under the **Turn Windows Features on or off** dialog accessible through the Control Panel.

![IIS Management Service](./Screenshots/IIS_Management_Service.png)

### Install Steps

1. Download the aras-homepage project.
Expand All @@ -28,12 +36,6 @@ Project | Aras
<!-- Navbar content -->
<a class="navbar-brand" href="#">SERVER NAME</a>
```
5. Set the root variable to the folder where your Aras instances are installed.

```(html)
// path where Innovator instances are installed
string root = "C:\\Program Files (x86)\\Aras";
```

5. If there are any subfolders you don't want listed in the table, add them to the skip list.

Expand Down Expand Up @@ -75,6 +77,26 @@ Project | Aras

9. Save the `default.aspx` file.

### IIS Setup

This project queries IIS to get a list of the applications it should use to populate the links on the homepage. To avoid a permissions error, you'll need to configure IIS to use Windows Authentation with your user instead of the default IIS user.

1. Open the IIS Manager
2. In the Connections tree on the left, select **Default Web Site > home**
3. Select **Authentication** in the features view

![IIS Authentication Menu](./Screenshots/IIS_Authentication.png)

4. Set the Authentication as follows:
1. Anonymous Authentication : **Disabled**
2. ASP.NET Impersonation : **Enabled**
3. Forms Authentication : **Disabled**
4. Windows Authentication : **Enabled**

![IIS Authentication Features](./Screenshots/Enable_Windows_Authentication.png);

> Note: With the move towards a Windows authenticated user, you may be prompted for your Windows credentials upon accessing this home page for the first time. This happend when I tested in FireFox and Edge, but did not happen when I tested in Chrome. If you keep the browser session open, you should only need to enter these credentials a single time.

## Usage

![Screenshot](./Screenshots/screenshot.gif)
Expand All @@ -96,7 +118,9 @@ For more information on contributing to this project, another Aras Labs project,

## Credits

Created by Eli Donahue.
Created by Eli Donahue.

Modified by Christopher Gillis.

Project inspired by George J. Carrette.

Expand Down
Binary file added Screenshots/Enable_Windows_Authentication.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/IIS_Authentication.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/IIS_Management_Service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions home/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ tbody tr:hover {
.column1 {
width: 200px;
padding-left: 40px;
max-width: 200px;
word-wrap: break-word;
}

.column2 {
Expand Down
63 changes: 42 additions & 21 deletions home/default.aspx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<%@ Page Language="c#" %>
<%@ Import namespace="System.IO"%>
<%@ Import namespace="System.Security.Principal"%>
<%@ Import namespace="Microsoft.Web.Administration"%>
<!DOCTYPE html>
<html lang="en">

Expand Down Expand Up @@ -66,7 +68,7 @@
Dictionary<string,string> links = new Dictionary<string,string>();
links["MyInnovator"] = "https://MyInnovator.com/";
links["GitHub"] = "https://github.com/";
links["Labs Blog"] = "http://community.aras.com/en/category/technique/aras-labs/";
links["Labs Blog"] = "https://community.aras.com/aras-labs/";

foreach (KeyValuePair<string,string> link in links)
{
Expand All @@ -92,28 +94,47 @@
</thead>
<tbody>
<%
// path where Innovator instances are installed
string root = "C:\\Program Files (x86)\\Aras";

// create a list of folder names you don't want listed
List<string> skip = new List<string>();
skip.Add("Aras Update");

foreach (string file_name in Directory.GetDirectories(root))
{
string subfoldername = file_name.Substring(root.Length+1);
if (!skip.Contains(subfoldername))
using (WindowsIdentity.GetCurrent().Impersonate())
{
// Get all of the Innovator applications from IIS
using (Microsoft.Web.Administration.ServerManager sm = new Microsoft.Web.Administration.ServerManager())
{
string row = "<tr class='table100-head'>";
row += "<td class='column1'><a href='../";
row += subfoldername + "/' target='_new'>";
row += subfoldername + "</a></td><td class='column2'><a href='../";
row += subfoldername + "/Client/Scripts/nash.aspx' target='_new'>";
row += "Run Nash" + "</a></td>" + "<td class='column3'><a href='../";
row += subfoldername + "/?username=admin' target='_new'>";
row += "Login as Admin" + "</a></td>" + "</tr>";
foreach (var site in sm.Sites)
{
// We're using nested loops, but we're also expecting a small number of Sites
// (typically only Default Web Site) so it's fine
foreach(var app in site.Applications)
{
// Get the root virtual directory (i.e. not the Client, Server, Vault, etc.)
string physicalPath = app.VirtualDirectories["/"].PhysicalPath;
bool isInnovatorApplication = physicalPath.Trim('\\').EndsWith("Innovator");

// Add all of our Innovator applications to a table for easy access
if (isInnovatorApplication)
{
string appName = app.Path.Substring(1);
string appPath = ".." + app.Path;
string nashPath = appPath + "/Client/Scripts/nash.aspx";
string adminPath = appPath + "/?username=admin";

string row = "" +
"<tr class='table100-head'>" +
" <td class='column1'>" +
" <a href='{0}' target='_new'>{3}</a>" +
" </td>" +
" <td class='column2'>" +
" <a href='{1}' target='_new'>Run Nash</a>" +
" </td>" +
" <td class='column3'>" +
" <a href='{2}' target='_new'>Login as Admin</a>" +
" </td>" +
"</tr>";
row = string.Format(row, appPath, nashPath, adminPath, appName);

Response.Write(row);
Response.Write(row);
}
}
}
}
}
%>
Expand Down
11 changes: 11 additions & 0 deletions home/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<compilation defaultLanguage="c#">
<assemblies>
<add assembly="Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</assemblies>
</compilation>
<identity impersonate="true" password="" userName="" />
</system.web>
</configuration>