Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.

Commit 86c5d6c

Browse files
committed
Upgrade to 18.3. Fix file corruption
1 parent 0f73e35 commit 86c5d6c

File tree

5 files changed

+47
-53
lines changed

5 files changed

+47
-53
lines changed

GroupDocs.Annotation for .NET/Controllers/DownloadAnnotatedController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public ActionResult Get(string file)
2626

2727
Stream exported;
2828
using (FileStream original = new FileStream(Utils.getStoragePath() + "/" + filename,FileMode.Open)) {
29-
exported = imageHandler.ExportAnnotationsToDocument(original, list, document.DocumentType);
29+
exported = imageHandler.ExportAnnotationsToDocument(original, list);
3030
}
3131

3232
Response.AddHeader("Content-Type", "application/octet-stream");

GroupDocs.Annotation for .NET/GroupDocs.Annotation for .NET.csproj

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<UseGlobalApplicationHostFile />
2525
<NuGetPackageImportStamp>
2626
</NuGetPackageImportStamp>
27+
<Use64BitIISExpress />
2728
</PropertyGroup>
2829
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2930
<DebugSymbols>true</DebugSymbols>
@@ -43,9 +44,8 @@
4344
<WarningLevel>4</WarningLevel>
4445
</PropertyGroup>
4546
<ItemGroup>
46-
<Reference Include="GroupDocs.Annotation, Version=17.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
47-
<HintPath>..\packages\GroupDocs.Annotation.17.12.0\lib\GroupDocs.Annotation.dll</HintPath>
48-
<Private>True</Private>
47+
<Reference Include="GroupDocs.Annotation, Version=18.3.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
48+
<HintPath>..\packages\GroupDocs.Annotation.18.3.0\lib\GroupDocs.Annotation.dll</HintPath>
4949
</Reference>
5050
<Reference Include="Microsoft.AI.Agent.Intercept, Version=2.0.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5151
<HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.0.6\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
@@ -216,6 +216,4 @@
216216
<Target Name="AfterBuild">
217217
</Target>
218218
-->
219-
</Project>
220-
221-
219+
</Project>

GroupDocs.Annotation for .NET/Models/Utils.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Configuration;
1010
using GroupDocs.Annotation.Handler.Input.DataObjects;
1111
using GroupDocs.Annotation.Handler.Input;
12+
using System.Runtime.CompilerServices;
1213

1314
namespace GroupDocs.Annotation_for.NET.Models
1415
{
@@ -28,6 +29,7 @@ public static string getStoragePath()
2829
return AppDomain.CurrentDomain.GetData("DataDirectory") + ConfigurationManager.AppSettings["StoragePath"];
2930
}
3031

32+
[MethodImpl(MethodImplOptions.Synchronized)]
3133
public static Document findDocumentByName(string filename)
3234
{
3335
AnnotationImageHandler imageHandler = Utils.createAnnotationImageHandler();
@@ -40,9 +42,9 @@ public static Document findDocumentByName(string filename)
4042

4143
long documentId = imageHandler.CreateDocument(filename);
4244

43-
using (FileStream original = new FileStream(Utils.getStoragePath() + "/" + filename,FileMode.Create)) {
44-
imageHandler.ImportAnnotations(original, documentId);
45-
}
45+
// using (FileStream original = new FileStream(Utils.getStoragePath() + "/" + filename,FileMode.Create)) {
46+
// imageHandler.ImportAnnotations(original, documentId);
47+
// }
4648
return documentDataHandler.Get(documentId);
4749
}
4850
}

GroupDocs.Annotation for .NET/Web.config

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,81 +5,75 @@
55
-->
66
<configuration>
77
<appSettings>
8-
<add key="webpages:Version" value="3.0.0.0"/>
9-
<add key="webpages:Enabled" value="false"/>
10-
<add key="PreserveLoginUrl" value="true"/>
11-
<add key="ClientValidationEnabled" value="true"/>
12-
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
13-
<add key="StoragePath" value="/Storage"/>
8+
<add key="webpages:Version" value="3.0.0.0" />
9+
<add key="webpages:Enabled" value="false" />
10+
<add key="PreserveLoginUrl" value="true" />
11+
<add key="ClientValidationEnabled" value="true" />
12+
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
13+
<add key="StoragePath" value="/Storage" />
1414
</appSettings>
1515
<system.web>
16-
<compilation debug="true" targetFramework="4.5"/>
17-
<httpRuntime targetFramework="4.5"/>
16+
<compilation debug="true" targetFramework="4.5" />
17+
<httpRuntime targetFramework="4.5" />
1818
<pages>
1919
<namespaces>
20-
<add namespace="System.Web.Helpers"/>
21-
<add namespace="System.Web.Mvc"/>
22-
<add namespace="System.Web.Mvc.Ajax"/>
23-
<add namespace="System.Web.Mvc.Html"/>
24-
<add namespace="System.Web.Routing"/>
25-
<add namespace="System.Web.WebPages"/>
20+
<add namespace="System.Web.Helpers" />
21+
<add namespace="System.Web.Mvc" />
22+
<add namespace="System.Web.Mvc.Ajax" />
23+
<add namespace="System.Web.Mvc.Html" />
24+
<add namespace="System.Web.Routing" />
25+
<add namespace="System.Web.WebPages" />
2626
</namespaces>
2727
</pages>
2828
<httpModules>
29-
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
29+
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
3030
</httpModules>
3131
</system.web>
3232
<system.webServer>
33-
<validation validateIntegratedModeConfiguration="false"/>
33+
<validation validateIntegratedModeConfiguration="false" />
3434
<handlers>
35-
<remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
36-
<remove name="OPTIONSVerbHandler"/>
37-
<remove name="TRACEVerbHandler"/>
38-
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler"
39-
preCondition="integratedMode,runtimeVersionv4.0"/>
35+
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
36+
<remove name="OPTIONSVerbHandler" />
37+
<remove name="TRACEVerbHandler" />
38+
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
4039
</handlers>
4140
<modules>
42-
<remove name="ApplicationInsightsWebTracking"/>
43-
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
44-
preCondition="managedHandler"/>
41+
<remove name="ApplicationInsightsWebTracking" />
42+
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
4543
</modules>
4644
</system.webServer>
4745
<runtime>
4846
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
4947
<dependentAssembly>
50-
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
51-
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
48+
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
49+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
5250
</dependentAssembly>
5351
<dependentAssembly>
54-
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
55-
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
52+
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
53+
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
5654
</dependentAssembly>
5755
<dependentAssembly>
58-
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
59-
<bindingRedirect oldVersion="1.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
56+
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
57+
<bindingRedirect oldVersion="1.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
6058
</dependentAssembly>
6159
<dependentAssembly>
62-
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/>
63-
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
60+
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
61+
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
6462
</dependentAssembly>
6563
<dependentAssembly>
66-
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
67-
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
64+
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
65+
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
6866
</dependentAssembly>
6967
<dependentAssembly>
70-
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/>
71-
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
68+
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
69+
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
7270
</dependentAssembly>
7371
</assemblyBinding>
7472
</runtime>
7573
<system.codedom>
7674
<compilers>
77-
<compiler language="c#;cs;csharp" extension=".cs"
78-
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
79-
warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
80-
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
81-
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
82-
warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
75+
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
76+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
8377
</compilers>
8478
</system.codedom>
8579
</configuration>

GroupDocs.Annotation for .NET/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="GroupDocs.Annotation" version="17.12.0" targetFramework="net45" />
3+
<package id="GroupDocs.Annotation" version="18.3.0" targetFramework="net45" />
44
<package id="Microsoft.ApplicationInsights" version="2.2.0" targetFramework="net45" />
55
<package id="Microsoft.ApplicationInsights.Agent.Intercept" version="2.0.6" targetFramework="net45" />
66
<package id="Microsoft.ApplicationInsights.DependencyCollector" version="2.2.0" targetFramework="net45" />

0 commit comments

Comments
 (0)