Kişi bilgileri gizlidir. Logo çalışanları görebilir.

Logo Rest Service "Object reference not set to an instance of an object" Hatası

  Tiger/REST 2.63

Merhaba,

Logo rest servisine istek atınca şu şekilde hata alıyorum.

{
"Message": "The request is invalid.",
"ModelState": {
"ServerError": [
"Exception : Object reference not set to an instance of an object."
]
}
}


Gönderdiğim model ile ilgili bir hata değil. Başka yerlerde çalışan bir yapı. Event viewer hataları ise şu şekilde;


[Error|PID21768] - UnityAppItem-SwitchUser-Thread8 (CorrelationId:400599ae-8de2-4436-a06e-8406bf4416dc)  (ExecutionTime:2020/03/23 15:07:22)  (CurrentMainThreadId:8)  (Message:Switch User Error For (logousernamehere,logopasswordhere))  (Timestamp:2020-03-23T15:07:22.082Z)  (IP:)  (Dbrange:0-0)  (CorrelationId:400599ae-8de2-4436-a06e-8406bf4416dc)  (ExecutionTime:2020/03/23 15:07:22)  (CurrentMainThreadId:8)  (Message:Switch User Error For (logopasswordhere,logousernamehere))  (Timestamp:2020-03-23T15:07:22.082Z)  (IP:)  (Dbrange:0-0)

---


Message: Login Hatası ! Switch Error: 0 - Unknown Error !

Source: LogoObjects.RestService.Core

TargetSite: System.String SwitchUser(System.String, System.String, Int32, Int32)


---


StackTrace:    at LogoObjects.RestService.Core.Models.OAuth.UnityAppItem.SwitchUser(String userName, String password, Int32 firmNr, Int32 periodNr)
at LogoObjects.RestService.Core.Helpers.UnityAppHelper.PopUnityApp(String userName, String password, String dbName, String logoDB, String sessionId, Int32 firmNr, Int32 periodNr, Boolean isLoginEx, Nullable`1 transactionId, String loginExKey, String tokenUserName)
at LogoObjects.RestService.Core.Helpers.UnityAppHelper.GetApplicationItem(ClientThread threadItem, String accessToken, Nullable`1 transactionId, Nullable`1 setTransactionId)



[Error|PID21768] - ExceptionHelper-GetExceptionMessage-Thread8 (CorrelationId:400599ae-8de2-4436-a06e-8406bf4416dc)  (ExecutionTime:2020/03/23 15:07:22)  (CurrentMainThreadId:8)  (Message:Stack Trace :    at LogoObjects.RestService.Core.Models.OAuth.UnityAppItem.SwitchUser(String userName, String password, Int32 firmNr, Int32 periodNr)
at LogoObjects.RestService.Core.Helpers.UnityAppHelper.PopUnityApp(String userName, String password, String dbName, String logoDB, String sessionId, Int32 firmNr, Int32 periodNr, Boolean isLoginEx, Nullable`1 transactionId, String loginExKey, String tokenUserName)
at LogoObjects.RestService.Core.Helpers.UnityAppHelper.GetApplicationItem(ClientThread threadItem, String accessToken, Nullable`1 transactionId, Nullable`1 setTransactionId))  (Timestamp:2020-03-23T15:07:22.098Z)  (IP:)  (Dbrange:0-0)  (CorrelationId:400599ae-8de2-4436-a06e-8406bf4416dc)  (ExecutionTime:2020/03/23 15:07:22)  (CurrentMainThreadId:8)  (Message:Stack Trace :    at LogoObjects.RestService.Core.Models.OAuth.UnityAppItem.SwitchUser(String userName, String password, Int32 firmNr, Int32 periodNr)
at LogoObjects.RestService.Core.Helpers.UnityAppHelper.PopUnityApp(String userName, String password, String dbName, String logoDB, String sessionId, Int32 firmNr, Int32 periodNr, Boolean isLoginEx, Nullable`1 transactionId, String loginExKey, String tokenUserName)
at LogoObjects.RestService.Core.Helpers.UnityAppHelper.GetApplicationItem(ClientThread threadItem, String accessToken, Nullable`1 transactionId, Nullable`1 setTransactionId))  (Timestamp:2020-03-23T15:07:22.098Z)  (IP:)  (Dbrange:0-0)


NOT: aynı hatayı kendi bilgisayarımda da aldım.

NOT2: aynı alanları logoobjects.exe ile gönderip test ettim. Başarılı bir şekilde aktardı. Kısaca alanlar ile ilgili bir hata değil.




restservice


Kişi bilgileri gizlidir. Logo çalışanları görebilir.
Onaylanmış Cevap

Selam,

https://forum.logo.com.tr/index.php?page=details&konu=logo-rest-servis-token-alma-problemi-hk linkindeki çözümü denedim. Kısaca yeni kullanıcı açıp ilgili yetkileri verdiğinizde hata çözülüyor.

Rest servis kullanımı ile ilgili Postman collection dosyasını ek olarak paylaşıyorum.

Logo Tiger Rest.postman_collection.json



23/03/20 23:25

Cevap vermek için giriş yapmanız gerekmektedir.