Re: Encoder.PrepareToEncode gives Unspecified Error
- From: "Neil Smith [MVP Digital Media]" <neil@xxxxxxxxxx>
- Date: Wed, 10 May 2006 19:09:22 GMT
It sounds from what you've described that the encoder user (Network
Service) has limited permissions to access files. As a result it may
not be able to load the profile - is that correct ?
My first step to confirm this would be to create a low permissions
group, change ownership of the file to that group, and add the encoder
user / instance to the group. It works more or less the same in Unix
when you have a web server - the group account of the web server needs
permission to read and write files, it can't open just any file.
Testing like that ought to eliminate this a possibility
HTH
Cheers - Neil
On Tue, 9 May 2006 23:41:02 -0700, Samir
<Samir@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Ganesh, I still have the issue open.------------------------------------------------
I hope Neil will notice this thread and can provide a common solution to us.
:)
As Neil has suggested to have try catch block, I have debug statements
writing to a log file and it shows that it fails at PrepareToEncode() method.
I created the setup on windows 2003 server in our intranet and have kept one
more line for log to know the executing user and it is "Network Servicces".
Adding this inbuilt user to Administrators group makes encoding work
smoothly. ( I know this is not a practical solution and we can not add the
user to administrator group.) And surprisingly adding a local user named
"anothermedia" to administrators group does nto produce same result.
I am pasting below various outputs if that can help in anyway.
(NOTE: NETWORK SERVICE IS ADDED TO ADMINISTRATORS GROUP AND MACHINE RESTARTED)
Create instance of profile
Load Profile from file
Profile has set.
Executing User : NT AUTHORITY\NETWORK SERVICE
SetInput file : C:\Temp\PFCSongs\b238aeed-f16e-41df-9aeb-cba368225168.mp3
Set Target file :
C:\Temp\PFCSongs\Other\2bd41695-f5e2-4412-a09c-9cba9fa2de1e.wma
Set Information
WMEncoderLib.WMEncoderClass
Prepare to encode
Start Encoding
Finish encoding
(NOTE: anothermedia IS ADDED TO ADMINISTRATORS GROUP BUT MACHINE NOT
RESTARTED)
Create instance of profile
Load Profile from file
Profile has set.
Executing User : SQL2005\anothermedia
SetInput file : C:\Temp\PFCSongs\b238aeed-f16e-41df-9aeb-cba368225168.mp3
Set Target file :
C:\Temp\PFCSongs\Other\33932212-fb12-48f4-a4fa-366dced7090f.wma
Set Information
WMEncoderLib.WMEncoderClass
ErrorMessage : Object reference not set to an instance of an object.
(NOTE: anothermedia IS ADDED TO ADMINISTRATORS GROUP AND MACHINE RESTARTED)
Create instance of profile
Load Profile from file
Profile has set.
Executing User : SQL2005\anothermedia
SetInput file : C:\Temp\PFCSongs\f577b721-3f1f-427c-8529-263a6bf4210e.mp3
Set Target file :
C:\Temp\PFCSongs\Dance\ed1e4e7c-c7eb-4494-8e4e-67daa23814de.wma
Set Information
WMEncoderLib.WMEncoderClass
ErrorMessage : Object reference not set to an instance of an object.
(NOTE: anothermedia given permissions on PFCSongs folder)
Create instance of profile
Load Profile from file
Profile has set.
Executing User : SQL2005\anothermedia
SetInput file : C:\Temp\PFCSongs\f577b721-3f1f-427c-8529-263a6bf4210e.mp3
Set Target file :
C:\Temp\PFCSongs\Dance\e73b781c-304a-4134-a7ac-cc8df3d19910.wma
Set Information
WMEncoderLib.WMEncoderClass
ErrorMessage : Object reference not set to an instance of an object.
(NOTE: anothermedia given execute permissions on wmenc.exe file)
Create instance of profile
Load Profile from file
Profile has set.
Executing User : SQL2005\anothermedia
SetInput file : C:\Temp\PFCSongs\f577b721-3f1f-427c-8529-263a6bf4210e.mp3
Set Target file :
C:\Temp\PFCSongs\Dance\38b668dd-c528-4290-97b0-3792bf9c65ea.wma
Set Information
WMEncoderLib.WMEncoderClass
ErrorMessage : Object reference not set to an instance of an object.
Hope this may give some direction to proceed.
Regards,
Samir
"Ganesh.NET" wrote:
Hi Samir,
I am using windows 2000 Professional with .NET Framework 1.1 . i got the
same error. How to overcome this ? . And alos i am not tested in Windows
Professional.
My error details
------------------
System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.NullReferenceException: Object reference not set to an
instance of an object. at WMEncoderLib.WMEncoderClass.PrepareToEncode(Boolean
bPrepare) at WMETest.Service1.cam_control(String state) in
c:\inetpub\wwwroot\WMETest\Service1.asmx.vb:line 76 --- End of inner
exception stack trace ---
U have any solution ,plz forward to me.
"Samir" wrote:
Hi kngsn,
Thanks for the information.
Yes, it works on XP and gives error on 2003. Trying with identity
impersonation just hcanged the error to "Object reference not set to an
instance of an object."
Any idea on wht all folders and files should be given what permissions for
the user specified in impersonation user?
OR
What are the windows user rights required for encoding an audio file on
windows 2003 server through a web application?
Thanks in advance.
Samir
"kngsn" wrote:
"kngsn" wrote:
I have the same error. Interestingly, this do not happen on the WinXP Pro,
but on the all of our Win2003 servers
But there
... is a partial solution found: You may add this string in th Web.Config:
<identity impersonate="true" userName="somebody" password="secret" />
Also, its worthing to put attention on the WMEncoder.EncoderDRMContentAuthor
property :-).
Let me know if you failed with it
Digital Media MVP : 2004-2006
http://mvp.support.microsoft.com/mvpfaqs
.
- Follow-Ups:
- References:
- Prev by Date: Windows Media Encoder 9 problems
- Next by Date: Re: Why PrepareToEncode failed???
- Previous by thread: RE: Encoder.PrepareToEncode gives Unspecified Error
- Next by thread: Re: Encoder.PrepareToEncode gives Unspecified Error
- Index(es):
Relevant Pages
|