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