excelsilverlight-4.0comautomationfactory

Issue with silverlight application OOB on corporate network


I working on a silverlight application that works OOB. When i debug the application in VS2010 it works like charm, and even when i install it on my PC. The application is using Excel COM Automation to automatically create, read and write excel files.

The problem i'm facing right now is, when i run the application on my corporate network, i can't create any excel files. Although if i create an excel file using MS excel and try to read and write to it using my application, it works just as it should.

OBS!!! I'm using the same version of MS excel on both my PC and corporate pc.

My Q. is, could this(Can't create, but can read and write) be something that have to do with the user rights on the cor. network?


Solution

  • Let me summerize the problem i was facing before i answer my own question.

    I'm working on a silverlight application that uses Excel COM automation in OOB to create/read/write excel files. The application was working perfect on my PC running windows7, both when debugging and while running. When i tried to run my application on my corporate network (All the PCs there uses Windows XP), i was not able to run it. So to solve this issue i went through the following:-

    1. I contacted the system Admin at my corporate to give me a higher privileges, he did BUT couldn't run my application. (Failure)
    2. I tried to change some of the code in my application like System.Environment.SpecialFolder.Personal to System.Environment.SpecialFolder.ApplicationData. Guess what? another Failure :(
    3. Lastly i ran the application on another PC i have at home that have Windows XP, and guess what? it RUNS. But why not on my corporate PC???
    4. NOW i think i know what is the problem. I Managed to repro the problem and solve it on my home Windows XP PC. Will try to test it at corporate next week.

    The whole problem is solve by these steps:-

    1. Go to Administraive Tools.
    2. Find Component service and open it.
    3. Browse to DCOM Config.
    4. Find Microsoft Excel Application, right click and select properties.
    5. On the Security Tab, change the Launch and activation permission to Customize.
    6. Then add permissions to the user.

    After that you are set to launch ;)

    You can also read this for more info:- Microsoft Excel Application entry missing in DCOMCNFG

    I will update this thread after i have tested this on my corporate PC.

    Best regards