Skip to content

Commit 3eca549

Browse files
update to v9.6.40
1 parent ea56559 commit 3eca549

File tree

11 files changed

+399
-0
lines changed

11 files changed

+399
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>
7+
</ProductVersion>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<ProjectGuid>{7E8DCDC0-7C0E-47C5-B576-2CC2725B4384}</ProjectGuid>
10+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
11+
<OutputType>Library</OutputType>
12+
<AppDesignerFolder>Properties</AppDesignerFolder>
13+
<RootNamespace>asp.net_test</RootNamespace>
14+
<AssemblyName>asp.net_test</AssemblyName>
15+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
16+
<UseIISExpress>true</UseIISExpress>
17+
<Use64BitIISExpress />
18+
<IISExpressSSLPort>44303</IISExpressSSLPort>
19+
<IISExpressAnonymousAuthentication />
20+
<IISExpressWindowsAuthentication />
21+
<IISExpressUseClassicPipelineMode />
22+
<UseGlobalApplicationHostFile />
23+
<NuGetPackageImportStamp>
24+
</NuGetPackageImportStamp>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
27+
<DebugSymbols>true</DebugSymbols>
28+
<DebugType>full</DebugType>
29+
<Optimize>false</Optimize>
30+
<OutputPath>bin\</OutputPath>
31+
<DefineConstants>DEBUG;TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
36+
<DebugType>pdbonly</DebugType>
37+
<Optimize>true</Optimize>
38+
<OutputPath>bin\</OutputPath>
39+
<DefineConstants>TRACE</DefineConstants>
40+
<ErrorReport>prompt</ErrorReport>
41+
<WarningLevel>4</WarningLevel>
42+
</PropertyGroup>
43+
<ItemGroup>
44+
<Reference Include="Dynamsoft.BarcodeReader, Version=9.6.40.0220, Culture=neutral, PublicKeyToken=ad0967c36e09320a, processorArchitecture=MSIL">
45+
<HintPath>..\packages\Dynamsoft.DotNet.Barcode.9.6.40\lib\net40\Dynamsoft.BarcodeReader.dll</HintPath>
46+
</Reference>
47+
<Reference Include="DynamsoftCommon, Version=1.1.0.0, Culture=neutral, PublicKeyToken=ad0967c36e09320a, processorArchitecture=MSIL">
48+
<HintPath>..\packages\Dynamsoft.DotNet.Barcode.9.6.40\lib\net40\DynamsoftCommon.dll</HintPath>
49+
</Reference>
50+
<Reference Include="Microsoft.CSharp" />
51+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
52+
<HintPath>..\packages\Newtonsoft.Json.13.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
53+
</Reference>
54+
<Reference Include="System.Web.DynamicData" />
55+
<Reference Include="System.Web.Entity" />
56+
<Reference Include="System.Web.ApplicationServices" />
57+
<Reference Include="System.ComponentModel.DataAnnotations" />
58+
<Reference Include="System" />
59+
<Reference Include="System.Data" />
60+
<Reference Include="System.Core" />
61+
<Reference Include="System.Data.DataSetExtensions" />
62+
<Reference Include="System.Web.Extensions" />
63+
<Reference Include="System.Xml.Linq" />
64+
<Reference Include="System.Drawing" />
65+
<Reference Include="System.Web" />
66+
<Reference Include="System.Xml" />
67+
<Reference Include="System.Configuration" />
68+
<Reference Include="System.Web.Services" />
69+
<Reference Include="System.EnterpriseServices" />
70+
</ItemGroup>
71+
<ItemGroup>
72+
<Content Include="ReadBarcode.ashx" />
73+
<None Include="packages.config" />
74+
<None Include="Web.Debug.config">
75+
<DependentUpon>Web.config</DependentUpon>
76+
</None>
77+
<None Include="Web.Release.config">
78+
<DependentUpon>Web.config</DependentUpon>
79+
</None>
80+
</ItemGroup>
81+
<ItemGroup>
82+
<Content Include="Global.asax" />
83+
<Content Include="index.html" />
84+
<Content Include="Web.config" />
85+
</ItemGroup>
86+
<ItemGroup>
87+
<Compile Include="Global.asax.cs">
88+
<DependentUpon>Global.asax</DependentUpon>
89+
</Compile>
90+
<Compile Include="Properties\AssemblyInfo.cs" />
91+
<Compile Include="ReadBarcode.ashx.cs">
92+
<DependentUpon>ReadBarcode.ashx</DependentUpon>
93+
</Compile>
94+
</ItemGroup>
95+
<PropertyGroup>
96+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
97+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
98+
</PropertyGroup>
99+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
100+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
101+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
102+
<ProjectExtensions>
103+
<VisualStudio>
104+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
105+
<WebProjectProperties>
106+
<UseIIS>True</UseIIS>
107+
<AutoAssignPort>True</AutoAssignPort>
108+
<DevelopmentServerPort>51847</DevelopmentServerPort>
109+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
110+
<IISUrl>https://localhost:44303/</IISUrl>
111+
<NTLMAuthentication>False</NTLMAuthentication>
112+
<UseCustomServer>False</UseCustomServer>
113+
<CustomServerUrl>
114+
</CustomServerUrl>
115+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
116+
</WebProjectProperties>
117+
</FlavorProperties>
118+
</VisualStudio>
119+
</ProjectExtensions>
120+
<Import Project="..\packages\Dynamsoft.DotNet.Barcode.9.6.40\build\Dynamsoft.DotNet.Barcode.targets" Condition="Exists('..\packages\Dynamsoft.DotNet.Barcode.9.6.40\build\Dynamsoft.DotNet.Barcode.targets')" />
121+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
122+
<PropertyGroup>
123+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
124+
</PropertyGroup>
125+
<Error Condition="!Exists('..\packages\Dynamsoft.DotNet.Barcode.9.6.40\build\Dynamsoft.DotNet.Barcode.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Dynamsoft.DotNet.Barcode.9.6.40\build\Dynamsoft.DotNet.Barcode.targets'))" />
126+
</Target>
127+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
128+
Other similar extension points exist, see Microsoft.Common.targets.
129+
<Target Name="BeforeBuild">
130+
</Target>
131+
<Target Name="AfterBuild">
132+
</Target>
133+
-->
134+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Codebehind="Global.asax.cs" Inherits="asp.net_test.Global" Language="C#" %>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Security;
6+
using System.Web.SessionState;
7+
using Dynamsoft;
8+
using Dynamsoft.DBR;
9+
10+
namespace asp.net_test
11+
{
12+
public class Global : System.Web.HttpApplication
13+
{
14+
15+
protected void Application_Start(object sender, EventArgs e)
16+
{
17+
int countForThisDevice = 4; // The count value should be set based on your purchased license count
18+
int countForThisProcess = 4; // The count value should be set based on your purchased license count
19+
int timeout = 5000; // The timeout value should be set based on your application design
20+
BarcodeReader.SetMaxConcurrentInstanceCount(countForThisDevice, countForThisProcess, timeout);
21+
// 1.Initialize license.
22+
// The string "DLS2ey***" here is a free public trial license. Note that network connection is required for this license to work.
23+
// You can also request a 30-day trial license in the customer portal: https://www.dynamsoft.com/customer/license/trialLicense?architecture=dcv&product=dbr&utm_source=github&package=dotnet
24+
EnumErrorCode error = BarcodeReader.InitLicense("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTEwMjE4MTkyNyIsIm1haW5TZXJ2ZXJVUkwiOiJodHRwczovL21sdHMuZHluYW1zb2Z0LmNvbS8iLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInN0YW5kYnlTZXJ2ZXJVUkwiOiJodHRwczovL3NsdHMuZHluYW1zb2Z0LmNvbS8iLCJjaGVja0NvZGUiOi03MjExOTE0Mjl9", out string errorMsg);
25+
if (error != EnumErrorCode.DBR_SUCCESS)
26+
{
27+
throw new Exception("InitLicense failed: " + errorMsg);
28+
}
29+
}
30+
31+
protected void Session_Start(object sender, EventArgs e)
32+
{
33+
34+
}
35+
36+
protected void Application_BeginRequest(object sender, EventArgs e)
37+
{
38+
39+
}
40+
41+
protected void Application_AuthenticateRequest(object sender, EventArgs e)
42+
{
43+
44+
}
45+
46+
protected void Application_Error(object sender, EventArgs e)
47+
{
48+
49+
}
50+
51+
protected void Session_End(object sender, EventArgs e)
52+
{
53+
54+
}
55+
56+
protected void Application_End(object sender, EventArgs e)
57+
{
58+
59+
}
60+
}
61+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("ConcurrentInstance")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("ConcurrentInstance")]
13+
[assembly: AssemblyCopyright("Copyright © 2024")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("9e231a87-d771-41ee-b64f-0e774cb3349f")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ WebHandler Language="C#" CodeBehind="ReadBarcode.ashx.cs" Class="asp.net_test.ReadBarcode" %>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using Newtonsoft.Json.Linq;
6+
using Dynamsoft;
7+
using Dynamsoft.DBR;
8+
9+
namespace asp.net_test
10+
{
11+
/// <summary>
12+
/// Summary description for ReadBarcode
13+
/// </summary>
14+
public class ReadBarcode : IHttpHandler
15+
{
16+
17+
public void ProcessRequest(HttpContext context)
18+
{
19+
// Get an idle instance to process the barcode decoding request.
20+
BarcodeReader barcodeReader = BarcodeReader.GetInstance();
21+
if (barcodeReader == null)
22+
{
23+
context.Response.Write("No barcode decoding instance available.");
24+
}
25+
else
26+
{
27+
context.Response.ContentType = "application/json";
28+
HttpPostedFile imgBinary = context.Request.Files["imgBinary"];
29+
if (imgBinary == null)
30+
return;
31+
byte[] buffer = new byte[imgBinary.ContentLength];
32+
imgBinary.InputStream.Read(buffer, 0, imgBinary.ContentLength);
33+
TextResult[] textResults = barcodeReader.DecodeFileInMemory(buffer, "");
34+
35+
JArray jAryResults = JArray.FromObject(textResults);
36+
JObject jobj = new JObject(
37+
new JProperty("results", jAryResults)
38+
);
39+
context.Response.Write(jobj);
40+
// Recycle the instance to make it idle for other concurrent tasks
41+
barcodeReader.Recycle();
42+
}
43+
}
44+
45+
public bool IsReusable
46+
{
47+
get
48+
{
49+
return false;
50+
}
51+
}
52+
}
53+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<!--
19+
In the example below, the "Replace" transform will replace the entire
20+
<customErrors> section of your web.config file.
21+
Note that because there is only one customErrors section under the
22+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
23+
24+
<customErrors defaultRedirect="GenericError.htm"
25+
mode="RemoteOnly" xdt:Transform="Replace">
26+
<error statusCode="500" redirect="InternalError.htm"/>
27+
</customErrors>
28+
-->
29+
</system.web>
30+
</configuration>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!-- For more information on using web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=125889 -->
4+
5+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6+
<!--
7+
In the example below, the "SetAttributes" transform will change the value of
8+
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9+
finds an attribute "name" that has a value of "MyDB".
10+
11+
<connectionStrings>
12+
<add name="MyDB"
13+
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14+
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15+
</connectionStrings>
16+
-->
17+
<system.web>
18+
<compilation xdt:Transform="RemoveAttributes(debug)" />
19+
<!--
20+
In the example below, the "Replace" transform will replace the entire
21+
<customErrors> section of your web.config file.
22+
Note that because there is only one customErrors section under the
23+
<system.web> node, there is no need to use the "xdt:Locator" attribute.
24+
25+
<customErrors defaultRedirect="GenericError.htm"
26+
mode="RemoteOnly" xdt:Transform="Replace">
27+
<error statusCode="500" redirect="InternalError.htm"/>
28+
</customErrors>
29+
-->
30+
</system.web>
31+
</configuration>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!--
4+
For more information on how to configure your ASP.NET application, please visit
5+
https://go.microsoft.com/fwlink/?LinkId=169433
6+
-->
7+
8+
<configuration>
9+
<system.web>
10+
<compilation debug="true" targetFramework="4.0" />
11+
</system.web>
12+
13+
</configuration>

0 commit comments

Comments
 (0)