I am getting an error with trying to make a HttpWebRequest inside a web part, I'm getting a SecurityException saying that System.Net.WebPermission failed. While searching for an answer, I came across this question. One of the answers was to use a farm solution. I'm very new to developing with SharePoint so I'm not exactly sure what this means.

I currently have a development SharePoint VM set up with Visual Studio running on it. How would I be able to work on my web part and be able to not get this exception thrown?

Thanks a ton!


When you create a SharePoint project in VS, look at the dialog that appears: it asks which site you want to use for debugging, and the second question is whether you want it to be a sandbox or a farm solution. (or, for an existing project, you can change this in the properties of the project).

There's already been a lot written on both, so read up on them and post any specific questions you have.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.