How to configure data connection URL for production and development server - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to configure data connection URL for production and development server

Last post 06-02-2010 03:54 AM by Graeme. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 04-27-2010 05:38 AM

    How to configure data connection URL for production and development server

    Hi Experts,

    I have created one form in InfoPath using WebService as data sending and receiving medium. When I have developed this page in my local environment I have used web service from my local development environment.

    Now I want to send it to customer where they will test this form's functionality. But they will refere to other URL location, so how can we replce that localhost url to their production web service url.

    Any kind  of suggestion will be greatly appreciated.

    Thanks in Adv.

    Filed under:
  • 04-27-2010 08:56 PM In reply to

    • Prasad
    • Not Ranked
    • Joined on 04-29-2009
    • Hyderabad
    • Posts 19

    Re: How to configure data connection URL for production and development server

    Hi,

     You need to assign the url of the web service dynamically, See the sample code below: 

                    EmployeeInfoService.EmployeeData EmployeeDataServiceObject = new EmployeeInfoService.EmployeeData();
                    EmployeeDataServiceObject.PreAuthenticate = true;

                    EmployeeDataServiceObject.Credentials = CredentialCache.DefaultCredentials;
                    EmployeeDataServiceObject.Url = SPContext.Current.Site.Url.ToString() + "/_vti_bin/EmployeeDataService.asmx";
                    //EmployeeDataServiceObject.Url = new SPSite("http://ushouvmet02d:1000/").OpenWeb().Url.ToString() + "/_vti_bin/EmployeeDataService.asmx";

    Regards,
    P V V S V Prasad
    Invesco
    MyBolg
    Filed under:
  • 06-01-2010 07:30 AM In reply to

    Re: How to configure data connection URL for production and development server

    I need to do this too, but I'm not using Sharepoint.

    I've been doing it manually in Visual Studio - first publishing to my test web site then updating all the datasource URLs and re-publishing to the prod web site. This is tedious, especially since VS then creates new versions of all the xsd and xml files in the solution which causes grief with Source Safe.

     Is there a better solution?  I don't see where the code above would go...

    Filed under:
  • 06-02-2010 12:14 AM In reply to

    • Prasad
    • Not Ranked
    • Joined on 04-29-2009
    • Hyderabad
    • Posts 19

    Re: How to configure data connection URL for production and development server

    Hi,

     Keep all your configuration items in a SharePoint list and access them from this list. So same configuration list you create it in the production environment with the same name.

    Regards,
    P V V S V Prasad
    Invesco
    MyBolg
  • 06-02-2010 12:23 AM In reply to

    Re: How to configure data connection URL for production and development server

    Thanks, but as I said, I'm not using Sharepoint.

  • 06-02-2010 02:21 AM In reply to

    • Prasad
    • Not Ranked
    • Joined on 04-29-2009
    • Hyderabad
    • Posts 19

    Re: How to configure data connection URL for production and development server

    where exactly you are publishing your form? You said web site. Is it not SharePoint web site?

    Regards,
    P V V S V Prasad
    Invesco
    MyBolg
  • 06-02-2010 03:54 AM In reply to

    Re: How to configure data connection URL for production and development server

    Publishing to a normal IIS website. Not Sharepoint.

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.