简体   繁体   中英

ServiceStack license error after packaging

In my ServiceStack client application, everything was fine until I have tried packaging it with SmartAssembly or ILRepack. There are three DLLs: ( ServiceStack.Client.dll, ServiceStack.Interfaces.dll, ServiceStack.Text.dll ) Which when packed cause my application to crash, no matter whether I use encryption\\obfuscation options or just pack them into one EXE. My app is targeting .NET 4.0 (I want to support win XP). Stack trace of the exception is:

ServiceStack.LicenseException: Unauthorized access request of a licensed feature. Type: 'AccessToken', Assembly: 'ClientTester.exe', 'My EXE path'
ServiceStack.Net40PclExport.VerifyInAssembly(Type accessType, ICollection`1 assemblyNames)
ServiceStack.LicenseUtils.RequestAccess(Object accessToken, LicenseFeature srcFeature, LicenseFeature requestedAccess)
ServiceStack.JsonServiceClient.ToJson[T](T o)
ServiceStack.EncryptedServiceClient.CreateEncryptedMessage(Object request, String operationName, Byte[] cryptKey, Byte[] authKey, Byte[] iv, String verb)
ServiceStack.EncryptedServiceClient.Send[TResponse](String httpMethod, Object request)

I can't install the patch as the installer says that it is blocked or the conditions are invalid. In addition, I am not sure that this patch would help me. Any ideas are welcome.
Sidenote: another ServiceStack application, which uses other ServiceStack DLLs except aforementioned ones works well even when packed.

It looks like the absence of an explicitly installed .NET Framework 4.0 is causing that issue. If I compile the solution for 4.5\\4.6 version and pack it - everything is fine. Also compiling and packing it for .NET 4.0 and using it on PC that EXPLICITLY has this version installed works as well

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM