This may sounds easy, but it can cause small headache. It happened to me :) I have developed simple event receiver which creates log to the workflow history list and sends email to somebody. But since I uploaded and activated solution on production server, my solution stopped working. After few minutes of testing and reading log files in 12 hive I found this error message: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Some articles about deployment
http://msdn.microsoft.com/en-us/library/dd583158(v=office.11).aspx
http://msdn.microsoft.com/en-us/library/ie/gg749858.aspx
http://msdn.microsoft.com/en-us/library/ee231562.aspx
led me to find where real problem was. Assemblies installed to the global assembly cache (GAC) run with Full trust, but when I looked to the GAC I couldn't see my dll. So I tried to install it to the GAC. And since than its working like a charm. Conclusion is that is possible to create wsp file from your project (Visual Studio -> Build -> Package), upload(Share Point (home page) -> Site Actions -> Site Settings -> Solutions) and activate it. But if your dll is not in GAC you probably won't be able to use some classes as articles from msdn mentioned.
I am not sure if it is best approach but it works for me... So if you know better one, please let me know :)
Happy coding...
Thursday, January 26, 2012
Activate solution button is disabled
Recently I solved problem that I couldn't activate my solution. Since you are farm administrator and site collection administrator you are probably able to upload a new solution. And in case that no errors messages are connected with activating solution and activation button is grayed out you can try this approach which helped in my case. My SharePoint farm was installed recently and this was first uploaded solution (this is important part 'cause if you have some solution of yours already uploaded and activated, this solution probably won't be helpful for you)
All you need to do is start Microsoft SharePoint Foundation Sandboxed Code Service service. So go to the Central Administration -> System Settings -> Manage Services on Server and start service I mentioned above.
Hope that helps somebody...
All you need to do is start Microsoft SharePoint Foundation Sandboxed Code Service service. So go to the Central Administration -> System Settings -> Manage Services on Server and start service I mentioned above.
Hope that helps somebody...
Subscribe to:
Posts (Atom)