Skip to content

Commit da69baf

Browse files
committed
Version 8.1.0
## Version 8.1.0 - April 24, 2026 - **Fixed:** The fix back in `Version 7.5.8 - April 11, 2025` for parsing `Referer` http header was not sufficient. This warning was occasionally recorded in server's Event Log: `This operation is not supported for a relative URI.` - **Improved:** Ensured stability of cookieless session feature for iframe with a cross-domain URL. This feature (`GleamTechWebConfiguration.AutoCookielessSessionEnabled`) was first added in `Version 5.8.1 - November 23, 2020`. - **Added:** `GleamTechWebConfiguration.PathBaseForSessionEnabled` property that specifies whether to use request PathBase (correct cased application virtual path) for session cookie and not default path `/`. The default value is `true` so it's active by default. The problem with ASP.NET Core session is, if for example you have 2 app instances on the same domain: 1. First visit to `/MyApp1`, the session cookie is created and set (with cookie path `/`). 2. Then visit to `/MyApp2`, the session cookie exists (with cookie path `/`) but this app cannot decrypt it because their key ring is not shared. This causes unnecessary `Error unprotecting the session cookie` warnings in server's Event Log. A new session cookie is still created but the problem is the logging in `CookieProtection.Unprotect()` on exception. In ASP.NET classic, session cookie path also defaults to `/` and not to the application virtual path, though this does not cause a warning/error, but you get a new empty session with the existing session cookie. So, the best solution is to use correct cased application virtual path as session cookie path when available and not the default path `/`, to isolate session of all app instances on the same domain, for example: ``` ApplicationVirtualPath: /DocumentUltimate/AspNetWebFormsCS ? (IIS canonical casing) Request.Path: /documentultimate/aspNetWebFormsCS/Page.aspx ? (actual request casing) PathBase (correct cased): /documentultimate/aspNetWebFormsCS ``` Cookie paths are case-sensitive so when not using the default path `/`, we ensure PathBase used for cookie path is correct cased (cased same as the one user typed in address bar). However, if you want to share the session cookie across all app instances on the same domain, set this to `false` (default ASP.NET Session behavior). - **Improved:** Normally, to have Session cookie work properly for an ASP.NET Core app hosted in IIS, "Load User Profile" property should be set to true for application pool used for that app. However for convenience, we will now use `Keys` subfolder under `GleamTechConfiguration.TemporaryFolder` by default in `AddGleamTech()` if `KeyManagementOptions.XmlRepository` is not explicitly set and if app is not hosted in Azure Apps. This is because if keys can not be persisted to a writable directory, they are stored in-memory and when the process shuts down (or application pool is recycled), all generated keys are lost. As a result, these unnecessary warnings are recorded in server's Event Log: ``` No XML encryptor configured. Key {guid} may be persisted to storage in unencrypted form. Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits. Using an in-memory repository. Keys will not be persisted to storage. The antiforgery token could not be decrypted. Error unprotecting the session cookie. The key {guid} was not found in the key ring. ``` This way even if "Load User Profile" property is set to false, we will fix default ASP.NET behavior and avoid warnings spamming server's Event Log.
1 parent c046437 commit da69baf

10 files changed

Lines changed: 161 additions & 180 deletions

File tree

Examples/AspNetCoreCS/AspNetCoreCS.csproj

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="GleamTech.Common" Version="7.0.0" />
13-
<PackageReference Include="GleamTech.DocumentUltimate" Version="8.0.0" />
12+
<PackageReference Include="GleamTech.Common" Version="7.1.0" />
13+
<PackageReference Include="GleamTech.DocumentUltimate" Version="8.1.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>
@@ -48,11 +48,4 @@
4848
</DotnetPublishFiles>
4949
</ItemGroup>
5050

51-
<ItemGroup>
52-
<Content Update="Views\DocumentViewer\Display.cshtml">
53-
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
54-
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
55-
</Content>
56-
</ItemGroup>
57-
5851
</Project>

Examples/AspNetCoreOnNetFullCS/AspNetCoreOnNetFullCS.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="GleamTech.Common" Version="7.0.0" />
20-
<PackageReference Include="GleamTech.DocumentUltimate" Version="8.0.0" />
19+
<PackageReference Include="GleamTech.Common" Version="7.1.0" />
20+
<PackageReference Include="GleamTech.DocumentUltimate" Version="8.1.0" />
2121
</ItemGroup>
2222

2323
<ItemGroup>

Examples/AspNetMvcCS/AspNetMvcCS.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
</PropertyGroup>
4747
<ItemGroup>
4848
<Reference Include="GleamTech.Common">
49-
<HintPath>..\packages\GleamTech.Common.7.0.0\lib\net472\GleamTech.Common.dll</HintPath>
49+
<HintPath>..\packages\GleamTech.Common.7.1.0\lib\net472\GleamTech.Common.dll</HintPath>
5050
</Reference>
5151
<Reference Include="GleamTech.DocumentUltimate">
52-
<HintPath>..\packages\GleamTech.DocumentUltimate.8.0.0\lib\net472\GleamTech.DocumentUltimate.dll</HintPath>
52+
<HintPath>..\packages\GleamTech.DocumentUltimate.8.1.0\lib\net472\GleamTech.DocumentUltimate.dll</HintPath>
5353
</Reference>
5454
</ItemGroup>
5555
<ItemGroup>
@@ -98,21 +98,19 @@
9898
<Content Include="Global.asax" />
9999
<Content Include="Web.config" />
100100
<None Include="packages.config" />
101-
<Content Include="Views\DocumentViewer\Display.cshtml" />
102101
<None Include="Web.Debug.config">
103102
<DependentUpon>Web.config</DependentUpon>
104103
</None>
105104
<None Include="Web.Release.config">
106105
<DependentUpon>Web.config</DependentUpon>
107106
</None>
108107
</ItemGroup>
109-
<ItemGroup>
108+
<ItemGroup Condition="'$(DisableWildcardExpansionHack)' != 'true'">
110109
<Content Include="App_Data\**\*" />
111110
<Content Include="App_GlobalResources\**\*" />
111+
<Content Include="Descriptions\**\*" />
112112
<Content Include="Models\**\*" />
113113
<Content Include="Views\**\*" />
114-
<Content Include="Descriptions\**\*" />
115-
<Content Include="Resources\**\*" />
116114
</ItemGroup>
117115
<ItemGroup>
118116
<Compile Include="App_Start\RouteConfig.cs" />

Examples/AspNetMvcCS/Packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<package id="Microsoft.AspNet.Razor" version="3.3.0" targetFramework="net472" />
55
<package id="Microsoft.AspNet.WebPages" version="3.3.0" targetFramework="net472" />
66
<package id="Microsoft.Web.Infrastructure" version="2.0.0" targetFramework="net472" />
7-
<package id="GleamTech.Common" version="7.0.0" />
8-
<package id="GleamTech.DocumentUltimate" version="8.0.0" />
7+
<package id="GleamTech.Common" version="7.1.0" />
8+
<package id="GleamTech.DocumentUltimate" version="8.1.0" />
99
</packages>

Examples/AspNetMvcVB/AspNetMvcVB.vbproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
</PropertyGroup>
4949
<ItemGroup>
5050
<Reference Include="GleamTech.Common">
51-
<HintPath>..\packages\GleamTech.Common.7.0.0\lib\net472\GleamTech.Common.dll</HintPath>
51+
<HintPath>..\packages\GleamTech.Common.7.1.0\lib\net472\GleamTech.Common.dll</HintPath>
5252
</Reference>
5353
<Reference Include="GleamTech.DocumentUltimate">
54-
<HintPath>..\packages\GleamTech.DocumentUltimate.8.0.0\lib\net472\GleamTech.DocumentUltimate.dll</HintPath>
54+
<HintPath>..\packages\GleamTech.DocumentUltimate.8.1.0\lib\net472\GleamTech.DocumentUltimate.dll</HintPath>
5555
</Reference>
5656
</ItemGroup>
5757
<ItemGroup>
@@ -122,7 +122,6 @@
122122
<Content Include="Global.asax" />
123123
<Content Include="Web.config" />
124124
<None Include="packages.config" />
125-
<Content Include="Views\DocumentViewer\Display.cshtml" />
126125
<None Include="Web.Debug.config">
127126
<DependentUpon>Web.config</DependentUpon>
128127
</None>
@@ -176,13 +175,12 @@
176175
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
177176
</None>
178177
</ItemGroup>
179-
<ItemGroup>
178+
<ItemGroup Condition="'$(DisableWildcardExpansionHack)' != 'true'">
180179
<Content Include="App_Data\**\*" />
181180
<Content Include="App_GlobalResources\**\*" />
181+
<Content Include="Descriptions\**\*" />
182182
<Content Include="Models\**\*" />
183183
<Content Include="Views\**\*" />
184-
<Content Include="Descriptions\**\*" />
185-
<Content Include="Resources\**\*" />
186184
</ItemGroup>
187185
<ItemGroup>
188186
<Import Include="System.Web.Mvc" />

Examples/AspNetMvcVB/Packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<package id="Microsoft.AspNet.Razor" version="3.3.0" targetFramework="net472" />
55
<package id="Microsoft.AspNet.WebPages" version="3.3.0" targetFramework="net472" />
66
<package id="Microsoft.Web.Infrastructure" version="2.0.0" targetFramework="net472" />
7-
<package id="GleamTech.Common" version="7.0.0" />
8-
<package id="GleamTech.DocumentUltimate" version="8.0.0" />
7+
<package id="GleamTech.Common" version="7.1.0" />
8+
<package id="GleamTech.DocumentUltimate" version="8.1.0" />
99
</packages>

Examples/AspNetWebFormsCS/AspNetWebFormsCS.csproj

Lines changed: 69 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<IISExpressWindowsAuthentication />
2626
<IISExpressUseClassicPipelineMode />
2727
<UseGlobalApplicationHostFile />
28-
<Use64BitIISExpress />
2928
<TargetFrameworkProfile />
29+
<Use64BitIISExpress />
3030
</PropertyGroup>
3131
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3232
<DebugSymbols>true</DebugSymbols>
@@ -51,10 +51,10 @@
5151
</PropertyGroup>
5252
<ItemGroup>
5353
<Reference Include="GleamTech.Common">
54-
<HintPath>..\packages\GleamTech.Common.7.0.0\lib\net472\GleamTech.Common.dll</HintPath>
54+
<HintPath>..\packages\GleamTech.Common.7.1.0\lib\net472\GleamTech.Common.dll</HintPath>
5555
</Reference>
5656
<Reference Include="GleamTech.DocumentUltimate">
57-
<HintPath>..\packages\GleamTech.DocumentUltimate.8.0.0\lib\net472\GleamTech.DocumentUltimate.dll</HintPath>
57+
<HintPath>..\packages\GleamTech.DocumentUltimate.8.1.0\lib\net472\GleamTech.DocumentUltimate.dll</HintPath>
5858
</Reference>
5959
<Reference Include="System" />
6060
<Reference Include="System.Data" />
@@ -68,117 +68,112 @@
6868
<Reference Include="System.Xml" />
6969
<Reference Include="System.Xml.Linq" />
7070
</ItemGroup>
71-
<ItemGroup>
71+
<ItemGroup Condition="'$(DisableWildcardExpansionHack)' != 'true'">
7272
<Content Include="App_Data\**\*" />
7373
<Content Include="App_GlobalResources\**\*" />
74-
</ItemGroup>
75-
<ItemGroup>
76-
<Content Include="Default.aspx" />
77-
<Content Include="Descriptions\DocumentConverter\Possible.html" />
78-
<Content Include="Descriptions\DocumentConverter\Overview.html" />
79-
<Content Include="Descriptions\DocumentViewer\ClientEvents.html" />
80-
<Content Include="Descriptions\DocumentViewer\Watermark.html" />
81-
<Content Include="Descriptions\DocumentViewer\Highlight.html" />
82-
<Content Include="Descriptions\DocumentViewer\Overview.html" />
83-
<Content Include="Descriptions\DocumentViewer\Protection.html" />
84-
<Content Include="Descriptions\DocumentViewer\FileProvider.html" />
85-
<Content Include="DocumentConverter\Overview.aspx" />
86-
<Content Include="DocumentConverter\Possible.aspx" />
87-
<Content Include="DocumentViewer\ClientEvents.aspx" />
88-
<Content Include="DocumentViewer\Display.aspx" />
89-
<Content Include="DocumentViewer\Watermark.aspx" />
90-
<Content Include="DocumentViewer\Highlight.aspx" />
91-
<Content Include="DocumentViewer\Overview.aspx" />
92-
<Content Include="DocumentViewer\Protection.aspx" />
93-
<Content Include="DocumentViewer\FileProvider.aspx" />
74+
<Content Include="Descriptions\**\*" />
75+
9476
<Content Include="Global.asax" />
95-
<Content Include="Web.config">
96-
<SubType>Designer</SubType>
97-
</Content>
77+
<Content Include="Web.config" />
9878
<Content Include="Web.Debug.config">
9979
<DependentUpon>Web.config</DependentUpon>
10080
</Content>
10181
<Content Include="Web.Release.config">
10282
<DependentUpon>Web.config</DependentUpon>
10383
</Content>
84+
<Content Include="Default.aspx" />
10485
</ItemGroup>
105-
<ItemGroup>
86+
<ItemGroup Condition="'$(DisableWildcardExpansionHack)' != 'true'">
87+
<Compile Include="Global.asax.cs">
88+
<DependentUpon>Global.asax</DependentUpon>
89+
</Compile>
90+
<Compile Include="Properties\AssemblyInfo.cs" />
10691
<Compile Include="Default.aspx.cs">
10792
<DependentUpon>Default.aspx</DependentUpon>
10893
<SubType>ASPXCodeBehind</SubType>
10994
</Compile>
11095
<Compile Include="Default.aspx.designer.cs">
11196
<DependentUpon>Default.aspx</DependentUpon>
11297
</Compile>
113-
<Compile Include="DocumentConverter\Overview.aspx.cs">
98+
</ItemGroup>
99+
<ItemGroup>
100+
<Content Include="DocumentViewer\Overview.aspx" />
101+
<Content Include="DocumentViewer\Display.aspx" />
102+
<Content Include="DocumentViewer\Protection.aspx" />
103+
<Content Include="DocumentViewer\Highlight.aspx" />
104+
<Content Include="DocumentViewer\Watermark.aspx" />
105+
<Content Include="DocumentViewer\ClientEvents.aspx" />
106+
<Content Include="DocumentViewer\FileProvider.aspx" />
107+
108+
<Content Include="DocumentConverter\Overview.aspx" />
109+
<Content Include="DocumentConverter\Possible.aspx" />
110+
</ItemGroup>
111+
<ItemGroup>
112+
<Compile Include="DocumentViewer\Overview.aspx.designer.cs">
114113
<DependentUpon>Overview.aspx</DependentUpon>
115-
<SubType>ASPXCodeBehind</SubType>
116114
</Compile>
117-
<Compile Include="DocumentConverter\Overview.aspx.designer.cs">
115+
<Compile Include="DocumentViewer\Overview.aspx.cs">
118116
<DependentUpon>Overview.aspx</DependentUpon>
119-
</Compile>
120-
<Compile Include="DocumentConverter\Possible.aspx.cs">
121-
<DependentUpon>Possible.aspx</DependentUpon>
122-
<SubType>ASPXCodeBehind</SubType>
123-
</Compile>
124-
<Compile Include="DocumentConverter\Possible.aspx.designer.cs">
125-
<DependentUpon>Possible.aspx</DependentUpon>
126-
</Compile>
127-
<Compile Include="DocumentViewer\ClientEvents.aspx.cs">
128-
<DependentUpon>ClientEvents.aspx</DependentUpon>
129-
<SubType>ASPXCodeBehind</SubType>
130-
</Compile>
131-
<Compile Include="DocumentViewer\ClientEvents.aspx.designer.cs">
132-
<DependentUpon>ClientEvents.aspx</DependentUpon>
133-
</Compile>
134-
<Compile Include="DocumentViewer\Display.aspx.cs">
135-
<DependentUpon>Display.aspx</DependentUpon>
136-
<SubType>ASPXCodeBehind</SubType>
117+
<SubType>ASPXCodebehind</SubType>
137118
</Compile>
138119
<Compile Include="DocumentViewer\Display.aspx.designer.cs">
139120
<DependentUpon>Display.aspx</DependentUpon>
140121
</Compile>
141-
<Compile Include="DocumentViewer\Watermark.aspx.cs">
142-
<DependentUpon>Watermark.aspx</DependentUpon>
143-
<SubType>ASPXCodeBehind</SubType>
122+
<Compile Include="DocumentViewer\Display.aspx.cs">
123+
<DependentUpon>Display.aspx</DependentUpon>
124+
<SubType>ASPXCodebehind</SubType>
144125
</Compile>
145-
<Compile Include="DocumentViewer\Watermark.aspx.designer.cs">
146-
<DependentUpon>Watermark.aspx</DependentUpon>
126+
<Compile Include="DocumentViewer\Protection.aspx.designer.cs">
127+
<DependentUpon>Protection.aspx</DependentUpon>
147128
</Compile>
148-
<Compile Include="DocumentViewer\Highlight.aspx.cs">
149-
<DependentUpon>Highlight.aspx</DependentUpon>
150-
<SubType>ASPXCodeBehind</SubType>
129+
<Compile Include="DocumentViewer\Protection.aspx.cs">
130+
<DependentUpon>Protection.aspx</DependentUpon>
131+
<SubType>ASPXCodebehind</SubType>
151132
</Compile>
152133
<Compile Include="DocumentViewer\Highlight.aspx.designer.cs">
153134
<DependentUpon>Highlight.aspx</DependentUpon>
154135
</Compile>
155-
<Compile Include="DocumentViewer\Overview.aspx.cs">
156-
<DependentUpon>Overview.aspx</DependentUpon>
157-
<SubType>ASPXCodeBehind</SubType>
136+
<Compile Include="DocumentViewer\Highlight.aspx.cs">
137+
<DependentUpon>Highlight.aspx</DependentUpon>
138+
<SubType>ASPXCodebehind</SubType>
158139
</Compile>
159-
<Compile Include="DocumentViewer\Overview.aspx.designer.cs">
160-
<DependentUpon>Overview.aspx</DependentUpon>
140+
<Compile Include="DocumentViewer\Watermark.aspx.designer.cs">
141+
<DependentUpon>Watermark.aspx</DependentUpon>
161142
</Compile>
162-
<Compile Include="DocumentViewer\Protection.aspx.cs">
163-
<DependentUpon>Protection.aspx</DependentUpon>
164-
<SubType>ASPXCodeBehind</SubType>
143+
<Compile Include="DocumentViewer\Watermark.aspx.cs">
144+
<DependentUpon>Watermark.aspx</DependentUpon>
145+
<SubType>ASPXCodebehind</SubType>
165146
</Compile>
166-
<Compile Include="DocumentViewer\Protection.aspx.designer.cs">
167-
<DependentUpon>Protection.aspx</DependentUpon>
147+
<Compile Include="DocumentViewer\FileProvider.aspx.designer.cs">
148+
<DependentUpon>FileProvider.aspx</DependentUpon>
168149
</Compile>
169150
<Compile Include="DocumentViewer\FileProvider.aspx.cs">
170151
<DependentUpon>FileProvider.aspx</DependentUpon>
171-
<SubType>ASPXCodeBehind</SubType>
152+
<SubType>ASPXCodebehind</SubType>
153+
</Compile>
154+
<Compile Include="DocumentViewer\ClientEvents.aspx.designer.cs">
155+
<DependentUpon>ClientEvents.aspx</DependentUpon>
172156
</Compile>
173-
<Compile Include="DocumentViewer\FileProvider.aspx.designer.cs">
174-
<DependentUpon>FileProvider.aspx</DependentUpon>
157+
<Compile Include="DocumentViewer\ClientEvents.aspx.cs">
158+
<DependentUpon>ClientEvents.aspx</DependentUpon>
159+
<SubType>ASPXCodebehind</SubType>
175160
</Compile>
176-
<Compile Include="Global.asax.cs">
177-
<DependentUpon>Global.asax</DependentUpon>
161+
162+
<Compile Include="DocumentConverter\Possible.aspx.designer.cs">
163+
<DependentUpon>Possible.aspx</DependentUpon>
164+
</Compile>
165+
<Compile Include="DocumentConverter\Possible.aspx.cs">
166+
<DependentUpon>Possible.aspx</DependentUpon>
167+
<SubType>ASPXCodebehind</SubType>
168+
</Compile>
169+
<Compile Include="DocumentConverter\Overview.aspx.designer.cs">
170+
<DependentUpon>Overview.aspx</DependentUpon>
171+
</Compile>
172+
<Compile Include="DocumentConverter\Overview.aspx.cs">
173+
<DependentUpon>Overview.aspx</DependentUpon>
174+
<SubType>ASPXCodebehind</SubType>
178175
</Compile>
179-
<Compile Include="Properties\AssemblyInfo.cs" />
180176
</ItemGroup>
181-
<ItemGroup />
182177
<PropertyGroup>
183178
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
184179
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<packages>
3-
<package id="GleamTech.Common" version="7.0.0" />
4-
<package id="GleamTech.DocumentUltimate" version="8.0.0" />
3+
<package id="GleamTech.Common" version="7.1.0" />
4+
<package id="GleamTech.DocumentUltimate" version="8.1.0" />
55
</packages>

0 commit comments

Comments
 (0)