title: permission was denied on the object xp_cmdshell
body: <p>I am getting  Execute permission was denied on the object 'xp_cmdshell'.</p>
  
  <p>Here's the situation, I have a stored procedure called ExportFile.
  I am calling the stored procedure via SqlCommand from a web application from a Virtual PC..
  during the execution of this command i get permission error</p>
  
  <p>Then I debug it via SQL profiler and execute the result from the profiler to a query window (this means i run the StoredProcedure with the necessary parameters basing from the profiler to a Query window) and surprisingly its working just fine. the file was exported successfully.</p>
  
  <p>I wonder whats wrong with this considering that my login in the connection string is an owner and admin user.</p>