|
-
Jun 23rd, 2006, 05:30 AM
#1
Thread Starter
New Member
Problem with Itunes COM object in ASP.NET
First things first - I am by no means an experienced programmer, just a hobbyist.
I'm using Visual Web Developer 2005 to build a web interface to iTunes so I can control it from elsewhere in my house, using a laptop.
I've got a very simple page that populates a drop down box with my playlists, it then plays the selected one.
When I first copied the application to IIS I got the following error:
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
The highlighted error was:
Code:
Line 6: Dim objItunes As New iTunesLib.iTunesApp
So I put an identity line in the Web.Config file. However it only made a difference when I put my own username and password in.
Now I get the following error:
Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following error: 80080005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following error: 80080005.
The same line in my code is highlighted.
I'm sure I'm doing something very stupid (ie not referencing iTunes correctly), but any help would be greatly appreciated.
For information:
Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42
IIS Version: 5.1
Anto
Last edited by paraguayanto; Jun 23rd, 2006 at 05:47 AM.
-
Jun 24th, 2006, 11:28 AM
#2
Re: Problem with Itunes COM object in ASP.NET
My first step would be to create a Winform project, reference the ITunes class library and then see if it works.
Second, it is correct that you have to impersonate yourself when working with the ITunes class library.
Third, look here
http://msdn.microsoft.com/library/de...patibility.asp
Also, are you using Windows authentication in your application? Try it with Windows authentication only to see if ITunes class library needs just that.
-
Jun 26th, 2006, 03:24 AM
#3
Thread Starter
New Member
Re: Problem with Itunes COM object in ASP.NET
Thanks for the reply Medhak.
1) I'm not entirely sure what you meant by a Winform project.
If you mean building a VB.net application and running it, that worked fine - I had a form that retrieved my playlists and played the selected one.
2) I tried with impersonate true and false, neither worked.
3) I've got the aspcompat line in my project already and I've given permission to both the ASPNET user and IUSER_<MACHINENAME> accounts.
I tried changing the Dim line to something I found on Google
VB Code:
Dim objItunes As iTunesLib.iTunesApp = New iTunesLib.iTunesAppClass
Still the same error:
Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following error: 80080005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following error: 80080005.
It just doesn't like that line!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|