c# web app using Windows Image Acquisition (WIA) in Windows Server 2008

Feb 22 2011 5:29 AM

Hello,

The c# web app works fine in windows XP, and in Debug mode inside the server with Visual Studio. But, when I deploy this in Windows Server 2008, IIS 7,  I have an:

Creating an instance of the COM component with CLSID {850D1D11-70F3-4BE5-9A11-77AA6B2BB201} from the IClassFactory failed due to the following error: 80070005

I tried to solved this error doing:

aThe WIA service is not installed during the default Windows Server 2008 installation. Before you can enable WIA, it first needs to be installed:

  1. Click the Start button, open the Administrative Tools menu, and click Server Manager.
  2. Click Features to load the Features Summary, then click Add features.
  3. Check the Desktop Experience check box.
  4. Click Next, then click Install.
  5. Restart your computer.

Now you can enable WIA as follows:

  1. Click the Start button, open the Administrative Tools submenu, and clickComponent Services.
  2. In the Component Services dialog, click Services (Local) to load the list of services.
  3. Locate and right-click "Windows Image Acquisition", then click Properties.
  4. In the General tab, set the Startup type to "Automatic".
  5. Click OK.
  6. Right click "Windows Image Acquisition" again, then click Start.
b) Giving access in windows\System32\wiaaut.dll to:
  • IUSR
  • Network Service
  • IIS_USRS

c)Local Security Policies

1. Start -> Control Panel -> Administrative Tools -> Local Security Policy 
2. Navigate to Security\Local Policies\Security Options 
a. Network Access: Let everyone permissions apply to anonymous users - Set to Enabled 
c. DCOM: Machine Access Restrictions - Add Anonymous, Everyone, Interactive, Network, System with full rights options set. 
d. Network Access: Let everyone permissions apply to anonymous users - Set to Enabled 
e. Network Access: Sharing security model for local accounts - Set to Classic

The "Sharing Security model" is the real offending item I believe, and setting the above should fix the problem. If not then I went as far as setting the following in DCOMCNFG.

DCOM Configuration

1. Click Start -> Run 
2. Enter DCOMCNFG and press OK. This will open the DCOMCNFG window. 
3. Browse down the tree to Console Root -> Component Services -> Computers -> My Computer 
4. Right click on "My Computer" and select properties 
5. Select the "Default Properties" tab 
a. Enable Distributed COM on this computer - Option is checked 
b. Default Authentication Level - Set to Connect 
c. Default Impersonation Level - Set to Identify 
6. Select the "COM Security" tab 
7. Click on Access Permissions ' Edit Default 
a. Add "Anonymous", "Everyone", "Interactive", "Network", "System" with Local and Remote access permissions set.
8. Click on Launch and Activation Permissions ' Edit Default 
a. Add "Anonymous", "Everyone", "Interactive", "Network", "System" with Local and Remote access permissions set.
9. Click on OK 
10. Close the DCOMCNFG window

d) In windows\system32>regsvr32 wiaaut.dll (running as Administrator the command prompt)

But I'm still having this error!!!

Could you please help me?

Thanks in advance!!!


Answers (1)