Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Windows IIS Shell
Hi All,
Code:
int height = 0;
int width = 0;
Shell32.Shell Sh = new Shell32.Shell();
Shell32.FolderItem FI;
Shell32.Folder F;
F = Sh.NameSpace(System.IO.Path.GetDirectoryName(Server.MapPath("~/") + MovingImages + "caesarstonelongeng03142012063807596.mp4"));
FI = F.ParseName(System.IO.Path.GetFileName(Server.MapPath("~/") + MovingImages + "caesarstonelongeng03142012063807596.mp4"));
int.TryParse(F.GetDetailsOf(FI, 285), out width);
int.TryParse(F.GetDetailsOf(FI, 283), out height);
 
In my local machine (Windows 7) i get:
Height - 768
Width - 1024
 
but after going live (Windows Server 2008 R2) i get:
Height - 0 (return empty string)
Width - 0 (return empty string)
 
Please help, i am stuck at this.
Posted 13-Mar-12 20:28pm
Edited 13-Mar-12 22:47pm
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use the GetDetailsEx method instead of GetDetailsOf.
  Permalink  
Comments
Punit Belani at 14-Mar-12 4:41am
   
Hey thanks for reply. I tried with GetDetailsEx but there is no such function available after dot(.) so is there any reference i need to add?
Abhinav S at 14-Mar-12 5:44am
   
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775051%28v=vs.85%29.aspx should help you. It is part of the IShellFolder2 interface.
pparas at 16-Dec-13 13:57pm
   
Have you found a solution to this ?
 
Paras
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Check your server, may be you have to install the Media Foundation feature
(windows server 2012: through Server Manager -> add Roles and features)
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 503
1 George Jonsson 311
2 CPallini 290
3 OriginalGriff 139
4 Prasad Khandekar 135
0 OriginalGriff 4,623
1 CPallini 3,410
2 Sergey Alexandrovich Kryukov 2,929
3 George Jonsson 2,319
4 Gihan Liyanage 2,077


Advertise | Privacy | Mobile
Web03 | 2.8.140905.1 | Last Updated 25 Feb 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100