.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

URL of current form (InfoPath Forms Services)

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :SharePoint

I need to programmatically determine the URL of the current form, preferably without adding new dlls to the form template and increasing the trust level.

The XmlLocation query string parameter looks perfect for this, but when I try to retrieve it using 

String strSaveLocation = String.Empty;
e.InputParameters.TryGetValue("XmlLocation", out strSaveLocation)

it is empty.

In fact, outputting all the InputParameters shows that for my existing (i.e. already submitted and saved to a library) form, the XmlLocation parameter is not present (even though I see it in the querystring). Instead, there's SaveLocation (even though it's not in the querystring). The value of SaveLocation isn't dynamic - it points to the root folder even when my form is in a subfodler. I want a value that will work even if the form gets moved to a different subfolder.




View Complete Post

More Related Resource Links

InfoPath Form Forms Services and Identity?

We have an InfoPath form running under InfoPath forms services that opens a data connection to a SQL database to invoke a stored procedure using Integrated Security.  It connects as NT AUTHORITY\ANNONYMOUS  LOGIN and is denied access. The following query failed: CPI_RPI_Table (User: LITWARE\smith, Form Name: CPI-RPI-Index-Published, IP: , Request: https://www.litware.com/_layouts/Postback.FormServer.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:CPI-RPI-Index-Published:-myXSD-2010-09-14T19-44-07, Type: DataAdapterException, Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.) When we run it in the InfoPath client, it connects with the users credentials. Can we have the form default to another identity, that of the SharePoint Service acount? Thanks, Nikos

Building InfoPath forms against Sharepoint 2010 Data Connection Library and Form Services...


Hi Sharepoint Experrts,

I'm trying to develop InfoPath 2010 forms that use External Lists that have been created in Sharepoint Server 2010.  I have problems when testing the forms because access is denied to the external lists.

When I try deploying the forms to the sharepoint site, I cannot upload the form template because it says I have to be a member of the local administrators group.  However, I'm running the administrator account used to install and setup sharepoint on the Windows 7 development machine I'm using.

I also tried loading the InfoPath Data Connections to a data connection library on my Sharepoint site... I can see the files when I login to the site but when I try creating a New form from a Data Connection File, I get an error message "This location does not contain any data connection files with the appropriate settings".  What ARE the appropriate settings?

I'm just really confused about this because I cannot seem to be able to build forms that use data connection files loaded onto a Sharepoint site or central server....

I appreciate any help I can get!




Thanks, KBW

Infopath form services connectivity of printer



I am facing issue of printer connectivity from Infopath form services.

I have lines of code through which i can connect to printer using Infopath client mode.

I have shared the printer. Also the printer is set as default

The same lines of code is not working for browser enabled Infopath form.

Need help

Here is my lines of code. Is it there any credentials need to be passed ?



void btnSubmit_Clicked(object sender, ClickedEventArgs e)




Infopath form and forms library error

I've created an InfoPath 2010 form and associated it with a forms library on a SharePoint site. When I go to the library and choose "Add document" the form opens up to be filled out by the user. When the form is filled out, and the user tries to submit, they get an error saying that I need to configure SharePoint to allow cross-domain data access for user form templates that use connection settings in a data connection file and store a UDC file in the same site collection as the form. So I've enabled cross-domain data access and I've already created a Data Collection Library for Forms in the Site that is approved. What am I missing?  Why am I still getting the error?  

Infopath Form services help

Hi, I have a Sharepoint List "List C" , which has two look up fields from two lists List A & List B. Currently when a user enters a new item in List C, he picks a value from the two lists (A&B) However, List A has  mutli-value Look up from List B. Now I would like to customize Sharepoint List form for List C (hopefully use Infopath form services), and achieve cascading. i.e When a user Picks a value from List A to enter a new item in List C, I would like to casacade the Multivalue Look up values from List B. Is this possible at all? If so, can anyone out line a procedure? Thanks so much.          

InfoPath Forms Services postback crash

Howdy, I'm an InfoPath 2007 developer and have used it extensively in conjunction with SharePoint 2007 (and Forms Services). I've noticed a persistent bug in Forms Services when using postbacks -- I can't seem to find a bug report or known issue report for it. When a field is say, for instance, set to Always postback, if you click on another field / checkbox / whatever which will also perform a postback, it crashes the form & IE8. Has anyone else come across this bug? I assumed something funny would be going on as the JS behind it would be calling two postbacks at the same time, and perhaps this isn't handled well? I couldn't find any related post on this forum, just seeing if anyone else has come across it and whether a solution exists? Thanks, George

Anonymous users submitting Infopath forms via InfoPath Form Web Part

Is there a way for anonymous users in a public facing site to submit InfoPath List Forms via an InfoPath Form Web Part? Currently when I go to a page with the InfoPath Form web part configured as an anonymous users I get the following error message: Error loading the form A form template (.xsn) file cannot be accessed. You may not have the required permissions to open the file The list allows anonymous users permissions to add and view items When logged in the form works fine

Configuring and Getting Started with InfoPath Form Services

Hi guys, I have some general questions regarding InfoPath Form services that I've been trying to research but I can't seem to get a straight answer from my google searches, so I'm really hopinh you guys can help me. We recently upgraded to SharePoint Enterprise 2010 and I will be the main person in charge of the content and administration. We had a 3rd party do the installation for us, but they don't know much about the From capabilities. We have several forms that we need to build and put on SharePoint so that our field managers (all around the country in 8 different states) can fill out, and submit. All of the information that they submit, or that is presented on a dropdown menu on the forms will be coming from our Microsoft SQL database on  a new sql2008 server we just bought. I have already made a database on the new server with just two tables in it in order to test out the forms. I was looking around on SharePoint and from the error message I got, I was under the impression that I first needed to build the form on InfoPath2003 (that's the version of office we have) and then just publish the form to SharePoint. Is this true? It's this simple? The more I looke online it seemed that I first needed to upload a data connection to SharePoint Central Administration..? the problem with that I would have to convert our sql database to the data type that it needs with

Error Publishing Workflow - : Activation could not be completed because the InfoPath Forms Services

Recently our when trying to publish a new workflow we are getting the following error: Activation could not be completed because the InfoPath Forms Services support feature is not present. Another symptom is any existing custom workflows are not running. There are several older posts from SharePoint 2007 that indicate to disable and re-enable the SharePoint Server Enterprise Site features. I have tried that and I still get the error.  Looking through the ULS I see the following when I try and publish a workflow: 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 SharePoint Foundation General 8e2s Medium Unknown SPRequest error occurred. More information: 0x80070002 c700de1a-5756-4f45-915e-3b229e56f049 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 InfoPath Forms Services Conversion and Deployment ey0w Verbose VerifyListPresence: FTL not found on site:http://uchintranet due to expected FileNotFound exception:The system cannot find the file specified. (Exception from HRESULT: 0x80070002) c700de1a-5756-4f45-915e-3b229e56f049 09/16/2010 15:04:29.48 w3wp.exe (0x2070) 0x0718 InfoPath Forms Services Runtime 82mv Exception Activate NonAdminSolution failed with unhandled exception Microsoft.Office.InfoPath.Server.Util.InfoPathLocalizedException: Activation could not be completed because the InfoPath Forms Services support feature is not present.     at Mic

Dynamiq publishing in SharePoint and Deployment of InfoPath Forms Services


Actually, i am working in InfoPath Forms services under MOSS2007. I am publishing Infopath in a specific site (http://<serverName>:<serverport>), and after i upload the administrator form in sharePoint and activate it in a site collection.

I want to ask if there is a solution to publish infopath  with code

I have found how to activate infopath in a site collection with code .

thanks for advance.

Contact selector InfoPath forms services


I want to filter users displayed in contact selector by group.

So, i don't want to display all users but only users in a special group

publish infopath form to sharepoint services 3.0 as content type



can an infopath form be published as content type to a sharepoint services 3.0 form library?

i have created 2 form libraries. one to store the tamplate an the other to store the form itself and where you can open a new form.

but whenever i click new to open a new form i get this error message:

the element "comment" is used but not declared in the DTD/schema.

does any one know what this error could be?

InfoPath Forms Services errors

I'am running SharePoint 2010 Server Standard. When trying to configure any of the InfoPath Forms Services from SharePoint 2010 Central Administration I get a File not found error containing a correlation ID number. I'm at a loss as to what the issue is.

cascading drop down list in infopath forms services Using SharePoint Look up list from multiple Sh



Some one can help me, if possible screen shots.
Environment : MOSS 2007, InfoPath 2007

InfoPath Forms Services has detected a mismatch between the user's data in the browser and on the s


Hi All,

I am getting following error message in my SharePoint Logs,

InfoPath Forms Services has detected a mismatch between the user's data in the browser and on the server. This may indicate the SESSION_STATE_PASCAL_CASED is not configured properly on a multiple front end farm or that a malicious user is trying to tamper with client data.

Any idea how to solve this issue ?


Muhammad Tariq khan

InfoPath form for 2010 workflow asTask Forms not showing up


Hello all,

The workflow deploys successfully, goes to first state as expected. When I click to change the task [using InfoPath task form], instead of showing the InfoPath form I see SharePoint 2010 edit form for the task list

Here are my files:


<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/ "
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver">
    <Property Key="GloballyAvailable" Value="true" />
    <Property Key="RegisterForms" Value="*Forms\*.xsn" />

Package.Template.xml :

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="http://schemas.microsoft.com/sharepoint/">


<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com

Infopath Form Services 2007 pass URL from one XSN to another without code


Is it possible to pass the current URL value in an opened Infopath Form to another Infopath form withouth using code? Basically I am trying to pass variables from one XSN to another & the requirements are such that I cannot combine the forms & I am unable to use C#.

Just wish I could get a handle on the Site Referrer value out of the box in Infopath without code. Javascript might be ok if I can embed it in the XSN file and then somehow call it from the XSN file on submit. Is that even possible? Or can this be done without code at all?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend