web.config에서 IronZIP 라이선스 설정
Curtis Chau
업데이트됨: 2026년 7월 21일
이 문제는 2024.3.3 이전에 출시된 IronZIP 버전에서 영향을 미치는 것으로 알려져 있습니다.
유의 사항: 해당 버전의 발표 릴리스 노트에는 Web.config/appSettings 라이선싱 수정 사항이 구체적으로 나열되어 있지 않으므로, 만약 2024.3.3 버전 이상을 사용 중이며 여전히 이 예외가 발생한다면 아래의 해결 방법이 여전히 적용됩니다.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronZip must be licensed for development.
SHELL
이전 IronZIP 버전, 특히 2024.3.3 버전 이전에 출시된 버전에서는 다음에서 알려진 라이선스 문제가 있습니다:
- ASP.NET 프로젝트
- .NET Framework 버전 4.6.2 이상
Web.config 파일에 저장된 키는 절대 제품에서 인식하여 사용되지 않습니다.
해결 방법
이 문제를 해결하기 위해 코드는 ConfigurationManager를 사용하여 Web.config 파일에서 라이선스 키를 검색한 다음 License.LicenseKey 속성에 적용하는 것이 권장됩니다.
예:
<configuration>
...
<appSettings>
<add key="IronZip.LicenseKey" value="IRONZIP.MYLICENSE.KEY.1EF01"/>
</appSettings>
...
</configuration>
XML
위에 제공된 XML 파일을 사용하여 ConfigurationManager를 통해 라이선스 키 값을 검색하고 이를 IronZip.License.LicenseKey 속성에 전달할 수 있습니다.
using System;
using System.Configuration;
class Program
{
static void Main()
{
// Retrieve the license key from the web.config appSettings
string licenseKey = ConfigurationManager.AppSettings["IronZip.LicenseKey"];
// Apply the license key to IronZip
IronZip.License.LicenseKey = licenseKey;
// Verify that the license key is set properly
Console.WriteLine("License key applied successfully.");
}
}Imports System
Imports System.Configuration
Friend Class Program
Shared Sub Main()
' Retrieve the license key from the web.config appSettings
Dim licenseKey As String = ConfigurationManager.AppSettings("IronZip.LicenseKey")
' Apply the license key to IronZip
IronZip.License.LicenseKey = licenseKey
' Verify that the license key is set properly
Console.WriteLine("License key applied successfully.")
End Sub
End ClassImports System
Imports System.Configuration
Friend Class Program
Shared Sub Main()
' Retrieve the license key from the web.config appSettings
Dim licenseKey As String = ConfigurationManager.AppSettings("IronZip.LicenseKey")
' Apply the license key to IronZip
IronZip.License.LicenseKey = licenseKey
' Verify that the license key is set properly
Console.WriteLine("License key applied successfully.")
End Sub
End Classusing System.Configuration;지시문은Web.config과 같은 구성 파일에 대한 접근을 허용합니다.ConfigurationManager.AppSettings["IronZip.LicenseKey"]는Web.config의appSettings섹션에 저장된 라이선스 키를 검색합니다.IronZip.License.LicenseKey = licenseKey;는 라이선스 예외를 피하기 위해 IronZIP 라이브러리에 검색한 키를 할당합니다.Console.WriteLine()문장은 개발자에게 라이선스 키 적용 프로세스가 성공적으로 완료되었음을 피드백합니다.
커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.