"The RPC server is unavailable"

A

Andrew

Does anyone know why I am getting that error when I run this line of code?

app = new Microsoft.Office.Interop.InfoPath.Application();

I believe this issue started when I made app Global.

I will verify that is the issue, but I'm still not sure why that would be.

Thanks for any help.
 
A

Andrew

Sorry A little more Info.

This code is in a c# application

Okay the error does seem to go away when app is not a Global variable.

The reason I made it global is so that I would only have to create the
object once instead of creating it and disposing of it every time.

I guess I'll keep doing it this way unless someone else has any ideas.

Thanks,

Andrew
 
B

Ben Walters

Hey Andrew,
Although I haven't tried this perhaps declare the app variable globally then
instansiate it when the form is initalized

Hope this helps

Cheers
Ben
 
A

Andrew

I gave it a try and now from time to time I am getting the error "The remote
Procedure call failed†If I shutdown the application and start it back up
then it will run again. I've been trying to look this error up on Google and
have not had any luck yet.

Does anyone know why this error happens?

Thanks,

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top