ASP.NET 용 IronWebScraper 라이선스 키
문제는 IronWebScraper 버전 2024.3.6 기준으로 해결되었습니다.
Exception: Unhandled exception. IronSoftware.Exceptions.LicensingException: IronWebScraper must be licensed for development.
IronWebScraper 구버전, 특히 2023.4.13 버전과 2024.3.6 버전 사이에는 다음과 같은 라이선스 문제가 있는 것으로 알려져 있습니다.
- ASP.NET 프로젝트
- .NET Framework 버전 4.6.2 이상
Web.config 파일에 저장된 키는 제품에 의해 절대 감지되거나 사용되지 않습니다.
해결 방법
이 문제를 해결하기 위해서는 Web.config 파일에서 ConfigurationManager를 사용하여 라이선스 키를 검색한 후 코드의 License.LicenseKey 속성에 적용하는 것이 권장됩니다.
예:
<configuration>
...
<appSettings>
<add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
<configuration>
...
<appSettings>
<add key="IronWebScraper.LicenseKey" value="IRONWEBSCRAPER-MYLICENSE-KEY-1EF01"/>
</appSettings>
...
</configuration>
위에서 제공된 XML 파일을 사용하면 ConfigurationManager를 통해 라이선스 키 값을 가져와 IronWebScraper.License.LicenseKey 속성에 전달할 수 있습니다.
// Retrieve the license key from the appSettings section of the Web.config file.
string licenseKey = ConfigurationManager.AppSettings["IronWebScraper.LicenseKey"];
// Assign the license key to the IronWebScraper's LicenseKey property.
IronWebScraper.License.LicenseKey = licenseKey;
// Retrieve the license key from the appSettings section of the Web.config file.
string licenseKey = ConfigurationManager.AppSettings["IronWebScraper.LicenseKey"];
// Assign the license key to the IronWebScraper's LicenseKey property.
IronWebScraper.License.LicenseKey = licenseKey;
' Retrieve the license key from the appSettings section of the Web.config file.
Dim licenseKey As String = ConfigurationManager.AppSettings("IronWebScraper.LicenseKey")
' Assign the license key to the IronWebScraper's LicenseKey property.
IronWebScraper.License.LicenseKey = licenseKey

