Click here to Skip to main content
12,398,225 members (59,346 online)
Rate this:
 
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
Updated 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 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 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 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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Any updates about this issue ? im facing the same problem
  Permalink  
Comments
CHill60 16-Mar-15 4:20am
   
Please don't post comments as solutions. If you have a question of your own use the red "Ask a Question" link. Remember to include your code and details of what you have already tried and why the ishellfolder2 solution above didn't work (i.e. how the results were different to expected or details of any errors thrown)
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

Because of Windows version you will get different results of GetdetailOf:

Windows XP ServicePack3

0 Names
1 size
2 types
3 Modified
4 date and time of creation
5 access date and time
6 attribute
7 state
8 owner
9 Author
10 title
11 title
12 category
13 Number of pages
14 comments
15 Copyright
16 artists
17 album title
'18
19 track number
20 genres
21 length
22-bit rate
23 protection
24 camera model
25 photos of the shooting date
26 size
29 this time of title
30 Program Description of
32 audio sample size
33 audio sample rate
34 channel
35 Company Name
36 Description
37 file version
38 Product Name
39 product version

Or Windows 7

0 Names
1 size
2 types of items
3 Modified
4 date and time of creation
5 access date and time
6 attribute
7 offline state
8 available offline
The 9 recognized type
10 owner
11 classification
12 shooting date and time
13 participating artists
14 album
15 years
16 genres
17 Conductor
18 tag
19 evaluation
20 Author
21 title
22 Subject
23 categories
24 comments
25 Copyright
26 track number
27 length
28 bit rate
29 protection
30 camera model
31 size
32 camera manufacturer
33 company
34 File Description
35 program name
36 duration
37 online
38 recursion
39 place
40 any attendee address
41 any attendee
42 organizer Address
43 organizer name
44 alarm time
45 required attendee address
46 required attendees
47 resource
48 state of the conference
49 free time information
50 total size
51 account name
52 progress
53 computer
54 anniversary
55 The name of the secretary
56 secretary of phone
57 birthday
58 Address (company)
59 City (company)
60 countries / regions (company)
61 PO Box (company)
62 postal code (company)
63 prefectures (company)
64 address (company)
65 Fax number (company)
66 company of Home page
67 company phone
68 callback number
69 car phone
70 children
71 company representative phone
72 departments
73 e-mail address
74 e-mail 2
75 e-mail 3
76 list of e-mail
77 e-mail display name
78 title 2
79 people
80 name
81 Gender
82 people 2
83 hobby
84 Address (home)
85 City (home)
86 country / region (home)
87 post office box (home)
88 postal code (home)
89 prefectures (home)
90 address (home)
91 home FAX
92 home phone
93 IM address
94 initials
95 title
96 label
97 surname
98 address (mailing)
99 middle name
100 mobile phone
101 nickname
102 office location
103 Address (Other)
104 other municipalities
105 other countries / regions
106 other PO Box
107 other postal code
108 other prefectures
109 other address
110 pager
111 title
112 municipalities (mailing)
113 countries / regions
114 PO Box (mailing)
115 postal code (mailing)
116 State
117 address (mailing)
118 primary e-mail
119 regular telephone
120 Occupation
121 spouse
122 suffix
123 TTY / TTD phone
124 telex
125 Web page
126 content state of
127 Content Type
128 acquisition date and time
129 archive date and time
130 completion date
131 device category
132 Connected
133 search method
134 friendly name
135 local computer
136 manufacturer
137 model
138 Paired
139 class
140 state
141 client ID
142 contributors
143 content creation date and time
144 previous printing Date
145 last saved date and time
146 Division
147 document ID
148 Number of pages
149 slide
150 total editing time
151 the number of words
152 deadline
153 end date
154 the number of files
155 file name
156 file version
157 flag of color
158 flag state of
159 free space
160 of the bit depth
161 horizontal resolution
162 width
163 vertical resolution
164 height
165 importance
166 attached
167 Delete
168 encryption state of
169 the presence or absence of flag
170 Exit already
171 incomplete
172 opening of the state
173 producer
174 Date Time
175 folder name
176 path of the folder
177 folder
178 participants
179 path
180 each location
181 type
182 Contact name
183 history kind of
184 language
185 final display Date
186 Description
187 state of the link
188 link
189 URL
190 media creation date and time
191 Release Date
192 encoding
193 producer
194 publisher
195 subtitle
196 user Web URL
197 author
198 Attachments
199 BCC address
200 BCC
201 CC address
202 CC
203 conversation ID
204 reception date and time
205 transmission date and time
206 source address
207 sender
208 the presence or absence of attachment
209 sender address
210 sender's name
211 Store
212 destination address
213 To do title
214 destination
215 expense information
216 albums of artists
217 album ID
218 beats / min
219 Composer
220 initial key
221 part of the compilation
222 atmosphere
223 sets of Part
224 period
225 colors
226 and Parental
227 limitation of reason by the guardian
228 use area
229 EXIF version
230 events
231 Exposure Compensation
232 Exposure Program
233 exposure time
234 aperture
235 flash mode
236 focal length
237 35 mm focal length
238 ISO speed
239 lens manufacturer
240 lens model
241 light source
242 maximum aperture
243 Metering mode
244 orientation
245 person
246 program mode of
247 saturation
248 distance of the target
249 white balance
250 priority
251 project
252 channel number
253 this time of title
254 subtitles
255 re-aired
256 SAP
257 broadcast date
258 Program Description of
259 recording time
260 station call sign
261 stations name
262 Overview
263 excerpt
264 automatic summarization
265 Search ranking
266 Sensitivity
267 Product Name
268 product version
269 ​​support link
270 source
271 start date
272 billing information
273 completion
274 owners of work
275 total file size
276 trademark
277 video compression
278 director
279 data rate
280 frame High
281 frame rate
282 frame width
283 total bit rate
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 2 Aug 2015
Copyright © CodeProject, 1999-2016
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