I have already change the class property to “Server“, but the mistake still exist.
I have already change the class property to “Server“, but the mistake still exist.
public static str GeCompanyName()
{
str companyName;
lucktest001.SvcSoapClient lucktestsvc;
;
new InteropPermission(InteropKind::ClrInterop).assert();
lucktestsvc = new lucktest001.SvcSoapClient("SvcSoap");
companyName =lucktestsvc.FetchCompanyInfo("rpsz");
return companyName;
}
hi DAniele, thank you for your answer,i change my code, now it's ok
thank you very very very much, i change the InteropKind::ClrInterop, it's ok now.
... but note that the documentation page is for AX 2012 and several things are different in AX 2009. Not WCF as such, of course, but things inside AX.
Please always full error messages - your screenshot shows just a part of the first message. Also, paste them to the forum as text - it allows others to work with them and it also means that other people with the same problem can find this thread by searching.
You told us nothing about your implementation, but your code and the second error message suggest that it's actually a CLR class. But you have a wrong interop type in InteropPermission constructor - it should be ClrInterop, not ComInterop.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156