Development of Web Parts - WEBPART Connect to the SQL Database.

xiaoxiao2021-03-06  16

Recently, I learned the development of the web part. The day before yesterday, I did a small example of connecting the SQL database in the web part. I couldn't connect to the database, always appeared in the following exception information: Request for the Permission of Type System .DATA.SQLCLIENTPERMISSION, System.Data, Version = 1.0.5000.0, Culture = neutral, publickeyToken = B77A5C561934E089 failed.

Later, I saw a guy asked the same question in a English forum about SPS. I saw another guy to give him a solution:

Open the web.config file in the virtual directory of the SPS server, there is a node in this file: This node records the directory where the WSS_MINIMALTRUST.CONFIG file is located, and the file is found according to this directory.

Was then added at node wss_minimaltrust.config file child node: ,

Add child nodes in the node:

转载请注明原文地址:https://www.9cbs.com/read-41584.html

New Post(0)