I'm new to C#, Visual Studio, and the whole .NET Framework.
I'm trying to create a stored procedure class(?) that will run a query and output the results to a text file located on a shared network drive. So far the class is empty, and when I compile/debug it I'm getting:
A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll
After reading a few things here and there, I've set All_code permission to Full trust on the server. I'm still getting the same error.
Here is my code so far:
What do I need to do to get around this exception? It would be nice if I could just add something to the code, but if not what do I need to modify/configure on the server?
Any help, advice, direction would be great... I feel as though I'm at my wits end.
Thanks.
I'm trying to create a stored procedure class(?) that will run a query and output the results to a text file located on a shared network drive. So far the class is empty, and when I compile/debug it I'm getting:
A first chance exception of type 'System.Security.SecurityException' occurred in mscorlib.dll
After reading a few things here and there, I've set All_code permission to Full trust on the server. I'm still getting the same error.
Here is my code so far:
Code:
using System;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void ExportRecordsToTextFile()
{
}
};
What do I need to do to get around this exception? It would be nice if I could just add something to the code, but if not what do I need to modify/configure on the server?
Any help, advice, direction would be great... I feel as though I'm at my wits end.
Thanks.