Sir, This is the error i'm getting.. Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Source Error: Line 42: Line 43: Public Sub CheckWH() Line 44: Dim fullSizeImg As System.Drawing.Image = System.Drawing.Image.FromFile(str) Line 45: Line 46: Source File: D:\Hosting\5201676\html\Gallery.aspx.vb Line: 44 i think it is giving error for FromFile(str). Whether FromFile() is used only to get path from localhost ? Plse reply..