Publish on Website and Custom Submit to save on local directory

M

Maansi Sanghi

Hello

I have two question


(A) I am trying to write a custom Submit action which will save the XML
filr generated by the infopath form to a specific local directory with an
auto generated name.
I have written the script XDocument.SaveAs("Path") in the OnSubmitRequest
event.
the error i get on submitting is "Permission Denied"

(Question) Is there a straight forward way of accomplishing this or do i
have to digitally sign the form?

(B) I want to publish my form on my website. For this i specify the URL for
example http://www.mycompany.com/public_html/exampleform.xsn
But the form fails to publish.

(Question) What are the steps and requirement for publishing a form on a
website.

Thanks
Maansi
 
P

Patrick Halstead [InfoPath MVP]

Hi Maansi,

(A) You will need to set the security trust level for the form to "Full
Trust" in order to write to the local file system. Go to tools->form
options->security. If you do this, you will need to either a) attach a
digital certificate for people to install, or b) create an MSI for your
form's solution template and send it out to others. To create an MSI, you
can use the regform tool that comes in the SDK. Make sure you use the /T
option to make the MSI install the form as Full Trust.

(B) I think you may not have permission to publish. I can do this fine using
my http://localhost/ server and the default http://localhost/form.xsn in the
publish wizard. Go to IIS Manager and see what the security settings for
your company's public_html virtual folder are set to.

Hope this helps!
 
M

Maansi Sanghi

Hello Patrick,

I have used the regasm to create the MSI and its working fine now. Thanks.


About the web server, the problem is that the web server is not on the
network but managed by a third party. But we do have access rights to the
website and we generally make changes to it using ftp

(1) If it is not possible to use the publishing wizard in this scenario is
there
a way to publish manually (Like making manual changes and copying the file
to the website using FTP)?

(2) Or will we need to have direct network access to
the web server?


Thanks,
Maansi
 
P

Patrick Halstead [InfoPath MVP]

Hi again Maansi,

We actually use WebDav/FTP for a form that edits all of the content on
InfoPathDev.com. And, you can definitely copy the xsn for the form up there.
The problem is the URL in the form. You'll need to change this manually if
you can't publish through InfoPath's wizard (which I believe uses WebDav).

But, if you are using RegForm to create an MSI, then you don't care about
the URL, since your solution is installed locally. Just copy the MSI up
there and have people install it.

Good luck!

Patrick
http://www.infopathdev.com/
 

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