#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Location
    South Africa
    Posts
    4
    Rep Power
    0

    IIS7; Virtual Directory; Network Share; Expression Encoder


    Hi all,

    I'd really appreciate some understanding into this problem I'm having; specifically how IIS7 handles this situation.

    I have a Silverlight web application that makes use of the Microsoft Expression Encoder libraries to play videos amongst other things.

    I also have a web server - WEB01 - and a file server - FILE1. On the web server I have a virtual directory - MySLApp - pointing to a network share on FILE1.

    When I deploy the SL application to the network share above and then navigate to the website - http://WEB01/MySLApp/default.aspx - I get presented with the site and I can start going about. However, video clips do not want to play like they should (Expression Encoder functionality).
    If I deploy the SL application exactly the same way, but to a local folder on WEB1 (c:\inetpub\wwwroot\MySLApp) instead of to the network share, change where the virtual directory is pointing accordingly, then my SL application does play the video clips.

    In other words, when deploying my SL app to a network share, the SL app can't seem to "access" the Expression Encoder libraries on WEB1; when deploying it to a local path on WEB1, everthing works perfectly.

    The only thing I can think is that IIS7 must "handle" a web site differently when it gets requested and the source files are on a network share instead of on a local path.

    Can anyone perhaps explain to me why this is?

    Much appreciated!
    Sean
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Location
    South Africa
    Posts
    4
    Rep Power
    0
    Another similar scenario:
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Location
    South Africa
    Posts
    4
    Rep Power
    0
    As part of my source files, I have a directory called Binaries which contains one COM DLL - gsdll32.dll - which I use in my code by using the DllImport command. As part of the DllImport command, I specify the path to this COM DLL. Code looks like this:
    [DllImport("../Binaries/gsdll32.dll", EntryPoint = "gsapi_new_instance")]

    Now again, like before, if I deploy the code like this to a network share, the above line falls over saying that the file could not be found. If I deploy the exact same code to a local path on WEB1, everything works perfectly.

    I'm pretty sure it's not a permission thing, because the website itself works as expected and if I replace the path above with the full UNC path, it works when on the network share.
    In other words, if I change the above line of code to this, it does work on the network share:
    [DllImport(@"\\FILE1\SharedFiles\MySLApp\Binaries\gsdll32.dll", EntryPoint = "gsapi_new_instance")]

    I just don't understand how IIS "handles" files from shared locations, in my case, the gsdll32.dll file.
    Almost as if it can't do the one level up (../) when pointing to a network share?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Location
    South Africa
    Posts
    4
    Rep Power
    0
    I've managed to get the Expression Encoder functionality working while using a UNC path. I've added the user that my application pool is configured to run as, as part of the Administrators group on WEB1.

    However, this is not an ideal solution, so I'm back to square 1, but at least I have a slightly better understanding as to how IIS handles UNC paths.

    If anyone has any insight, please share
  8. #5
  9. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,443
    Rep Power
    4539
    I'm not very familiar with IIS7, but one guess is some kind of permission issue. The user account IIS is operating under may have limited permissions on the shared-from computer.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    0

    IIS 7 virtual directory blocking third party dll


    if you got any solution to your problem so please share with me.

    I too suffering with the same problem.

    I am able to run my website smoothly from physical location, but it is not working properly from virtual directory.

    I have used 3rd party dll in my website.

    suggestions are appreciable.

    thanks

IMN logo majestic logo threadwatch logo seochat tools logo