Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Trying to remote iTunes!
DerekM
#1 Posted : Friday, February 29, 2008 12:19:14 PM(UTC)
Groups: Member
Joined: 2/29/2008(UTC)
Posts: 2

Hi

Very new to this - so please excuse dumb question.

Trying to remote control iTunes via a web page. Using Visual Basic in MS Visual Web Developer 2005 under XP Professional.

In "Sub form1_Load" added the line ...

iTunes = New iTunesLib.iTunesApp

Works ok with VWD in its own local host but when running from Cassini get te error:

Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following error: 80080005

How can I do this?

Help much appreciated

DerekM
Ultidev Team
#2 Posted : Saturday, March 1, 2008 6:24:55 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Derek.

The most likely cause for this behavior is security: VWD internal server works under your current user account, and therefore has access to all the files and components that you do. When you register an application with UltiDev Cassini service, your application will have the same permissions as UltiDev Cassini service running under Local System user account. Being a service allows Cassini to run even when nobody is logged in, but at the same time running under Local System does not let Cassini, and by extension your application, to access all user's personal files and applications installed specifically for the user. If iTunes' components require certain user to be logged in, it may be an uphill battle to make this work. You could theoretically assign your user identity to UltiDev Cassini service and see whether that would make things work, but leaving Cassini running under powerful user account, especially if you plan to make your application face Internet, would be a bad idea, because any attacker who successfully breached your application, would have same access to files and functionality as you do. However, if your experiment shows that iTunes components can be successfully used if the process runs under your account, then you could consider putting your iTunes access functionality into a ServicedComponent - a .NET euphemism for COM+ package. ServicedComponents allow creation of assemblies that get their separate process/security context. Letting only small piece of functionality to work from the powerful user account is much safer than giving entire web server powerful user's rights. Again, all this access rights info is applicable only if you plan running your application on Internet. BTW, if you plan to run your application on Internet, using Cassini may not be a good idea. IIS would suit you better precisely because of the same security issue: Cassini's Local System user is still too powerful to face Internet. Network Service account used by default by IIS is much safer, and if your application relies on ServicedComponent to access iTunes functionality, then it won't matter under which account the rest of your application runs - whether under Cassini or IIS.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
DerekM
#3 Posted : Sunday, March 9, 2008 9:51:11 AM(UTC)
Groups: Member
Joined: 2/29/2008(UTC)
Posts: 2

Uh Hu!
Think you are right - task manger shows itunes loads and does something - then disappears - I guess it cannot access the resources it requires and gives up. Didn't get any further after assigining my uid to Cassini - and in any case, not happy about the security of such a move (the issue you raised).
Thanks anyway.
Derek
Rss Feed  Atom Feed
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.