Skip to content

Commit 7097c23

Browse files
committed
v15.2.14426-Beta2
1 parent 767505c commit 7097c23

File tree

191 files changed

+13476
-10098
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+13476
-10098
lines changed

CS/CalDAVServer.FileSystemStorage.AspNetCore/CalDAVServer.FileSystemStorage.AspNetCore.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<Project Sdk="Microsoft.NET.Sdk.Web">
33
<PropertyGroup>
4-
<VersionPrefix>15.2.14391-Beta2</VersionPrefix>
4+
<VersionPrefix>15.2.14426-Beta2</VersionPrefix>
55
<AssemblyName>CalDAVServer.FileSystemStorage.AspNetCore</AssemblyName>
66
<TargetFramework>net9.0</TargetFramework>
77
<LangVersion>9.0</LangVersion>
@@ -16,12 +16,12 @@
1616
</Content>
1717
</ItemGroup>
1818
<ItemGroup>
19-
<PackageReference Include="ITHit.Server" Version="15.2.14391-Beta2" />
20-
<PackageReference Include="ITHit.Server.Core" Version="15.2.14391-Beta2" />
21-
<PackageReference Include="ITHit.WebDAV.Server" Version="15.2.14391-Beta2" />
19+
<PackageReference Include="ITHit.Server" Version="15.2.14426-Beta2" />
20+
<PackageReference Include="ITHit.Server.Core" Version="15.2.14426-Beta2" />
21+
<PackageReference Include="ITHit.WebDAV.Server" Version="15.2.14426-Beta2" />
2222
<PackageReference Include="System.Data.OleDb" Version="8.0.1" />
2323
</ItemGroup>
2424
<ItemGroup>
25-
<PackageReference Include="ITHit.Collab" Version="1.0.0.759" />
25+
<PackageReference Include="ITHit.Collab" Version="1.0.0.762" />
2626
</ItemGroup>
2727
</Project>

CS/CalDAVServer.FileSystemStorage.AspNetCore/MyCustomGetHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ public async Task ProcessRequestAsync(ContextAsync<IHierarchyItem> context, IHie
9393
await WriteProfileAsync(context, item, htmlPath);
9494
return;
9595
}
96-
9796
string htmlName = "MyCustomHandlerPage.html";
98-
using (TextReader reader = File.OpenText(Path.Combine(htmlPath, htmlName)))
97+
string filePath = Path.Combine(htmlPath, htmlName);
98+
using (TextReader reader = File.OpenText(filePath))
9999
{
100100
string html = await reader.ReadToEndAsync();
101101
html = html.Replace("_webDavServerUrl_", context.Request.UrlPrefix + context.Request.ApplicationPath);
Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Hosting;
1+
using Microsoft.AspNetCore.Builder;
2+
using Microsoft.Extensions.Configuration;
3+
using Microsoft.Extensions.DependencyInjection;
4+
using CalDAVServer.FileSystemStorage.AspNetCore;
35

4-
namespace CalDAVServer.FileSystemStorage.AspNetCore
5-
{
6-
public class Program
7-
{
8-
public static void Main(string[] args)
9-
{
10-
CreateHostBuilder(args).Build().Run();
11-
}
6+
var builder = WebApplication.CreateBuilder(args);
127

13-
public static IHostBuilder CreateHostBuilder(string[] args) =>
14-
Host.CreateDefaultBuilder(args)
15-
.ConfigureWebHostDefaults(webBuilder =>
16-
{
17-
webBuilder.UseStartup<Startup>();
18-
});
19-
}
20-
}
8+
builder.Configuration
9+
.SetBasePath(builder.Environment.ContentRootPath)
10+
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
11+
.AddJsonFile("appsettings.webdav.json", optional: true, reloadOnChange: true)
12+
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true)
13+
.AddEnvironmentVariables();
14+
builder.Services.AddWebDav(builder.Configuration, builder.Environment);
15+
16+
var app = builder.Build();
17+
18+
app.UseStaticFiles(new StaticFileOptions { ServeUnknownFileTypes = true });
19+
app.UseHttpsRedirection();
20+
// Basic auth requires SSL connection. To enable non - SSL connection for testing purposes read the following articles:
21+
// - In case of Windows & MS Office: http://support.microsoft.com/kb/2123563
22+
// - In case of Mac OS X & MS Office: https://support.microsoft.com/en-us/kb/2498069
23+
app.UseBasicAuth();
24+
app.UseProvisioninge();
25+
app.UseWebDav(app.Environment);
26+
27+
app.Run();

CS/CalDAVServer.FileSystemStorage.AspNetCore/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"commandName": "Project",
1313
"dotnetRunMessages": true,
1414
"launchBrowser": true,
15-
"applicationUrl": "https://localhost:0;http://localhost:0",
15+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
1616
"environmentVariables": {
1717
"ASPNETCORE_ENVIRONMENT": "Development"
1818
}
@@ -21,7 +21,7 @@
2121
"commandName": "Project",
2222
"dotnetRunMessages": true,
2323
"launchBrowser": true,
24-
"applicationUrl": "http://localhost:0",
24+
"applicationUrl": "http://localhost:5000",
2525
"environmentVariables": {
2626
"ASPNETCORE_ENVIRONMENT": "Development"
2727
}

CS/CalDAVServer.FileSystemStorage.AspNetCore/Startup.cs

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"Logging": {
3-
"IncludeScopes": false,
43
"LogLevel": {
5-
"Default": "Debug",
6-
"System": "Information",
7-
"Microsoft": "Information"
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
86
}
9-
}
7+
},
8+
"AllowedHosts": "*"
109
}
Binary file not shown.

CS/CalDAVServer.SqlStorage.AspNetCore/CalDAVServer.SqlStorage.AspNetCore.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<Project Sdk="Microsoft.NET.Sdk.Web">
33
<PropertyGroup>
4-
<VersionPrefix>15.2.14391-Beta2</VersionPrefix>
4+
<VersionPrefix>15.2.14426-Beta2</VersionPrefix>
55
<AssemblyName>CalDAVServer.SqlStorage.AspNetCore</AssemblyName>
66
<TargetFramework>net9.0</TargetFramework>
77
<LangVersion>9.0</LangVersion>
@@ -19,12 +19,12 @@
1919
</Content>
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="ITHit.Server" Version="15.2.14391-Beta2" />
23-
<PackageReference Include="ITHit.Server.Core" Version="15.2.14391-Beta2" />
24-
<PackageReference Include="ITHit.WebDAV.Server" Version="15.2.14391-Beta2" />
22+
<PackageReference Include="ITHit.Server" Version="15.2.14426-Beta2" />
23+
<PackageReference Include="ITHit.Server.Core" Version="15.2.14426-Beta2" />
24+
<PackageReference Include="ITHit.WebDAV.Server" Version="15.2.14426-Beta2" />
2525
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
2626
</ItemGroup>
2727
<ItemGroup>
28-
<PackageReference Include="ITHit.Collab" Version="1.0.0.759" />
28+
<PackageReference Include="ITHit.Collab" Version="1.0.0.762" />
2929
</ItemGroup>
3030
</Project>

CS/CalDAVServer.SqlStorage.AspNetCore/MyCustomGetHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ public async Task ProcessRequestAsync(ContextAsync<IHierarchyItem> context, IHie
9393
await WriteProfileAsync(context, item, htmlPath);
9494
return;
9595
}
96-
9796
string htmlName = "MyCustomHandlerPage.html";
98-
using (TextReader reader = File.OpenText(Path.Combine(htmlPath, htmlName)))
97+
string filePath = Path.Combine(htmlPath, htmlName);
98+
using (TextReader reader = File.OpenText(filePath))
9999
{
100100
string html = await reader.ReadToEndAsync();
101101
html = html.Replace("_webDavServerUrl_", context.Request.UrlPrefix + context.Request.ApplicationPath);
Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Hosting;
1+
using Microsoft.AspNetCore.Builder;
2+
using Microsoft.Extensions.Configuration;
3+
using Microsoft.Extensions.DependencyInjection;
4+
using CalDAVServer.SqlStorage.AspNetCore;
35

4-
namespace CalDAVServer.SqlStorage.AspNetCore
5-
{
6-
public class Program
7-
{
8-
public static void Main(string[] args)
9-
{
10-
CreateHostBuilder(args).Build().Run();
11-
}
6+
var builder = WebApplication.CreateBuilder(args);
127

13-
public static IHostBuilder CreateHostBuilder(string[] args) =>
14-
Host.CreateDefaultBuilder(args)
15-
.ConfigureWebHostDefaults(webBuilder =>
16-
{
17-
webBuilder.UseStartup<Startup>();
18-
});
19-
}
20-
}
8+
builder.Configuration
9+
.SetBasePath(builder.Environment.ContentRootPath)
10+
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
11+
.AddJsonFile("appsettings.webdav.json", optional: true, reloadOnChange: true)
12+
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true)
13+
.AddEnvironmentVariables();
14+
builder.Services.AddWebDav(builder.Configuration, builder.Environment);
15+
16+
var app = builder.Build();
17+
18+
app.UseStaticFiles(new StaticFileOptions { ServeUnknownFileTypes = true });
19+
app.UseHttpsRedirection();
20+
// Basic auth requires SSL connection. To enable non - SSL connection for testing purposes read the following articles:
21+
// - In case of Windows & MS Office: http://support.microsoft.com/kb/2123563
22+
// - In case of Mac OS X & MS Office: https://support.microsoft.com/en-us/kb/2498069
23+
app.UseBasicAuth();
24+
app.UseProvisioninge();
25+
app.UseWebDav(app.Environment);
26+
27+
app.Run();

0 commit comments

Comments
 (0)