Grounding.co.za

Technology information for IT specialists
Welcome to Grounding.co.za Sign in | Join | Help
in Search

Sharepoint 2010: System.Data.SqlClient.SqlClientPermission Error

Last post 01-24-2010 20:45 by brian200. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-21-2010 6:52

    • Wilhelm
    • Top 150 Contributor
    • Joined on 01-21-2010
    • Posts 1
    • Points 20

    Sharepoint 2010: System.Data.SqlClient.SqlClientPermission Error

    I started developement on my first Sharepoint project 2 days ago, after Neil introduced us. Thanks Neil :). Obviously I am stuck with some (i guess) newbie questions. My first show stopper is the error i mentioned in the subject.

    Basically I created a new Sharepoint Module from Visual Studio 2010 beta2 and added a Web Part with some "Hello World" text and it worked, but then i added some data classes generated by SQL metal and when i tried to use it i got some Security.SecurityException issue. I increased the web part security levels on sharepoint's web.config to full and the following error occurs when i make my first call to my datacontext (using linq):

    Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    Code:
    MyDataContext db = new MyDataContext ();
    var modules = from m in db.SomeTable
    select m.SomeFiled

    grid.DataSource = modules;
    grid.DataMember = "SomeField";
    grid.DataBind();

    (Nothing special, just connecting to a local sql 2008 database)
    The next thing i tried then was to install the assembly into the gac. and the following error gets raised:
    Cannot initialize SSPI package.
    at exactly the same place. I am at a dead end and really need some advice from the experts. is there something funny about how Sharepoint 2010 handlles security ?? Is it so diffucult to access the database in Sharepoint 2010?

    Thanks in advance,
    Wilhelm
    • Post Points: 20
  • 01-24-2010 20:45 In reply to

    • brian200
    • Top 10 Contributor
    • Joined on 01-21-2010
    • Posts 33
    • Points 155

    Re: Sharepoint 2010: System.Data.SqlClient.SqlClientPermission Error

     far one of our objects has been to underline the fact that right from the days of the Indus Valley Civilization down to the end of the Ghaznavid rule at the fall ase questions of the 12th century A.D. over a period of more than four thousand years, Pakistan has been invariably a single, compact, separate entity either independent or part of powers located to her west; its dependence on or forming part of India was merely an exception and that too for an extremely short period. It was only when the Muslims established mcsa certification themselves at Delhi early in the 13 century A.D. that Pakistan was made a part of India, but not in the pre-Muslim period. And once Muslims’ successors in the sub-continent, the British, relinquished power in the middle of the 20th century, Pakistan reverted to its normal position of an independent country. Indian propaganda that the division of this sub-continent was unnatural and unrealistic is fake and fraudulent. Muslims comptia exams had joined this region of Pakistan with India in the early 13th century A.D. when the Delhi Sultanate was formed; again Muslims have disconnected it from India giving it the normal and natural form which its geographical, ethnical, cultural and religious identity demanded.

    • Post Points: 5
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Afrigator