Dynamically build Portal URL

Hello experts,
I'm searching for a possibility to build up dynamically a portal url like this:
http://<hostname>:<port>/irj/portal?NavigationTarget=navurl://dcaceb3f782aa37c63aedfdc8347c7b5&....
&CurrentWindowId=WIDDefaultExternal1250835714537&NavigationContext=navurl://39fccbe94b41d07fd15b942490ec5e9e
The goal is it to start the browser with the seached URL from an ABAP report. How to start the internet browser I allready now. Is there any ABAP class for building such urls with parameter support?
Thanks in advance.
Best Regards
Clemens

hi,
this is one [WAY|http://help.sap.com/saphelp_nw04/helpdata/en/d3/ab0b5decd045e482d0deae9f9c90d5/frameset.htm]
let me know is that ok for u or  ......
if u r using webdynpro for abap  check for the manus Dua post
How to open URL IView with dynamic url parameter (navigate_absolute)
let me know u need more info
ravidndra

Similar Messages

  • Need help to build Portal Insert URL in OAM..

    Hi All,
    I have a requirement to customize the user Manager screen in such a way that i need to get only the search criteria tab(but not any of the tabs or links) and the search results.
    To achieve this i have builded below Portal URL.
    http://training.orademo.com/identity/oblix/apps/userservcenter/bin/userservcenter.cgi?program=search&comp=true
    By using this above URL i am able to hide all the tabs in the browser but i need to have that search criteria to be displayed in the screen.
    Can any one please suggest me the solution to achieve this.
    Its bit urgent requirement.
    Thanks in advance.
    Siva Pokuri.

    Hi Colin,
    Thanks for your quick response.
    URL that i posted will search the users in OAM. But my requirement is like i have to select the attribute and search type and search value from that page(in that Page i should not have UserManager, GroupManager, Org Manager, Identity SYstem Console tab and My Profile , reports ...etc links should not be appear) i sould be able to select the attribute that i would like to search only. so the search functionality should be there.
    Based on this req i have to build the URL.
    Please help me.
    Thanks & Regards,
    Siva Pokuri.

  • Retrieve portal url dynamically.

    Hi,
    Could anybody pls let us know how to identify the portal Url dynamically using a function module or SAP Table?
    We want to put this URL in the notification e-mail so it is dynamic when the object is moved to Quality and production systems.
    Thanks in advance.

    One way to make Portal URL dynamic is to create a ztable with fields ABAP system id and portal URL.
    Select Portal URL from this table based on the sy-sysid.
    By this way you dont have to change your code. Just change table entry on each server.
    Hope this helps!
    Monalisa

  • How to dynamically get Poral URL in ABAP WD Application?

    Hello,
    I have a ABAP WD application integrated into Portal as an iView. Now within this application in one of my method i need to know the Portal URL i.e., <protocol>://<server_name>:port/irj/portal
    I know that i could hard code the Portal URL but the problem is that our Portal has got many URLs i.e., one for the internal users, another for VPN users and another for mobile users etc., and so i would like to dynamically get and build the URL for other target Portal iViews.
    I tried using some standard class methods but all of them returned with SAP Application servers HTTP details where as i am only interested in Portal HTTP details.
    Can anybody please tell me how to get this?
    Thanks and Regards,
    Vasu

    Dear Vikas,
    Please go through this useful wiki  by Arnaud Leymet [How to handle portal user idle timeout.|http://wiki.sdn.sap.com/wiki/display/EP/EPSnippet-Portaluseridletimeoutforlogoff-custom+javascript]
    Warm Regards,
    Upendra Agrawal

  • Need help dynamically building combo-boxes...

    How can I dynamically build drop down lists?
    I was thinking about using a dynamic page, with bind variables
    set for sql statements inside <oracle></oracle> tags, or passing
    the variable from the first selection to the second selection of
    another page (or the same page?)...
    Another thing I was thinking about would be to base a form on a
    DB procedure, and pass the selections to the procedure, and re-
    build the lists that way...
    I need to avoid client side processing (javascript) because of
    accessiblity concerns.
    Any ideas would be greatly appreciated...
    Ryan

    Ajay,
    The following is an excerpt of the code I used. Because of a
    lack of time, I haven't made the code generic. The code is used
    to interface with Oracle Reports 6i & Oracle Configurator. The
    configurator (config_hdr_id & config_rev_nbr) parameters are
    selected by the user and passed into Oracle Reports using related
    dynamic combo-boxes. Pay particular attention to the
    wwpro_api_parameters.get_value function as well as the onChange
    javascript. Hope you can take pieces of this for an example.
    The following is the code for a Portal dynamic page:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Configurator Reports</title>
    <SCRIPT LANGUAGE="JavaScript1.1">
    <!-- Comment out script for old browsers
    ** this function will open a new URL for the Reports CGI
    ** executable to run the report
    function runReport()
    // semi-constants for JavaScript
    var cgiexe = "runrep.sh";
    var slash = "/";
    var colon = ":";
    var qmark = "?";
    var paramsep = "&";
    ** URL parameter values
    ** We should check for nulls, http://, etc. but not for now
    var dtlist = document.REPFORM.WEBHOST;
    var WEBHOST = dtlist.options[dtlist.selectedIndex].value;
    var WEBPORT = document.REPFORM.WEBPORT.value;
    var dtlist = document.REPFORM.SERVER;
    var SERVER = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.REPORT;
    var REPORT = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.P_HEADER_ID;
    var P_HDR_ID = dtlist.options[dtlist.selectedIndex].value;
    var P_REV_NBR = document.REPFORM.P_REV_NBR.value;
    var dtlist = document.REPFORM.USERID;
    var USERID = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.DESTYPE;
    var DESTYPE = dtlist.options[dtlist.selectedIndex].value;
    var dflist = document.REPFORM.DESFORMAT;
    var DESFORMAT = dflist.options[dflist.selectedIndex].value;
    var dtlist = document.REPFORM.MIMETYPE;
    var MIMETYPE = dtlist.options[dtlist.selectedIndex].value;
    // construct the final URL given the parameters
    var URL = "http://" + WEBHOST + colon + WEBPORT +
    "/dev60cgi/"
    + cgiexe + qmark +
    "server=" + SERVER + paramsep +
    "report=" + REPORT + paramsep +
    "p_header_id=" + P_HDR_ID + paramsep +
    "p_rev_nbr=" + P_REV_NBR + paramsep +
    "userid=" + USERID + paramsep +
    "destype=" + DESTYPE + paramsep +
    "desformat=" + DESFORMAT + paramsep +
    "mimetype=" + MIMETYPE;
    // alert("Opening a window with the following URL : \r\r" +
    URL);
    // open the new window with the constructed URL
    //runWindow = window.open(URL);
    //Point the current window to the URL to run the form
    this.window.location.href=URL;
    function getRevision(form)
    var l_config_hdr_id =
    form.P_HEADER_ID.options[form.P_HEADER_ID.selectedIndex].value;
    window.location.href =
    "/pls/portal30/!PORTAL30.wwpob_page_util.redirect?_pageid=61&_tab
    string=&_portletmode=&_cache=1&cz.p_config_hdr_id="+l_config_hdr_
    id;
    return false;
    //-->
    </SCRIPT>
    </head>
    <body>
    <form NAME="REPFORM" METHOD="GET" onSubmit="return false">
    <table BORDER=0 CELLSPACING="5" valign="top" align="left">
    <tr>
    <td ALIGN=LEFT COLSPAN="2"><font face="arial" size="-1"><B>Enter
    configuration data and click the button to submit the selected
    report.</B></font></td>
    </tr>
    <TR><TD> </TD></TR>
    <tr><td valign="top"><table BORDER=0 CELLSPACING="2">
    <TR><TD COLSPAN="3" ALIGN="LEFT">
    <FONT COLOR="#6666CC" FACE="arial,helvetica"
    SIZE="-1"><NOBR><B>Report Parameters</B></NOBR></FONT>
    </TD></TR>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Report:</font></td>
    <td><font face="arial" size="-1"><select NAME="REPORT">
    <option SELECTED
    VALUE="portal_test_report_6i.rdf">portal_test_report_6i.rdf
    </select></font></td>
    </tr>
    <ORACLE>
    -- Dynamically retrieving the Configurator Header ID's.
    -- kreierso 8-oct-01
    declare
    v_config_hdr_id oc_config_ord_qte_lookup.config_hdr_id%type;
    begin
    v_config_hdr_id :=
    to_number(portal30.wwpro_api_parameters.get_value('p_config_hdr_i
    d','cz'));
    htp.p('<TR><TD ALIGN="left"><font face="arial"
    size="-1">Configuration Header ID:</font></TD>');
    htp.p('<TD><font face="arial" size="-1"><SELECT
    NAME="P_HEADER_ID" onchange="getRevision(this.form)">');
    htp.p('<OPTION VALUE=" "> ');
    for r_get_hdr_values in (
    select cz.config_hdr_id, cz.config_rev_nbr
    from cz_config_hdrs cz
    order by cz.config_hdr_id desc
    ) loop
    if v_config_hdr_id = r_get_hdr_values.config_hdr_id then
    htp.p('<OPTION SELECTED
    VALUE="'||r_get_hdr_values.config_hdr_id||'">'||r_get_hdr_values.
    config_hdr_id);
    else
    htp.p('<OPTION
    VALUE="'||r_get_hdr_values.config_hdr_id||'">'||r_get_hdr_values.
    config_hdr_id);
    end if;
    end loop;
    htp.p('</SELECT></font>');
    htp.p('</TD></TR>');
    htp.p('<TR><TD ALIGN="left"><font face="arial"
    size="-1">Configuration Revision:</font></TD>');
    htp.p('<TD><font face="arial" size="-1"><SELECT
    NAME="P_REV_NBR">');
    for r_get_rev_values in (
    select cz.config_rev_nbr
    from cz_config_hdrs cz
    where cz.config_hdr_id = v_config_hdr_id
    order by cz.config_rev_nbr desc
    ) loop
    htp.p('<OPTION
    VALUE="'||r_get_rev_values.config_rev_nbr||'">'||r_get_rev_values
    .config_rev_nbr);
    end loop;
    htp.p('</SELECT></font></TD></TR>');
    end;
    </ORACLE>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Format:</font></td>
    <td><font face="arial" size="-1"><select NAME="DESFORMAT">
    <option SELECTED VALUE="RTF">RTF
    <option VALUE="PDF">PDF
    <option VALUE="HTML">HTML</select></font></td>
    </tr>
    <tr><td> </td></tr>
    <tr>
    <td ALIGN=RIGHT><FONT face="arial" size="-1"><input TYPE="SUBMIT"
    NAME="Runrep" VALUE="Run Report"
    onClick="runReport();"></FONT></td>
    <td ALIGN=RIGHT><FONT face="arial" size="-1"><input TYPE="RESET"
    NAME="Reset" VALUE="Reset"></FONT></td>
    </tr>
    </table></td>
    <td valign="top"><table BORDER=0 CELLSPACING="2">
    <TR><TD COLSPAN="3" ALIGN="LEFT">
    <FONT COLOR="#6666CC" FACE="arial,helvetica"
    SIZE="-1"><NOBR><B>Report Paremeters (Hidden
    Candidates)</B></NOBR></FONT>
    </TD></TR>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Userid:</font></td>
    <td><font face="arial" size="-1"><select NAME="USERID">
    <option SELECTED
    VALUE="kreierso/password@DEV11">kreierso/password@DEV11
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Type:</font></td>
    <td><font face="arial" size="-1"><select NAME="DESTYPE">
    <option SELECTED VALUE="cache">cache
    <option VALUE="Printer">printer
    <option VALUE="File">file
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Mimetype:</font></td>
    <td><font face="arial" size="-1"><select NAME="MIMETYPE">
    <option SELECTED VALUE="application/msword">application/msword
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Reports
    Server:</font></td>
    <td><font face="arial" size="-1"><select NAME="SERVER">
    <option SELECTED
    VALUE="Rep60_dev11_shane.dci.com">Rep60_dev11_shane.dci.com
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Web Host:</font></td>
    <td><font face="arial" size="-1"><select NAME="WEBHOST">
    <option SELECTED VALUE="shane.dci.com">shane.dci.com
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Web Port:</font></td>
    <td><font face="arial" size="-1"><input type=hidden
    NAME="WEBPORT" VALUE="7500">7500</font></td>
    </tr>
    </td></tr></table>
    <TR><TD> </TD></TR>
    <TR><TD ALIGN="CENTER" COLSPAN="2">
    <font face="arial" size="+1" color="#000099">This is currently
    being developed.... ~Thanks, Kirk.</font>
    </TD></TR>
    </table>
    </form>
    </body>
    </html>

  • Dynamically build parameter list

    I'm after an easy way to dynamically build a list of ALL the defined parameters within the additional PL/SQL code section on a portal report. I then want to use p_arg_names / p_arg_values to retrieve and store the passed values in a table.
    To clarify, the report may have 10 parameters of which say only 5 are passed on a particular run. I need to then populate 10 columns which includes nulls for the parameters not passed. This way parameter values will always be written to the same column.
    I aiming to use this as generic code to apply to several other reports which will write to the same table.
    Ron

    In case anyone else needs this I'll post the solution myself.
    1. p_arg_names and p_arg_values (shows only the populated parameters / values)
    2. l_arg_names and l_arg_values (shows all the parameters / values)
    So in my case I needed to reference l_arg_names and l_arg_values.

  • Portal URL for file v. text v. PL/SQL item types?

    I am using Portal 10.1.2.2.0. From the Portal OWA logger data, how can I tell a file item type from a text item type from a PL/SQL item type?
    The OWA_LOGGER_DOC view iis looking for url like '%/docs/%', but all the document URLs are '%/ITEM/%'. The URLs to text items also appear to be '%/ITEM/%'.
    How can I tell that a Portal URL is pointing to a document?

    OK, I figured out a way to do this in my environment (Oracle Portal Version: 10.1.2.0.2 (Build: 150) ). Your mileage may vary.
    I created a procedure which includes the following:
        p_headingText IN VARCHAR2,
        p_fileName IN VARCHAR2,
        p_descriptionText IN VARCHAR2)
    is
        l_portalGuid VARCHAR2(50);
    begin
        select GUID into l_portalGuid from portal.wwv_things where ID = p_fileName;
        htp.p('<p class="PortletText1"><a href="http://[HOSTNAME]/pls/portal/url/item/' || l_portalGuid || '">' || p_headingText || '</a> ' || p_descriptionText || '</p>');
    end;This seems to work for me. (Sorry about the long line.) p_headingText, p_filename, and p_description are passed from the custom item type. Good luck!

  • Dynamically build a SAP Transaction menu?

    Hi All,
    We are connecting EP7 to an ECC backend to run SAP transactions.
    Rather than building hundreds of roles in the portal, or uploading them,  is it possible to have the portal dynamically build a detailed navigation menu for each user by reading a person roles in the backend ECC system?
    I've heard that this can be done with a custom iView.  It reads the User Menu from the backend and displays it in the portal. Is this iView available for downloading?
    Thanks

    Hi Anton,
    If I understand you correctly then you have a webdynpro iView with 2 values and you want to access a transaction iView by sending these 2 values as input parameters.
    You can achieve this using Portal Navigation. This document provides details:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62
    API:
    public void navigateAbsolute(java.lang.String navigationTarget,
                                 WDPortalNavigationMode mode,
                                 java.lang.String windowFeatures,
                                 java.lang.String windowName,
                                 WDPortalNavigationHistoryMode historyMode,
                                 java.lang.String targetTitle,
                                 java.lang.String contextUrl,
                                 java.lang.String businessParameters,
                                 java.lang.String applicationParameters,
                                 boolean postParameters,
                                 boolean useSAPLauncher)
    API details:
    http://help.sap.com/saphelp_nw70/helpdata/en/c3/235a428a1e9041e10000000a1550b0/content.htm
    Best regards,
    Sangeeta

  • Getting current portal url and port no

    Dear all,
    Please let me know how to get the current portal hostname and port no .  We are  accessing the port thru <b>virtual hostname</b> and not by physical server name. We are using EP 7.0 SP10 . I need this  virtual hostname and port no to build the url to access the images stored in server from Web Dynpro. I have created http alias for the images folder in the server. I need to build the url like  <http>://<hostname>:<port>/<image alias name>/***.jpg  to access the images from server.
    Pls also share any other suggestions to access the images from the sever thru web dynpro
    Thanks in Advance.
    Regards
    Vasudevan

    Hi friends.
    I have used the last post, but it is not working.
    Mat be the API had changed.
    What class or interface could give me this data in web dynpro component?
    Too, I'm using the SAP NetWeaver Developer Studio
    Version: 2.0.16
    Build id: 200602130353
    Thank you.
    Manuel Loayza
    Living La Vida JAVA
    Edited by: Manuel  Loayza Gahona on Jul 23, 2008 6:54 PM

  • Different Portal URL Alias

    Hi
    I have a portal and it is http://abc:50000/irj/portal.
    I want to setup another Portal URL Alias http://abc:50000/XK03
    When user access this URL http://abc:50000/XK03, it will redirect to a transaction iView in PCD.
    Only this special URL http://abc:50000/XK03 will be redirected.
    Please let me know if this is possible with configuration or development.
    Thanks.
    Regards
    Mike

    1. Does it have to be http://abc:50000/XK03 or is it also allowed to go for http://abc:50000/irj/portal/XK03
    If so then you could use "Quick Links" see the following for details:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/97/b0ef8b24a64ae884f0ab246e54cae5/frameset.htm
    2. If http://abc:50000/irj/XK03 would be allowed then you could go for this solution:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/1d5d0171364269e10000000a421937/frameset.htm
    (also mentioned by  Mayank Mehta )
    3a.If it has to be http://abc:50000/XK03 then you have to build a small web-application that is configured as /XK03.
    (context root must be set, I guess).
    OR
    3b. You could also setup a SAP Web Dispatcher and configure:
    - (SAP Web Dispatcher 7.01 and before) http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/3d993fb08c72d1e10000000a42189c/frameset.htm
    - (starting from SAP Web Dispatcher 7.11 also the following) http://help.sap.com/saphelp_nwpi711/helpdata/en/48/9266acaa6b17cee10000000a421937/frameset.htm
    Good Luck
    Benjamin
    Edited by: Benjamin L.F. Houttuin on Aug 30, 2010 3:14 PM

  • How to catch URL parameter from Portal URL in Web Dynpro iView

    Hi All,
    I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
    I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
    String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
    When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
    Your urgent help will be highly appreciated.
    Warm Regards,
    Shubho

    Hi Shubhadip
    Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
    You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
    But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
    I hope you find a solution.
    Regards
    kk

  • SSO is not working for an Alias URL but is working for original portal URL

    Hello,
    We have a BSP running inside the portal and expects authentication.
    When I run this BSP using the portal regular address everything is working OK and SSO is working after logging into the portal.
    At next step, we have configured an alias for the portal URL at the DNS Server.
    When activating the BSP from the alias URL it asks for 2nd authentication. Meaning, SSO is not working after logging into the portal.
    I have activated an HTTP trace in order to see why and it seems like when running it from the alias name it recognizes it as a different domain and I assume this is why the authentication is coming up.
    I would like to suppress this for the alias URL but don't know how.
    I found this UME property on the server:ume.logon.security.relax_domain.level
    This UME property controls the amount of sub domains to remove from the server name to obtain the domain for which the logon ticket is valid.
    I have changed this property from its default value 1 to 3 (and restarted the server of course) which, in our case, leaves only ourCompany.com for the ticket in the original server URL. Yet, the authentication pop up is still not supressed when browsing through the alias URL.
    Any idea what can I do next?
    Thanks,
    Roy

    Hi Dezso,
    I found the 401 let me know if I look on it right:
    I have an entry node with two subnodes: request and response.
    The response has:
    <responseStatus>HTTP/1.1 401 Unauthorized</responseStatus>
    And the request before that doesn't have any MYSAPSSO2 in it, all it has which is related to cookies is this:
    <header name="Cookie">UserUniqueIdentifier=1174345919524; alreadyLogged=1179560552416</header>
    <cookies>
    <cookie name="alreadyLogged">1179560552416</cookie>
    <cookie name="UserUniqueIdentifier">1174345919524</cookie>
    </cookies>
    Can you advice what to do next?

  • How to create an External Alias for a Portal URL ?

    Hi Gurus,
    Can anybody tell me how to create an external alias for a portal link(URL). Actually, my problem is i want to send this Portal URL(link) thru' a SendMail step to the user so that when he clicks on it, it will take him to his UWL(Ofcourse after signing-in). As this URL length is > 80 char(101 char), i am not getting the full lenght URL in my Outlook mail. THough we are on ECC 6.0,Basis Rel 7.0, as per the OSS note 559234, we should have this length extended to 132 bytes. But, for some reason, its not happening. And,in the same OSS note, it was mentioned that we can use external aliases to achieve this(shortening the URL length).
    Can anybody tell me how to achieve this, either thru' increasing the URL length or thru' ext. aliases.
    Please reply asap.
    Thanks in advance
    venu

    Not an issue as of now. I'll open up again if needed

  • Free way to dynamically build a form that adobe reader can fill out?

    It's 2008 and we don't have a open, free way to dynamically build a pdf form that adobe reader can populate with data? Why is Adobe charging for this sort of thing? Does this make sense to anybody?

    > Why is Adobe charging for this sort of thing?
    That seems to me the way economics works. People charge for things
    that other people are prepared to pay for. It's no good trying to
    charge for things that nobody will pay for.
    >Does this make sense to anybody?
    Adobe's shareholders, I would think, who will sack Adobe's management
    if they do not make money.
    By the way, the PDF specification is open. If you want something for
    free, why not implement it and share it with the world, who will
    surely be pleased. (You will not be able to implement a form that
    Reader can save, however, this is based on trade secrets).
    Aandi Inston

  • Dynamically loading the url of a web reference object in C#

    Hi,
    We have a number of assemblies (C# - VS 2010) that access third party web services via SOAP.  The url to access the site is part of the web reference object.
    We have need to be able to change the url used to access the service at run runtime when conditions require.
    What would the be the best practice of dynamically setting the url to be used at run time?
    Thanks in advance.
    SanDegan99

    You could specify the URLs as keys in the application configuration file (App.config or web.config) of the main application:
    https://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings(v=vs.110).aspx
    https://msdn.microsoft.com/en-us/library/aa374182(v=vs.85).aspx
    App.config:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <appSettings>
    <add key="url1" value="http://www.url.com/test.asmx"/>
    </appSettings>
    </configuration>
    You can then retrieve these values using the ConfigurationManager class in any assembly that is referenced from the main application like this (add a reference to System.Configuration.dll):
    string url = System.Configuration.ConfigurationManager.AppSettings["url1"].ToString();
    You can change the values of the keys in the application configuration file without having to recompile the application.
    The other option is to specify the URLs in a database or some other persistent storage from which you read at runtime but configuration files are generally used to store these kind of variable application settings.
    Please remember to mark helpful posts as answer to close your threads and remember that any new question you may have should be asked in a new thread of its own.

Maybe you are looking for

  • 15 int digits and 3 decimal digits number problem in CR for VS 2005

    Post Author: condeagustin CA Forum: Crystal Reports HiIm using the Crystal Reports that comes with VS 2005 and I'm having a problem showing a number with 15 int digits and 3 decimal digits. In my tests, for example I have a formula that only has this

  • Grir clearing account

    hi, may i know where in customizing to define the grir clearing account so that system will automatically post to the clearing account during Goods receipt and invoice verification? thanks rgds

  • Apple tv could not connect to library

    Hi, my apple tv (2nd generation) doesn't connect to my itunes library. It reconizes my computer and my housband from home sharing, his a PC it loads the library, but mine from 3 days now, shows always the same message "apple tv could not connect Ana

  • How to generate SIDs for a particular range of data for a DSO ?

    Hi All, Please let me know if there is any way to generate SIDs for a particular range of data for a DSO which does not have any SID values. I need this as when i am trying to load data from DSO to InfoCube it's taking a lot of time. When i tried to

  • CWA over wireless, timeout when redirecting to ISE guestporal

    I configurated CWA following this guide https://supportforums.cisco.com/docs/DOC-26442 And I apply a redirect-acl to allow traffic between endpoint and ise with dns allowed too. I use a static vlan on interface. And there is no vlan change after auth