Hello,
My report gets an image off another server. It works fine in testing, but
when I deploy it to my production server the image doesnt show up. I put a
try/catch around the code and output the error to a text field in my report,
only to see the following:
System.UnauthorizedAccessException: Access to the path
\\server\domain\Applications\myApp\Pictures is denied. at
System.IO.__Error.WinIOError(Int32 errorCode, String str) at
System.IO.Directory.InternalGetFileDirectoryNames(String fullPath, String
userPath, Boolean file) at System.IO.Directory.InternalGetFiles(String path,
String userPath, String searchPattern) at
System.IO.Directory.GetFiles(String path, String searchPattern) at
CustomCodeProxy.test(Int32 PartID)
The user that is running the report is myself. I have access to the server.
I'm using the code section in the report (I created a function called
test()) and within that I'm using System.IO.Directory.GetFiles to see if the
file exists.I should also mention that I'm displaying the image from a virtual
directory, but sometimes the image doesnt exist, which is why I'm trying to
check to see if it exists, but GetFiles doesnt accept URLs.
Is there any way around this? There should be a "noimage" property for
images just like theres a "norow" property for rows
"Brandon" <broberts@.presstran.com> wrote in message
news:eGMxMvFRGHA.256@.TK2MSFTNGP14.phx.gbl...
> Hello,
> My report gets an image off another server. It works fine in testing, but
> when I deploy it to my production server the image doesnt show up. I put
> a try/catch around the code and output the error to a text field in my
> report, only to see the following:
>
> System.UnauthorizedAccessException: Access to the path
> \\server\domain\Applications\myApp\Pictures is denied. at
> System.IO.__Error.WinIOError(Int32 errorCode, String str) at
> System.IO.Directory.InternalGetFileDirectoryNames(String fullPath, String
> userPath, Boolean file) at System.IO.Directory.InternalGetFiles(String
> path, String userPath, String searchPattern) at
> System.IO.Directory.GetFiles(String path, String searchPattern) at
> CustomCodeProxy.test(Int32 PartID)
>
> The user that is running the report is myself. I have access to the
> server.
>
> I'm using the code section in the report (I created a function called
> test()) and within that I'm using System.IO.Directory.GetFiles to see if
> the file exists.
>
No comments:
Post a Comment