Skip to content

Commit 7913c5c

Browse files
committed
v9.2.5726-Beta2
1 parent 5dc5700 commit 7913c5c

File tree

97 files changed

+873
-563
lines changed

Some content is hidden

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

97 files changed

+873
-563
lines changed

CS/CalDAVServer.FileSystemStorage.AspNet/CalDAVServer.FileSystemStorage.AspNet.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProductVersion>9.0.30729</ProductVersion>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>841E6E1D-954D-4BB3-93D5-0DFD425FC196</ProjectGuid>
9+
<ProjectGuid>C9F47C3E-EFEE-4F79-8997-7BFEB9C1F2F0</ProjectGuid>
1010
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
1111
<OutputType>Library</OutputType>
1212
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -145,16 +145,16 @@
145145
</ItemGroup>
146146
<ItemGroup>
147147
<Reference Include="ITHit.WebDAV.Server">
148-
<HintPath>..\packages\ITHit.WebDAV.Server.9.2.5712-Beta2\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
148+
<HintPath>..\packages\ITHit.WebDAV.Server.9.2.5726-Beta2\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
149149
</Reference>
150150
<Reference Include="ITHit.Server">
151-
<HintPath>..\packages\ITHit.Server.9.2.5712-Beta2\lib\net451\ITHit.Server.dll</HintPath>
151+
<HintPath>..\packages\ITHit.Server.9.2.5726-Beta2\lib\net451\ITHit.Server.dll</HintPath>
152152
</Reference>
153153
<Reference Include="ITHit.Server.Web">
154-
<HintPath>..\packages\ITHit.Server.Web.9.2.5712-Beta2\lib\net451\ITHit.Server.Web.dll</HintPath>
154+
<HintPath>..\packages\ITHit.Server.Web.9.2.5726-Beta2\lib\net451\ITHit.Server.Web.dll</HintPath>
155155
</Reference>
156156
<Reference Include="ITHit.GSuite.Server">
157-
<HintPath>..\packages\ITHit.GSuite.Server.9.2.5712-Beta2\lib\net451\ITHit.GSuite.Server.dll</HintPath>
157+
<HintPath>..\packages\ITHit.GSuite.Server.9.2.5726-Beta2\lib\net451\ITHit.GSuite.Server.dll</HintPath>
158158
</Reference>
159159
</ItemGroup>
160160
<PropertyGroup>
@@ -172,7 +172,7 @@
172172
<AutoAssignPort>True</AutoAssignPort>
173173
<DevelopmentServerPort>9658</DevelopmentServerPort>
174174
<DevelopmentServerVPath>/</DevelopmentServerVPath>
175-
<IISUrl>http://localhost:36440/</IISUrl>
175+
<IISUrl>http://localhost:29381/</IISUrl>
176176
<NTLMAuthentication>True</NTLMAuthentication>
177177
<UseCustomServer>False</UseCustomServer>
178178
<CustomServerUrl>

CS/CalDAVServer.FileSystemStorage.AspNet/DavHandler.cs

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using CalDAVServer.FileSystemStorage.AspNet;
1414
using CalDAVServer.FileSystemStorage.AspNet.Acl;
1515
using ITHit.GSuite.Server;
16+
1617
namespace CalDAVServer.FileSystemStorage.AspNet
1718
{
1819
/// <summary>
@@ -26,9 +27,19 @@ public class DavHandler : HttpTaskAsyncHandler
2627
/// - IT Hit iCalendar and vCard Library if used in a project
2728
/// </summary>
2829
private readonly string license = File.ReadAllText(HttpContext.Current.Request.PhysicalApplicationPath + "License.lic");
30+
/// <summary>
31+
/// Google Service Account ID (client_email field from JSON file).
32+
/// </summary>
2933
private static readonly string googleServiceAccountID = ConfigurationManager.AppSettings["GoogleServiceAccountID"];
34+
35+
/// <summary>
36+
/// Google Service private key (private_key field from JSON file).
37+
/// </summary>
3038
private static readonly string googleServicePrivateKey = ConfigurationManager.AppSettings["GoogleServicePrivateKey"];
31-
private static readonly string gSuiteLicense = ConfigurationManager.AppSettings["GSuiteLicense"];
39+
40+
/// <summary>
41+
/// This license file is used to activate G Suite Documents Editing for IT Hit WebDAV Server
42+
/// </summary>
3243
private readonly string gSuiteLicense = File.ReadAllText(HttpContext.Current.Request.PhysicalApplicationPath + "GSuiteLicense.lic");
3344

3445
/// <summary>
@@ -78,12 +89,12 @@ public override bool IsReusable
7889
/// </param>
7990
public override async Task ProcessRequestAsync(HttpContext context)
8091
{
81-
DavEngineAsync engine = getOrInitializeEngine(context);
92+
DavEngineAsync webDavEngine = getOrInitializeWebDavEngine(context);
8293

8394
context.Response.BufferOutput = false;
8495
DavContext ntfsDavContext = new DavContext(context);
8596
GSuiteEngineAsync gSuiteEngine = getOrInitializeGSuiteEngine(context);
86-
await engine.RunAsync(ntfsDavContext);
97+
await webDavEngine.RunAsync(ntfsDavContext);
8798
await gSuiteEngine.RunAsync(ContextConverter.ConvertToGSuiteContext(ntfsDavContext));
8899
}
89100

@@ -92,12 +103,12 @@ public override async Task ProcessRequestAsync(HttpContext context)
92103
/// </summary>
93104
/// <param name="context">Instance of <see cref="HttpContext"/>.</param>
94105
/// <returns>Initialized <see cref="DavEngine"/>.</returns>
95-
private DavEngineAsync initializeEngine(HttpContext context)
106+
private DavEngineAsync initializeWebDavEngine(HttpContext context)
96107
{
97108

98109
ILogger logger = CalDAVServer.FileSystemStorage.AspNet.Logger.Instance;
99110
logger.LogFlags = LogFlagsEnum.LogGetResponseBody | LogFlagsEnum.LogPutRequestBody;
100-
DavEngineAsync engine = new DavEngineAsync
111+
DavEngineAsync webDavEngine = new DavEngineAsync
101112
{
102113
Logger = logger
103114

@@ -111,7 +122,7 @@ private DavEngineAsync initializeEngine(HttpContext context)
111122
, UseFullUris = false
112123
};
113124

114-
engine.License = license;
125+
webDavEngine.License = license;
115126
string contentRootPath = HttpContext.Current.Request.MapPath("/");
116127

117128
// Set custom handler to process GET and HEAD requests to folders and display
@@ -121,31 +132,31 @@ private DavEngineAsync initializeEngine(HttpContext context)
121132
// request is not processed.
122133
MyCustomGetHandler handlerGet = new MyCustomGetHandler(contentRootPath);
123134
MyCustomGetHandler handlerHead = new MyCustomGetHandler(contentRootPath);
124-
handlerGet.OriginalHandler = engine.RegisterMethodHandler("GET", handlerGet);
125-
handlerHead.OriginalHandler = engine.RegisterMethodHandler("HEAD", handlerHead);
135+
handlerGet.OriginalHandler = webDavEngine.RegisterMethodHandler("GET", handlerGet);
136+
handlerHead.OriginalHandler = webDavEngine.RegisterMethodHandler("HEAD", handlerHead);
126137

127138
// Set your iCalendar & vCard library license before calling any members.
128139
// iCalendar & vCard library accepts:
129140
// - WebDAV Server Engine license with iCalendar & vCard modules. Verify your license file to see if these modules are specified.
130141
// - or iCalendar and vCard Library license.
131142
ITHit.Collab.LicenseValidator.SetLicense(license);
132143

133-
return engine;
144+
return webDavEngine;
134145
}
135146

136147
/// <summary>
137148
/// Initializes or gets engine singleton.
138149
/// </summary>
139150
/// <param name="context">Instance of <see cref="HttpContext"/>.</param>
140151
/// <returns>Instance of <see cref="DavEngineAsync"/>.</returns>
141-
private DavEngineAsync getOrInitializeEngine(HttpContext context)
152+
private DavEngineAsync getOrInitializeWebDavEngine(HttpContext context)
142153
{
143154
//we don't use any double check lock pattern here because nothing wrong
144155
//is going to happen if we created occasionally several engines.
145156
const string ENGINE_KEY = "$DavEngine$";
146157
if (context.Application[ENGINE_KEY] == null)
147158
{
148-
context.Application[ENGINE_KEY] = initializeEngine(context);
159+
context.Application[ENGINE_KEY] = initializeWebDavEngine(context);
149160
}
150161

151162
return (DavEngineAsync)context.Application[ENGINE_KEY];

CS/CalDAVServer.FileSystemStorage.AspNet/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ITHit.Server" version="9.2.5712-Beta2" targetFramework="net451" />
4-
<package id="ITHit.Server.Web" version="9.2.5712-Beta2" targetFramework="net451" />
5-
<package id="ITHit.WebDAV.Server" version="9.2.5712-Beta2" targetFramework="net451" />
3+
<package id="ITHit.Server" version="9.2.5726-Beta2" targetFramework="net451" />
4+
<package id="ITHit.Server.Web" version="9.2.5726-Beta2" targetFramework="net451" />
5+
<package id="ITHit.WebDAV.Server" version="9.2.5726-Beta2" targetFramework="net451" />
66
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net451" />
77
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net451" />
88
<package id="ITHit.Collab" version="1.0.0.732" targetFramework="net45" />
9-
<package id="ITHit.GSuite.Server" version="9.2.5712-Beta2" targetFramework="net451" />
9+
<package id="ITHit.GSuite.Server" version="9.2.5726-Beta2" targetFramework="net451" />
1010
<package id="Google.Apis" version="1.40.2" targetFramework="net451" />
1111
<package id="Google.Apis.Auth" version="1.40.2" targetFramework="net451" />
1212
<package id="Google.Apis.Core" version="1.40.2" targetFramework="net451" />

CS/CalDAVServer.FileSystemStorage.AspNet/web.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@
1414
Every attribute will be stored in a separate file under this folder in this case.
1515
-->
1616
<!-- <add key="AttrStoragePath" value="~/App_Data/WebDav/Attributes/" /> -->
17+
18+
<!--
19+
Google Service Account ID (client_email field from JSON file).
20+
See how to create a service account and a private key here: https://www.webdavsystem.com/server/gsuite/service-account/
21+
-->
1722
<add key="GoogleServiceAccountID" value=""/>
23+
24+
<!--
25+
Google Service private key (private_key field from JSON file).
26+
-->
1827
<add key="GoogleServicePrivateKey" value=""/>
1928
</appSettings>
2029

0 Bytes
Binary file not shown.
Binary file not shown.

CS/CalDAVServer.SqlStorage.AspNet/CalDAVServer.SqlStorage.AspNet.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProductVersion>9.0.30729</ProductVersion>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>F2708F98-3581-44A4-991B-7E75DAFB61D2</ProjectGuid>
9+
<ProjectGuid>C0138731-0841-4EAC-9DBF-72FE9D5A968B</ProjectGuid>
1010
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
1111
<OutputType>Library</OutputType>
1212
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -132,16 +132,16 @@
132132
</ItemGroup>
133133
<ItemGroup>
134134
<Reference Include="ITHit.WebDAV.Server">
135-
<HintPath>..\packages\ITHit.WebDAV.Server.9.2.5712-Beta2\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
135+
<HintPath>..\packages\ITHit.WebDAV.Server.9.2.5726-Beta2\lib\net451\ITHit.WebDAV.Server.dll</HintPath>
136136
</Reference>
137137
<Reference Include="ITHit.Server">
138-
<HintPath>..\packages\ITHit.Server.9.2.5712-Beta2\lib\net451\ITHit.Server.dll</HintPath>
138+
<HintPath>..\packages\ITHit.Server.9.2.5726-Beta2\lib\net451\ITHit.Server.dll</HintPath>
139139
</Reference>
140140
<Reference Include="ITHit.Server.Web">
141-
<HintPath>..\packages\ITHit.Server.Web.9.2.5712-Beta2\lib\net451\ITHit.Server.Web.dll</HintPath>
141+
<HintPath>..\packages\ITHit.Server.Web.9.2.5726-Beta2\lib\net451\ITHit.Server.Web.dll</HintPath>
142142
</Reference>
143143
<Reference Include="ITHit.GSuite.Server">
144-
<HintPath>..\packages\ITHit.GSuite.Server.9.2.5712-Beta2\lib\net451\ITHit.GSuite.Server.dll</HintPath>
144+
<HintPath>..\packages\ITHit.GSuite.Server.9.2.5726-Beta2\lib\net451\ITHit.GSuite.Server.dll</HintPath>
145145
</Reference>
146146
</ItemGroup>
147147
<PropertyGroup>
@@ -159,7 +159,7 @@
159159
<AutoAssignPort>True</AutoAssignPort>
160160
<DevelopmentServerPort>9658</DevelopmentServerPort>
161161
<DevelopmentServerVPath>/</DevelopmentServerVPath>
162-
<IISUrl>http://localhost:12455/</IISUrl>
162+
<IISUrl>http://localhost:10593/</IISUrl>
163163
<NTLMAuthentication>False</NTLMAuthentication>
164164
<UseCustomServer>False</UseCustomServer>
165165
<CustomServerUrl>

CS/CalDAVServer.SqlStorage.AspNet/DavHandler.cs

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using ITHit.Server;
1111
using ITHit.WebDAV.Server;
1212
using ITHit.GSuite.Server;
13+
1314
namespace CalDAVServer.SqlStorage.AspNet
1415
{
1516
/// <summary>
@@ -23,9 +24,19 @@ public class DavHandler : HttpTaskAsyncHandler
2324
/// - IT Hit iCalendar and vCard Library if used in a project
2425
/// </summary>
2526
private readonly string license = File.ReadAllText(HttpContext.Current.Request.PhysicalApplicationPath + "License.lic");
27+
/// <summary>
28+
/// Google Service Account ID (client_email field from JSON file).
29+
/// </summary>
2630
private static readonly string googleServiceAccountID = ConfigurationManager.AppSettings["GoogleServiceAccountID"];
31+
32+
/// <summary>
33+
/// Google Service private key (private_key field from JSON file).
34+
/// </summary>
2735
private static readonly string googleServicePrivateKey = ConfigurationManager.AppSettings["GoogleServicePrivateKey"];
28-
private static readonly string gSuiteLicense = ConfigurationManager.AppSettings["GSuiteLicense"];
36+
37+
/// <summary>
38+
/// This license file is used to activate G Suite Documents Editing for IT Hit WebDAV Server
39+
/// </summary>
2940
private readonly string gSuiteLicense = File.ReadAllText(HttpContext.Current.Request.PhysicalApplicationPath + "GSuiteLicense.lic");
3041

3142
/// <summary>
@@ -60,14 +71,14 @@ public override bool IsReusable
6071
/// </param>
6172
public override async Task ProcessRequestAsync(HttpContext context)
6273
{
63-
DavEngineAsync engine = getOrInitializeEngine(context);
74+
DavEngineAsync webDavEngine = getOrInitializeWebDavEngine(context);
6475

6576
context.Response.BufferOutput = false;
6677
GSuiteEngineAsync gSuiteEngine = getOrInitializeGSuiteEngine(context);
6778

6879
using (var sqlDavContext = new DavContext(context))
6980
{
70-
await engine.RunAsync(sqlDavContext);
81+
await webDavEngine.RunAsync(sqlDavContext);
7182
await gSuiteEngine.RunAsync(ContextConverter.ConvertToGSuiteContext(sqlDavContext));
7283
}
7384
}
@@ -77,12 +88,12 @@ public override async Task ProcessRequestAsync(HttpContext context)
7788
/// </summary>
7889
/// <param name="context">Instance of <see cref="HttpContext"/>.</param>
7990
/// <returns>Initialized <see cref="DavEngine"/>.</returns>
80-
private DavEngineAsync initializeEngine(HttpContext context)
91+
private DavEngineAsync initializeWebDavEngine(HttpContext context)
8192
{
8293

8394
ILogger logger = CalDAVServer.SqlStorage.AspNet.Logger.Instance;
8495
logger.LogFlags = LogFlagsEnum.LogGetResponseBody | LogFlagsEnum.LogPutRequestBody;
85-
DavEngineAsync engine = new DavEngineAsync
96+
DavEngineAsync webDavEngine = new DavEngineAsync
8697
{
8798
Logger = logger
8899

@@ -96,7 +107,7 @@ private DavEngineAsync initializeEngine(HttpContext context)
96107
, UseFullUris = false
97108
};
98109

99-
engine.License = license;
110+
webDavEngine.License = license;
100111
string contentRootPath = HttpContext.Current.Request.MapPath("/");
101112

102113
// Set custom handler to process GET and HEAD requests to folders and display
@@ -106,31 +117,31 @@ private DavEngineAsync initializeEngine(HttpContext context)
106117
// request is not processed.
107118
MyCustomGetHandler handlerGet = new MyCustomGetHandler(contentRootPath);
108119
MyCustomGetHandler handlerHead = new MyCustomGetHandler(contentRootPath);
109-
handlerGet.OriginalHandler = engine.RegisterMethodHandler("GET", handlerGet);
110-
handlerHead.OriginalHandler = engine.RegisterMethodHandler("HEAD", handlerHead);
120+
handlerGet.OriginalHandler = webDavEngine.RegisterMethodHandler("GET", handlerGet);
121+
handlerHead.OriginalHandler = webDavEngine.RegisterMethodHandler("HEAD", handlerHead);
111122

112123
// Set your iCalendar & vCard library license before calling any members.
113124
// iCalendar & vCard library accepts:
114125
// - WebDAV Server Engine license with iCalendar & vCard modules. Verify your license file to see if these modules are specified.
115126
// - or iCalendar and vCard Library license.
116127
ITHit.Collab.LicenseValidator.SetLicense(license);
117128

118-
return engine;
129+
return webDavEngine;
119130
}
120131

121132
/// <summary>
122133
/// Initializes or gets engine singleton.
123134
/// </summary>
124135
/// <param name="context">Instance of <see cref="HttpContext"/>.</param>
125136
/// <returns>Instance of <see cref="DavEngineAsync"/>.</returns>
126-
private DavEngineAsync getOrInitializeEngine(HttpContext context)
137+
private DavEngineAsync getOrInitializeWebDavEngine(HttpContext context)
127138
{
128139
//we don't use any double check lock pattern here because nothing wrong
129140
//is going to happen if we created occasionally several engines.
130141
const string ENGINE_KEY = "$DavEngine$";
131142
if (context.Application[ENGINE_KEY] == null)
132143
{
133-
context.Application[ENGINE_KEY] = initializeEngine(context);
144+
context.Application[ENGINE_KEY] = initializeWebDavEngine(context);
134145
}
135146

136147
return (DavEngineAsync)context.Application[ENGINE_KEY];

CS/CalDAVServer.SqlStorage.AspNet/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="ITHit.Server" version="9.2.5712-Beta2" targetFramework="net451" />
4-
<package id="ITHit.Server.Web" version="9.2.5712-Beta2" targetFramework="net451" />
5-
<package id="ITHit.WebDAV.Server" version="9.2.5712-Beta2" targetFramework="net451" />
3+
<package id="ITHit.Server" version="9.2.5726-Beta2" targetFramework="net451" />
4+
<package id="ITHit.Server.Web" version="9.2.5726-Beta2" targetFramework="net451" />
5+
<package id="ITHit.WebDAV.Server" version="9.2.5726-Beta2" targetFramework="net451" />
66
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net451" />
77
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net451" />
88
<package id="ITHit.Collab" version="1.0.0.732" targetFramework="net45" />
9-
<package id="ITHit.GSuite.Server" version="9.2.5712-Beta2" targetFramework="net451" />
9+
<package id="ITHit.GSuite.Server" version="9.2.5726-Beta2" targetFramework="net451" />
1010
<package id="Google.Apis" version="1.40.2" targetFramework="net451" />
1111
<package id="Google.Apis.Auth" version="1.40.2" targetFramework="net451" />
1212
<package id="Google.Apis.Core" version="1.40.2" targetFramework="net451" />

CS/CalDAVServer.SqlStorage.AspNet/web.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@
2222
<appSettings>
2323
<add key="DebugLoggingEnabled" value="true"/>
2424
<add key="LogPath" value="~/App_Data/WebDav/Logs"/>
25+
26+
<!--
27+
Google Service Account ID (client_email field from JSON file).
28+
See how to create a service account and a private key here: https://www.webdavsystem.com/server/gsuite/service-account/
29+
-->
2530
<add key="GoogleServiceAccountID" value=""/>
31+
32+
<!--
33+
Google Service private key (private_key field from JSON file).
34+
-->
2635
<add key="GoogleServicePrivateKey" value=""/>
2736
</appSettings>
2837

0 commit comments

Comments
 (0)