.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Casting transparent proxy of office application to the real object

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :.NET Framework


1. I am using .net remoting to accept an office application (Excel,Word,PP)

2. the server is a simple office addin that supplies the application object

3. the remote object is application object wrapper (to enable MarshalByRefObject inheritance)

4. When the client gets the application object its type is Proxies.__TransparentProxy for all 3 applications

5. The problem is when trying to cast the transparent proxy to the real objects types

Microsoft.Office.Interop.PowerPoint.Application for PP

Microsoft.Office.Interop.Word.Application for Word

Microsoft.Office.Interop.Excel.Application for Excel

 the cast fails for Word  and PP whereas for Excel it works perfect

6. Since I also own the server code (the office addin) I can check what is the application

View Complete Post

More Related Resource Links

Office Development: OBA Solution Patterns In The Real World


OBA solution patterns help architects and developers build Office Business Applications (OBAs). This article introduces the seven core OBA solution patterns and applies one to a real-world problem.

Steve Fox

MSDN Magazine March 2008

Build an Easy Maintenance Intranet Site: Using Office Docs, File System Object, and OLE Structured S


If you've ever needed to build an easy-to-maintain intranet site, here's a solution based on Microsoft Office documents. Many sites require constant updating of their HTML, but the use of Word documents can simplify the process. This article details the construction of a human resources site that exploits the File System Object (FSO), OLE Structured Storage, and ActiveX capabilities of Word documents. This allows the HR staff to copy their revised or newly created Word files to the site, dynamically generate a list of links to their files, and free IS from the constant recoding of HR updates into new HTML pages.

Josef Finsel

MSDN Magazine March 2000

Proxy failed to create remote object on the server

Hi, I am using .net remoting for inter-process communication between two processes on the same machine 1.   The first process is one of the Office application: Ecxel /   Word /   PP 2.   The other process is another application that interacts with one of the above. For that it needs office application object. For example: Excel The solution is comprised with 3 projects: Project #1: The remote object is a simple Called RemoteOfficeApplication – that simply wraps the required application object (Word / Excel / PP).   Project #2: The Server is a simple Office add-in, written with a Visual Studio Extensibility -> Shared project. This add-in is instantiated whenever Excel is lunched. This project reference project #1. Code: var channel = new TcpChannel (5003); ChannelServices.RegisterChannel(channel,true ); RemotingConfiguration.RegisterWellKnownServiceType( typeof (RemoteOfficeApplication.RemoteOfficeApplication ), “AppObj”, WellKnownObjectMode .Singleton);   Project #3: The Client is the process that requires the application object. This project also reference project #1. Code:   //Get Remote object proxy object remoteAppObject = Activator.GetObject(typeof(RemoteOfficeApplication.RemoteOfficeApplication), “tcp://localhost:5003/AppObj" ); //Cast the proxy var r

Managing business object locks on application level

Today I worked out simple application side object locking solution for one server scenario. My motivation came from ASP.NET architecture forum thread How to solve concurrent site issue where one user asks for locking solution that works without changing database. Here is my simple and primitive solution that should help this guy out. I added also sample solution to this posting. My solution is simple: Create class for locked items. Create manager class that holds locks and manages them. Clear locks when session ends. Create page to release all locks. If you need something more serious then you should keep locks information in database or better than that - use some lock server. Also you may consider developing WCF service. LockItem class As a first thing let's create class that keeps lock information. I call this class as LockItem. This class doesn't hold references to locked objects - only type and ID as there are many business layers that doesn't use globally unique identifiers for objects. public class LockItem {     public Type ObjectType { get; set; }     public int ObjectId { get; set; }     public string SessionId { get; set; }     public DateTime LockedAt { get; set; } } LockItem class also contains property for session because otherwise it is not possible to kno

trust outlook 2003 application object when sending email c#

i am using outlook 2003 to send email but this outlook version always not trust application option so that before send email, always prompt a security dialog box to ask me to send email or not. how can i trust all outlook application object using vs 2008 or set in outlook 2003 anyone help

How to disable Office Web Apps (OWA) for the MySite Web Application in SP 2010?

We have OWA installed on the SP 2010 farm and works fine. We would like to disable the OWA functionality only on the MySite Web App. We want to use OWA on the other web application that hosts our team sites. What are my options?    

Displaying Office documents inside of a WPF Application

I have a datagrid with different files in it.  When I click on a file, I want to show a preview of the file in to the right of the datagrid within a document preview or something similar.  Just curious if anyone knows a good way of doing this.  I know that VB6 used to have a OLE control for this and WPF does have a web browser control that can accomplish this as well, but I have tried the web browser and it seems to create problems in my program (message box, open/save dialog, etc.).  I  have also tried the actual document viewer and convert to XPS and then showing the preview is too slow.  Thanks in advance for anyone who can help.

Sharing Application-object in subdirectories


I have a large constantly growing website, which I would like to re-organize into subdirectories. However, it seems that if I create a subdirectory and put some pages there, I'll loose the Application object. Obviously ASP.NET handles each subdirectory as a separate application. Is there a work around for this? Configuration option or something?

Any other suggestions how to organize the site?


Managed Metadata Service - No EMM application proxy can be found



I have Managed Metadata Service configured with the default language German and the target Content Hub it also in German. When I try to publish a content type i got this error "cannot check for changes because no emm application proxy can be found". Any ideea?


How to get office communicator presence in WSS using object model


Dear All

We have one WSS site. We have a custom web part which will display the names of the users who created a post in a discussion board. We need to show the Office communicator presence of the user along with the name.

Any help on this would be much appreciated?


Sreejesh Chacko

Integrating Office Web Apps in Web Application



i`m looking for a possibility to integrate Office Web Apps (Word for example) into my own web application written with ASP.NET. Is there any API to realise that or does anyone know helpful websites concering this issue?

Thanks for help ;)

Regards, Mike

Creating User Profile Service application and proxy using PowerShell

Hi All,

Not sure if anybody have tried creating a new user profile service application and user profile service aplication proxy using PowerShell?

I am able to create the user profile service application using the following cmdlet:

-ApplicationPool "SharePoint Web Services Default"
-Name "Demo Profile User Service"
-MySiteHostLocation http://demo2010a:80/my
-ProfileDBName UserProfile_ProfileDB_Demo
-ProfileSyncDBName UserProfile_SyncDB_Demo
-SocialDBName UserProfile_SocialDB_SyncDB

I was also not able to supply the MySite Host Relative Path (-MySiteRelativePath) and MySites have not been set up for the user profile application. And again, get-help lists MySiteRelativePath as a valid parameter, but when executed, PowerShell throws that the parameter is invalid. 

I am unable to create  a new proxy for the above created user profile service application using the cmdlet:


The cmdlet keeps asking for parameter Uri which seems to be undocumented.

Would be glad if anyone can help out here.

SharePoint Developer - MCTS SharePoin

Excel Services Application - Trusted locations problem in SharePoint Office Excel Web App


Just deployed Office Web Apps to our SharePoint 2010 environment. This environment was upgraded from a fresh deployment of SharePoint 2007 SP2. Configured all of the Application Services per http://technet.microsoft.com/en-us/library/ff431687.aspx, but I cannot open an Excel workbook, receiving the error: "This workbook cannot be opened because it is not stored in an Excel Services Application trusted location. To create an Excel Services Application trusted location, contact your system administrator."

Our farm has a single front end server and a single database server. The shared application pool is called SSP1_v14 (renamed during the upgrade from SSP1?). Our existing site had its visual style upgraded during the conversion. An in-place upgrade had been performed.

I went to Central Administration > Excel Services Application > Trusted File Locations and the default entry for address http://, Location Type: Microsoft SharePoint Foundation, Trust Children had already been created. Various blog posts on the internet indicate that this entry is all that's needed to setup a trusted location for all SharePoint sites, but it's not working here. I've tested Word document viewing with the Word Web App and that works fine.

Any ideas?

Silverlight Application using Sharepoint as a datasource using the Client Object Model



In my scenario i have a Silverlight application hosted in ASP.NET. I want to push/pull data from a sharepoint site using the Client Object Model. Is this possible?

Notice that i don't want my Silverlight app as a web part...it is hosted in asp.net and just uses Sharepoint 2010 as a data source. Will the Client Object Model work here or are sharepoint web services the only way out??. I can host both the SL app and the sharepoint site in the same domain if required...

Please advice





Integration of Office Live with ASP.NET application


I want to open Office Docs(Word, Excel, Power Point) for editing and save back on server storage media,  in browser from my Web application using OfficeLive.

Just like Hotmail is providing feature of SkyDrive and Office Live integration, Google is having GoogleDocs.

Please suggest How can I integrate Office Live with a Web application to open a Doc for editing and save back on to storage media.

Error occurred in deployment step 'Add Solution': An object of the type Microsoft.Office.InfoPath.


While trying to deploy custom SharePoint workflow solution in VS 2010, along with InfoPath custom task edit form, I ran into the following error message.

Error occurred in deployment step 'Add Solution': An object of the type Microsoft.Office.InfoPath.Server.Administration.FormTemplate named xxx already exists under the parent Microsoft.SharePoint.Administration.SPFarm named xxx Rename your object or delete the existing object

How can I resolve this problem? I have did some research but none helpful so far.


Blog: http://convergingpoint.blogspot.com/

Managed Metadata Service: Cannot check for changes because no EMM application proxy can be found


We have a managed metadata service with two owners. Both of them can't change anything to the term store anymore. The moment they try they get access denied:

The user doesnt have enough permissions. When looking into the log of SharePoint i found the following message:

Cannot check for changes because no EMM application proxy can be found

When I try to add another administrator using the Install_Admin account (who is farm admin) I get the same message that the user doesnt have enough permissions.

Our term store is setup in multiple languages with Dutch being the primary one.

Any help much appreciated.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend