Wednesday 18 June 2008

System.Security.SecurityException

[TR]
Geliştirdiğim bir webpart'ı sayfaya eklemeye çalıştığımda şöyle bir hata alıyordum:
System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed
Daha sonra bu webpart ile ilgili dll'in GAC'da olmadığını farkettim. dll'i GAC'a atıp iisreset yaptıktan sonra sorun çözüldü

[ENG]
I developed and deployed a webpart to my development server. After adding the web part to my web page I get an error which was:
System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed
Then I realised that I'm not deploying the dll file to GAC. Because of that sharepoint cannot trust this dll. After copying dll to GAC and a quick iisreset the problem has been solved

No comments: