Hello All,
In order to publish the infopath form with managed code(VSTA)
you need to do the following tasks
1)publish the form to local location as follows
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXLbeBoAjrtFUYSYDjbq4n62l9c_1zERw0Bczjner4fyiG6UVyDoESKpw2ncE73nzuoHJjGILeHnqynrZqoxfyJqzF0iaMZgRTKPkN9GpaHApIP712-8kAwBLeKApnPgM5zIOGPOt6sMvO/s320/admin1.jpg)
2)Go to central administration site
1)Application management-->Manage infopath template(under infopath form services)--> upload template
Here upload the template published on the local machine
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholO2HnyOBBOoBt9WTYsfVrq48fw87D9bRa_n4a6MlIIHI-mKdA6TyCnB1Thf0iiE7AqX1AoHiBj7zg_m3EjvjQlKZEbExaxzj2nLPTAUUP1G-PyD0gW85gfqhm5CdueGbY20IjSyIpBfO/s320/UploadAdministra.bmp)
2)Activate this form for the webapplication or site where u want to publish in form library or as webenabled form
Right click on the uploaded form--->Activate for the site collection
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaK_1SGreIKt1S-hUT3jg-F0fTU9dQTvvQiVC3KIFG3DUOfZ5i3lE25jJxeYR36JtLIMC_tN8X0FZNq6p7mOwzKC_baCi18dXIdEl69k7iC62ccn_DqqtIWTouNxLUMZ6YnPPPpp2oie5w/s320/Activate.bmp)
3)Browse the site or directory where the Administrator approved form is activated
Home-->view all contents-->Form template
you will find the form which is activated in central administration site
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXnQATBnr4V9s-PN0gXk00YCmMaBpc61X3T3YAsOM0G4M2ZjEs1R52YhPDHrjqqjQ42z8LzYBDi24MnjkAhmD4NWkMdRovIOtBPcYdbVHVMOPHuX2JcjxebaTX1RWjcNJNLkvPbftNBclt/s320/FormTemplate.bmp)
4)To configure form to publish in form library
click on Settings of form library-->Advance settings-->set the destination and url
(these values can be obtained when form is published as administrator approved form +form containing managed code)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ20avXiGc2AKqURAbpkyRtjmLJtKl_x7yiC_GkRcJZM2oKfucCoaCiwommTHxZY32T09tUhYkIpW19-Rv7W_bG8SqMEn68TIOGACaCFp0gN3lOIkw7cf37q14y1Sp8_mtdrZs1ZW-4tsj/s320/FormLib.bmp)
5)Now you will get the form which can be opened as the webenabled form either in xmlformview (control to embed infopath form in aspx page with its xsn location)