I am trying to create an Infopath-formular, which, when filled out properly, should call the lists.asmx webservice to add Data to a certain list. However, the call to the webservice doesnt work properly and i get a SecurityException.
However after debugging i have experienced that the SecurityException is thrown way earlier, when creating the NetworkCredential for logging in. All i do is
NetworkCredential x = new NetworkCredential();
x.UserName = "myUser";
x.Domain = "myDomain";
x.Password = "myPasword";
And i get the following Exception when monitoring x.Domain or x.Password:
Message: Fehler bei der Anforderung des Berechtigungstyps "System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
Source: mscorlib
Stack:
bei System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
bei System.Security.CodeAccessPermission.Demand()
bei System.Net.NetworkCredential.get_Password()
What should i do? My Guess is that there is some kind of trust level in Infopath which i have to set down. But no idea how to accomplish that.
Thanks in Advance!
edit: I did find this site: http://www.gleamtech.com/support/forums/2458/net-permission-problem Unfortunately this didnt help me (trust level already set to highest)