Can't find Custom Error pages in sitefinity - sitefinity

when i navigate to Administration » Settings » Advanced and expand Pages but i don't find the custom error page

Here is a link to the full documentation: https://www.progress.com/documentation/sitefinity-cms/administration-custom-error-pages
Additionally this feature is only avalailable in version 12.2 and higher as pointed out in the comment.

go to the web.config file in ur code and inside the under the tag closed add this
<customErrors mode="RemoteOnly">
<error statusCode="500" redirect="~/error-pages/generic-error-page" />
<error statusCode="404" redirect="~/error-pages/file-not-found" />
<error statusCode="403" redirect="~/error-pages/no-access" />
</customErrors>
Create the pages in sitefinity pages

Related

Multi-App Kiosk mode provisioning failure code '0xC00CE223'

I'm trying to put in place a kiosk on a Surface Go using the following AssignedAccess.xml file in my provisioning package:
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="https://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:r1809="https://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{f46cfb9f-044f-4d96-bb33-ea1c1c18a354}">
<AllAppsList>
<AllowedApps>
<App AppUserModelId="Microsoft.Windows.Explorer" r1809:AutoLaunch="true" />
<App AppUserModelId="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<App DesktopAppPath="C:\Program Files\SumatraPDF\SumatraPDF.exe" />
</AllowedApps>
</AllAppsList>
<r1809:FileExplorerNamespaceRestrictions>
<r1809:AllowedNamespace Name="Downloads" />
</r1809:FileExplorerNamespaceRestrictions>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Apps">
<start:Tile Size="4x2" Column="0" Row="2" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\SumatraPDF.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="false" />
</Profile>
</Profiles>
<Configs>
<Config>
<Account>CouncilKiosk</Account>
<DefaultProfile Id="{f46cfb9f-044f-4d96-bb33-ea1c1c18a354}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I took a look at the logs and the consensus seems to be this error code '0xC00CE223'. According to my research this is telling me that "Validate failed because the document does not contain exactly one root node." (XML DOM Error Messages Doc) I'm not sure where this is going wrong.
The provisioning package is also setting 2 user accounts (local admin and local user), hiding OOBE, enabling tablet mode as default, and running a provisioning command script that installs a single application and sets registry keys necessary for autologin.
UPDATE: I re-imaged the Surface Go with Windows 10 Pro and it still fails. But now I get an error '0x8000FFFF' which appears to be related to windows update and the windows store. I only have 1 USB port on this thing so it isn't connected to the internet at this time.
UPDATE 2: I re-imaged with a more up to date ISO of 10 Pro and I'm back to the original errors listed in the above post. I have updated the XML file and changed the tag as well as the xmlns from rs5 to r1809. I am not seeing any changes and this continues to be a frustrating problem to have.
Test to change this:
https://schemas.microsoft.com/AssignedAccess/2017/config
to the following:
http://schemas.microsoft.com/AssignedAccess/2017/config

Set web.config transform in Asp.NET Core

I've just came across with problem of web.config transformation in asp.net core.
There are two files: base web.config and web.prod-zone-a.config. My aim is to use transformation inside web.prod-zone-a.config when publishing my project.
I have the following "prod-zone-a" configuration settings in .csproj:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'prod-zone-a|AnyCPU' ">
<IntermediateOutputPath>obj\Debug\netcoreapp1.1</IntermediateOutputPath>
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<DefineConstants>TRACE;DEBUG;NETCOREAPP1_1</DefineConstants>
<Configuration>prod-zone-a</Configuration>
</PropertyGroup>
web.prod-zone-a.config looks like:
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore>
<environmentVariables xdt:Transform="Replace">
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="prod-zone-a" />
</environmentVariables>
</aspNetCore>
</system.webServer>
I tried to run publish by two commands:
dotnet msbuild /t:Publish /p:OutputPath=c:\delivery /p:Configuration=prod-zone-a
and
dotnet publish --configuration prod-zone-a --output c:\delivery
But no transformation applies to web.config on output - just the default value.
Do I miss something in configuration or command executing?
This worked for me:
Add web.release.config file to the project root.
In Visual Studio 2017, Publish using Web Deploy (make sure it is set to Release). Settings will automatically be picked up.
Sample transformation:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<aspNetCore>
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="PRODUCTION" xdt:Locator="Match(name)" xdt:Transform="SetAttributes" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</configuration>
Update: If you want to remove web.config.release file and others on publish, simply edit your .csproj file and add something like this:
<ItemGroup>
<Content Remove="appsettings.Development.json" />
<Content Remove="web.release.config" />
</ItemGroup>
<ItemGroup>
<None Include="appsettings.Development.json" />
<None Include="web.release.config" />
</ItemGroup>
There is a well-documented tool on github for xdt-transformations.
Also it doesn't depend on command, both of dotnet publish and dotnet msbuild works fine
With the latest version of dotnet cli (2.1.400 or greater), you can just set this msbuild property $(EnvironmentName) and publish tooling will take care of adding ASPNETCORE_ENVIRONMENT environmentVariable to the web.config with the specified environment name.
Also, XDT support is available starting 2.2.100-preview1.
Sample: https://github.com/vijayrkn/webconfigtransform/blob/master/README.md
IIS Web Deploy ASP.NET Core (2.1) in Visual Studio 2017 (VS2017)
First do this: (ref:https://github.com/nil4/dotnet-transform-xdt#-use-with-msbuildcsproj-tooling)
Install package - dotnet add package DotNet.Xdt --version 2.1.0
Modify .csproj - add package - refer github
Modify .csproj - add transform code (ApplyXdtConfigTransform) at the end - refer github
Add web.DEV_Server.config transfor file by right-clicking on DEV_Server.pubxml
Added following to web.DEV_Server.config
<environmentVariable xdt:Locator="Match(name)" name="ASPNETCORE_ENVIRONMENT" value="Development" xdt:Transform="SetAttributes" />
Modify DEV_Server.pubxml to modify following setting value.
<LastUsedBuildConfiguration>DEV_Server</LastUsedBuildConfiguration>
Validate Connection & Publish
Deploy still uploads other config files, not sure how to stop that.
Following on from user1820686's answer above:
The github page misses out some of the steps required to add this for MSBuild/csproj tooling:
You need to open a command prompt in your project directory and run
dotnet add myProj.csproj package Microsoft.DotNet.Xdt.Tools --version 2.0.0
Then you need to open the csproj file and add
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.Dotnet.Xdt.Tools" Version="2.0.0" />
<!-- ... other package references ... -->
</ItemGroup>
may be i don't clear question. For mine case web.config override all settings in web.Release.config file.
Fix for me, i just add reference for transformation xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" to configuration file.
so, .config file should start:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
After some time, the best solutions is using dotnet-transform-xdt tool
This is now supported by dotnet publish from SDK version 2.2 with a whole bunch of options.
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/transform-webconfig?view=aspnetcore-2.2
I think in the example from the question, it would then work when published as
dotnet publish --configuration prod-zone-a
This worked for me with the 1. & 2. above:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<location>
<system.webServer>
<httpErrors existingResponse="PassThrough"
xdt:Locator="Match(existingResponse)"
xdt:Transform="InsertIfMissing" />
</system.webServer>
</location>
</configuration>

Cannot get glyphicons-halflings-regular.woff2

I am getting this error messages - cant load glyphicons... Why?
Below is the folder structure of my code
Simply you need to add woff and woff2 MIME types to your web.config or add them directly in your webserver config file
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
Sorry I mistook your dark theme for visual studio and I thought you was using ASP.NET
I leave this code snippet because the same problem could be faced by ASP.NET users

Dotless HttpHandler with VS2013 Preview

I have just installed the Visual Studio 2013 preview and run up my site. I've noticed that the less files which are used in my site are not being correctly transformed to css and are coming down as blank CSS files.
It appears something is going wrong inside the dotless httphandler as when I force minification for the bundle everything works correctly.
web.config
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" />
...
<httpHandlers>
<add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core" />
</httpHandlers>
...
<handlers>
<add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" />
</handlers>
The issue appears to go away if I force minification eg. System.Web.Optimization.BundleTable.EnableOptimizations = false; which suggests something is different in the way it processes the HTTP handler
Try putting handleWebCompression="false" in the configuration for dotless (in the web config)
<dotless minifyCss="false" cache="true" web="false" handleWebCompression="false" />

CruiseControl.Net Web Dashboard not displaying results

Having problems displaying the results in CruiseControl.net web dashboard.
I've built a config file which kicks off a build of the project. It then runs nunit over my tests, they execute and finish just fine (I can open the log and see the results there). The ccnet logs show that the log files were successfully merged. However, try as I might, I can't get it to appear in the web dashboard. It just gives the frustrating:
BUILD FAILED
Project: GroundControlTests
Date of build: 2011-01-07 17:16:36
Running time: 00:00:58
Integration Request: mmayo triggered a build (ForceBuild) from PC0098
Projects built with no warnings at all :-)
Modifications since last build (0)
message, despite failing.
I suspect it has something to do with the xsl transforms, but have tried just about everything I can think of.
Certainly if I click View Build log, it shows, but the main report doesn't show passes and fails :(
My config files are below, any suggestions appreciated!
---nant.build---
<project name="GroundControl" default="cleanNunit" basedir=".">
<description>Cleanup tasks</description>
<target name="cleanNunit"
description="removes nunit log file">
<delete file="${CCNetArtifactDirectory}\nunit-results.xml"
failonerror="true" />
</target>
</project>
-----ccnet.config-------
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project name="GroundControlTests">
<workingDirectory>C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot</workingDirectory>
<artifactDirectory>C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot</artifactDirectory>
<prebuild>
<nant>
<executable>C:\Nant\bin\nant.exe
</executable>
<baseDirectory>C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot</baseDirectory>
<nologo>false</nologo>
<buildFile>nant.build</buildFile>
<targetList>
<target>cleanNunit</target>
</targetList>
</nant>
</prebuild>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
</executable>
<workingDirectory>C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot
</workingDirectory>
<projectFile>GroundControlReboot.sln</projectFile >
<buildArgs>/noconsolelogger
/v:quiet
/noconlog
/p:Configuration=Debug
/p:ReferencePath="C:\Program Files\NUnit 2.5.9\bin;C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
/p:AdditionalReferencePath="C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"
</buildArgs>
<targets>ReBuild</targets >
<timeout>180</timeout >
<!-- <logger>C:\Program Files\CruiseControl.NET\server\Rodemeyer.MsBuildToCCNet.dll</logger>-->
</msbuild>
<exec>
<executable>C:\Program Files\NUnit 2.5.9\bin\net-2.0\nunit-console.exe
</executable >
<buildArgs>/xml:C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot\nunit-results.xml
C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot\GroundControlReboot\bin\Debug\GroundControlReboot.dll
</buildArgs>
<buildTimeoutSeconds>180</buildTimeoutSeconds>
</exec>
</tasks>
<publishers>
<merge>
<files>
<file>
C:\Source\Wholesale\Code.EventControl.TestingFramework\GroundControlReboot\*-results.xml
</file>
</files>
</merge>
<xmllogger />
<statistics />
<artifactcleanup cleanUpMethod="KeepLastXBuilds"
cleanUpValue="20" />
</publishers>
</project>
</cruisecontrol>
-----dashboard.config-------
<?xml version="1.0" encoding="utf-8"?>
<dashboard>
<remoteServices>
<servers>
<server name="local" url="tcp://localhost:21234/CruiseManager.rem" allowForceBuild="true" allowStartStopBuild="true" backwardsCompatible="false" />
</servers>
</remoteServices>
<plugins>
<farmPlugins>
<farmReportFarmPlugin />
<cctrayDownloadPlugin />
<administrationPlugin password="" />
</farmPlugins>
<serverPlugins>
<serverReportServerPlugin />
</serverPlugins>
<projectPlugins>
<projectReportProjectPlugin />
<viewProjectStatusPlugin />
<latestBuildReportProjectPlugin />
<viewAllBuildsProjectPlugin />
</projectPlugins>
<buildPlugins>
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\msbuild2ccnet.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
<xslFile>xsl\nant.xsl</xslFile>
<xslFile>xsl\tests.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
<buildLogBuildPlugin />
</buildPlugins>
<securityPlugins>
<simpleSecurity />
</securityPlugins>
</plugins>
</dashboard>
When I deployed the nunit package from the dashboard admin it generated three things:
Under buildReportBuildPlugin it added xsl\unittests.xsl. This is for the build summary page.
It also generated two items for the sidebar to see nunit details (xsl\tests.xsl) and nunit timings (xsl\timings.xsl). It looks like you have the nunit details xsl file defined for the build summary page which may be why you don't see anything. If you use xsl\unittests.xsl instead (and reload the dashboard so it actually reads the updated file) that may work. Another option is to just deploy the nunit package from the web dashboard administration page which will update the dashboard.config file for you.
<buildPlugins>
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
<xslFile>xsl\unittests.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
<buildLogBuildPlugin />
<xslReportBuildPlugin description="NAnt Output" actionName="NAntOutputBuildReport" xslFileName="xsl\NAnt.xsl"></xslReportBuildPlugin>
<xslReportBuildPlugin description="NAnt Timings" actionName="NAntTimingsBuildReport" xslFileName="xsl\NAntTiming.xsl"></xslReportBuildPlugin>
<xslReportBuildPlugin description="NUnit Details" actionName="NUnitDetailsBuildReport" xslFileName="xsl\tests.xsl"></xslReportBuildPlugin>
<xslReportBuildPlugin description="NUnit Timings" actionName="NUnitTimingsBuildReport" xslFileName="xsl\timing.xsl"></xslReportBuildPlugin>
</buildPlugins>