Monday, February 18, 2008

Let's Talk about .. InfoPath 2007-Error Request for the permission of type 'System.Data.SqlClient.SqlClientPermission failed

Today I connected my InfoPath form to the SQL database, but when I ran it, I got the error "Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." I read some articles in the internet, and I tried to solve this problem by setting the full trust, and it works.
The instruction about how to set Full Trust.
  1. In the desing mode, click menu Tools.
  2. Click Form Options...
  3. Select Category Security and Trust.
  4. Check out the Automatically determine security level.
  5. Check Full Trust.
  6. Create the Certificate.
  7. Select that Certificate.
  8. Click OK.

Then, when you open the form, you have to trust this certificate for the first time of using the form.

No comments: