Permissions to run vb code

Niels H. Sørense

Permissions to run vb code

by Niels H. Sørense » Mon, 02 Aug 2010 12:11:49

In one of my reports I’m using vb code that copies one file from a local disk to a server.

Like this:

Public Shared Function CopyFile(ByVal infile As String, ByVal outfile As String)

Dim fi As System.IO.FileInfo = New System.IO.FileInfo(infile)

fi.CopyTo(outfile, True)

End function

The report is executed using report services directly in a browser.

In the Visual Studio environment it works ok. In the browser I get an error. I’m sure it is a permissions problem.

Any pointers to set op permission for this rdl-file


Alexandre Mineev MSF

Permissions to run vb code

by Alexandre Mineev MSF » Wed, 04 Aug 2010 13:12:50

There is no way to elevate code permissions for a particular RDL.

Better way is to move this code into a separate assembly, grant permissions to that assembly and call it from the report.