Open form in asp.net - form is not from a trusted publisher

R

Roeland

Hello,

I have a form that I would like to open in an asp.net application.

I’m trying to open a form (by code) in asp.net, set some values in the xml
and save the form as “MyFileName.xmlâ€. The form that I’m using is published
to a shared folder. When I execute the page I get the error: “InfoPath cannot
create a new, blank form. InfoPath cannot load this form. The signature on
this form is not from a trusted publisher.â€

What must I do the open the form. Please Help!

Cheers,
Roeland

Application myApp = new Application();
XDocumentsCollection myXDocs = myApp.XDocuments;
XDocument myXDoc = myXDocs.NewFromSolution(@"c:\temp\forms\contacts.xsn");
myXDoc.SaveAs(@"c:\temp\forms\roeland.xml");
myXDocs.Close(0);
myApp.Quit(false);
 
R

Roeland

I have found the answer myself.

I had added a certificate to my InfoPath form. When I open the form
regularly every think worked fine as it should. But when I open the form from
an ASP.Net code behind page, I got an error saying that the publisher was not
trusted.

The solution is to add the certificate that I am using to the “Trusted Root
Certification Authorities†in the Certificates of the current user.

Cheers,
Roeland
 
T

tercel79k

Hi roland,

My problem is similiar to you.
Can you tell me ?
I am able to open infopath form from my windows application.
But I want to pass my xml cocumnet to this opened form.

This means, I want to open infopath form with data from my window
application.
Can you please help me.

Thanks and Regards,
ChatanyA Agrawa


-
tercel79
 
R

Roeland

Chatany,

Do you want to see the form itself in your application or do you want to
have the data in your application.

If it is the last, you can read the xml using InfoPath or using
System.Xml.XmlDocument. And I would the suggest using the XmlDocument.

It this doesn't help please tell me a bit more.

Cheers,
Roeland
 
T

tercel79k

Hi,
Roleand,
I already have xml and i need to pass this xml to existing infopat
template.
And I have to open infopath from my window application in a separat
window.
I have opened it.
But now I am getting this error.
"InfoPath cannot create a new, blank form.
The selected file is an update of a form on your computer. However, th
update has been blocked because the author of the file cannot b
verified.

If this file is a legitimate update, use the Fill Out a Form dialog bo
to remove the original form from your computer, and then open thi
file."

Please help me.
Can I know your mail ID.

Thnaks

*Chatany,

Do you want to see the form itself in your application or do you wan
to
have the data in your application.

If it is the last, you can read the xml using InfoPath or using
System.Xml.XmlDocument. And I would the suggest using th
XmlDocument.

It this doesn't help please tell me a bit more.

Cheers,
Roeland
[/QUOTE]


-
tercel79
 

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