www.webdeveloper.com
Results 1 to 3 of 3

Thread: .NET Permissions Issues (I think)

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    Kansas City, Missouri
    Posts
    31

    .NET Permissions Issues (I think)

    Hello,

    Long time Unix/Linux web programmer, beginner ASP.NET/VB programmer...

    Operating: 32Bit Win 7, IIS 7.5

    I'm attempting to use ImageMagick to convert a tif image on one mapped server to a gif image on another mapped server.

    When I run the ImageMagick convert command from the cmd prompt, the process completes just fine with my user credentials.

    When I create an ImageMagick object in ASP.NET, I can successfully convert the images if they are local on my machine.

    I cannot get the script to execute properly using the mapped drives. I do not believe this is an issue with ImageMagick. I believe it is a permissions issue.
    I have given IUSR read access to the folders with the tif images, write access to the gif images, read/write to the windows\temp folder on my machine (needed for ImageMagick) and read/execute to the Program Files\ImageMagick folder where the exe is.

    Here is the code which works fine on if the files are on the local machine:

    ASP.NET with VB
    Code:
    <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" aspcompat=true%>
    <%@ Import Namespace="System.IO" %>
    <%@ Import Namespace="System.Net" %>
    <%@ Import Namespace="System.Text" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="System.Data.SqlClient" %>
    <%@ Import Namespace="Microsoft.VisualBasic" %>
    <%@ import Namespace="System.Drawing" %>
    <%@ import Namespace="System.Drawing.Image" %>
    <%@ import Namespace="System.Drawing.Drawing2D" %>
    
    ...other unrelated working code...
    
    Dim imageMagick As Object = Server.CreateObject("ImageMagickObject.MagickImage.1")
    
    Dim tifImg As String = "c:/imagenamewithfullpath.tif"
    Dim gifImg As String = "c:/imagenamewithfullpath.gif"
    
    Dim msgs As String = imageMagick.Convert(tifImg, gifImg)
    Problem Code:
    Code:
    Dim imageMagick As Object = Server.CreateObject("ImageMagickObject.MagickImage.1")
    
    Dim tifImg As String = "j:/imagenamewithfullpath.tif"
    Dim gifImg As String = "k:/imagenamewithfullpath.gif"
    
    Dim msgs As String = imageMagick.Convert(tifImg, gifImg)
    Any advice/help would be very much appreciated!
    Thanks,
    ~Maria
    We're Tiny,
    We're Toony,
    We're all a little loony.
    The scripts were rejected;
    Expect the Unexpected.

  2. #2
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    Hi there,

    It does look like permission issues possibly becuase of the UAC settings in windows 7. You didn't mention if you tried switch the UAC off.

    Control pannel > User Accounts > Select user > Change User Account Control settings

    move slider to Never notify. reboot your machine.

    Also try elevate VS to administrator, run your code, see if that has solved your problem.


    Of course this its not a fix but it will help eliminate the UAC security issues.


    regards

    Ribs
    ----------------------------------

  3. #3
    Join Date
    Jan 2011
    Posts
    6
    Hi Compbrat 75 & Ribeyed,
    I am looking for a full time permanent Software Developer to work for our company in Illinois. If either of you know of anyone who is looking to make a company change please let me know.

    Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles