Groups | Blog | Home
all groups > sql server reporting services > march 2006 >

sql server reporting services : obtaining an image from another server


Brandon
3/10/2006 11:00:47 AM
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.

Brandon
3/10/2006 11:33:06 AM
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



[quoted text, click to view]

AddThis Social Bookmark Button