SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’m trying to open a .xsn file from a certain site collection (Project Server) on the other site collection (in visual web part). My goal is to present an InfoPath form.

.xsn url:


site with the web part:


This is how I set the .xsn file in c#:

XmlFormView xmlFormView = new XmlFormView();
xmlFormView.XsnLocation = "http://lp/pwa/projekt_test_erp/project%20documents/project%20rate.xsn";

After deploy I get this error:

“The following location is not accessible, because it is in a different site collection.”

Why I can’t access .xsn from a different site collection? Is there any way to make it work?

I’m working on this problem for about 3 days – any help will be greatly appreciated!

share|improve this question
I think you should deploy the .xsn file in the target site collection as well, since its just a Form Template... – Arsalan Adam Khatri Oct 25 '12 at 15:12
I can't. It's customer's requirement (those two site collections) and I can't move this file from one to the other. That's the problem. – mwk Oct 26 '12 at 7:41
Don't move, just copy them in both of the site collections? – Arsalan Adam Khatri Oct 26 '12 at 22:45
This file can be only in one location (in one site collection) - I can't copy, move etc. this .xsn. – mwk Oct 29 '12 at 11:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.