title: SharePoint webpart + visual studio + register as safe
body: <p>I have created a webpart. However it keeps complain that I have not "registered as safe":</p>
  
  <p>"UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported."
  "could not be found or it is not registered as safe."</p>
  
  <p>Here is manual fix:</p>
  
  <p>I edit this file:
  <strong>C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config</strong></p>
  
  <p>and I add this:</p>
  
  <pre><code>&lt;SafeControl Assembly="ExampleWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9d97efbc93164680" Namespace="Example_Web_Parts.VisualWebPart1" TypeName="*" Safe="True" SafeAgainstScript="False" /&gt;
  </code></pre>
  
  <p>However, how I can do this through Visual Studio? It stupid always manully add this to web.config file.</p>