I am new to .net and sharepoint world and using sharepoint 2013. My custom webpart is accessing a webservice, which is in the different solution. When I run the webpart in the debug mode in Visual Studio, the custom webpart is working fine and assessing the webservice, but when I deploy it using the following instruction. SharePoint Online(2013) - Web Part Deployment I am getting the following exceptions:
Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. Correlation ID: f8b2499d-e666-f05b-589b-c4d87c65a480.
[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
any idea if I need to change some settings in the web.config or any other place?