How to detect Role Environment

Hello,
I want to know how to detect Role Environment is staging or production in web role. i am doing project in Azure cloud with asp.net

Hi Vikas,
You could use Azure Management API to get the deployment configuration. For example, You could use
'Get Deployment' to get a deployment information. And you could get the role environment form the 'DeploymentSlot' . About how to detect the Environment, I suggest you
could refer to those post:
http://stackoverflow.com/a/4330628
http://stackoverflow.com/a/7111195
And I suggest you could see this code sample from this page:
http://convective.wordpress.com/2009/12/19/service-management-api-in-windows-azure/
Hope this helps.
Will 
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to revover compiling environment?

    I installed Oracle8.1.7 server on Redhat7.3
    so I had to change my compiling version to 6.2 with following files
    these rpms:
    compat-egcs-6.2-1.1.2.14.i386.rpm
    compat-glibc-6.2-2.1.3.2.i386.rpm
    compat-libs-6.2-3.i386.rpm
    How could I recover my original compiling environment?
    Thanks alot

    Hi Vikas,
    You could use Azure Management API to get the deployment configuration. For example, You could use
    'Get Deployment' to get a deployment information. And you could get the role environment form the 'DeploymentSlot' . About how to detect the Environment, I suggest you
    could refer to those post:
    http://stackoverflow.com/a/4330628
    http://stackoverflow.com/a/7111195
    And I suggest you could see this code sample from this page:
    http://convective.wordpress.com/2009/12/19/service-management-api-in-windows-azure/
    Hope this helps.
    Will 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to created roles in JAVA environment

    Can anybody tell me how to create Roles and profiles in JAVA only environment?
    Thanks in advance.

    Hai,
    Please check the below link, will help....
    http://help.sap.com/saphelp_nw04s/helpdata/en/5b/5d2706ebc04e4d98036f2e1dcfd47d/frameset.htm
    Regards,
    Yoganand.V

  • How to detect the path of Temp directory

    I am writing a class library which allows users to manipulate a database in the web server java applications/applets. In my logic the Application/Applet communicate with a CGI script/Servlet in the server and that do all the database handling. My objective is to make the Client independant from the Database Drivers, and to some restrictions and possible security threats that can arrice when accessing the database directly.
    99% of the work is done and now I am doing the fine tuning.
    My Problem:
    When the user downloading a blob object from the server database. each time the program read the blob it will get a new copy from the server. This is not good if the blob is large (few 100 megs) . So I am going to implement a cache system. but the problem is If I am caching in the memory it will not support large objects (Memory is a limited factor). So the preferance is use the Temperary files but I do not know how to detect the path to temperary folder.
    And my 2nd questions is are the applets allowed to write and read in temperary folder.

    The Java default temporary file path can be determined with
    System.getProperty("java.io.tmpdir")This is typically the same value as the os environment variable

  • ANSWER: HOW TO DETECT Java Plugin from JavaScript

    I created a new topic because the questions about
    how to detect Java Plugin in browsers are scattered
    thoughout this forum.
    Basically you need to employ two approaches for IE and NS.
    In IE you need to try to instantiate a small applet
    (not your production applet) in order to see if browser
    can do it. if the browser can do it, you can make a
    call applet from JavaScript in order to find version of
    JRE (as well as a host of other things).
    In NS you can write a simple JavaScript which will
    interrogate the browser for all plugins installed. Then
    ypu can make a desicion whether to pass execution to
    the next(or generated) page which hosts your applet,
    or ask the user to download/install a plugin.
    I ecourage everybody to host a plugin on your site
    rather leave default link to it which is generated by
    html converter.
    In order to run sample,
    Prerequisites:
    Java Plugin 1.3.
    If you have a different version of plugin,
    substitute hardcoded plugin version in JavaScript for
    value that you have.
    1. compile java file
    2. put class file in the same directory with html file
    3. load html file into the browser.
    4. press "Check Java Plugin.." button
    5. see it work
    6. examine code
    7. uninstall plugin
    8. repeat steps 1 - 4
    9. see it work
    10. install plugin.
    Sample code follows:
    **********************HTML FILE BEGIN***********
    <HTML>
    <HEAD>
    <!-- Generated by Kawa IDE -->
    <TITLE>Detect Java Runtime</TITLE>
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    var browsername;
    function doNetscape()
    for (i=0; i < navigator.plugins.length; i++)
    for (j = 0; j < navigator.plugins.length; j++)
    if(navigator.plugins[i][j].type == "application/x-java-applet;version=1.3")
    alert("You are running Netscape with Java Plugin 1.3.0 - OK");
    return;
    alert("You are running Netscape\nPlease, install Java Runtime Environment 1.3.0");
    function doMicrosoft()
    var applet = document.myApplet;
    if(applet == null)
    alert("You are running Microsoft Browser.\nPlease, install Java Runtime Environment 1.3.0");
    return;
    var version = applet.getJavaVersion();
    if(version == "1.3.0")
    alert("You are running IE, Java Plugin 1.3.0 installed - OK");
    else
    alert("You are running IE, other plugin installed - mybe OK if later that 1.3.0\nYour version: " + version);
    function getJava()
    var applet = document.myApplet;
    if(applet == null)
    alert("Please, install Java Runtime Environment");
    return;
         alert("JRE Version: " + document.myApplet.getJavaVersion());
    function checkJavaPlugin()
         browsername = navigator.appName;
         if(browsername.indexOf("Netscape")!= -1)
              browsername="NS";
              doNetscape();
         else
              if(browsername.indexOf("Microsoft")!=-1)
                   browsername="MSIE";
                   doMicrosoft();
              else
                   browsername="N/A";
                   alert("Unknown browser: " + browsername);
    </SCRIPT>
    <body>
    <Strong>Check Java Plugin</strong>
    <OBJECT id="myApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
         WIDTH = 1
         HEIGHT = 1 >
         <PARAM NAME = CODE VALUE = "DetectPluginApplet.class" >
         <PARAM NAME="scriptable" VALUE="true" >
         <embed type="application/x-java-applet;version=1.3"
              code = DetectPluginApplet width = 2 height = 2 MAYSCRIPT = "true" >
         </embed>
         </EMBED>
    </object>
    <FORM>
         <INPUT TYPE="button" value="Get Plugin Version in IE" onClick="getJava()">
         <INPUT TYPE="button" value="Check Java Plugin in NS and IE" onClick="javascript:checkJavaPlugin()">
    </FORM>
    </BODY>
    </HTML>
    **********************HTML FILE END***********
    ***************APPLET FILE BEGIN***********
    import java.awt.*;
    public class DetectPluginApplet extends java.applet.Applet
         public void init()
              add(new Label("DetectPluginApplet"));
    public String getJavaVersion()
    return System.getProperty("java.version");
    **************APPLLET FILE END************

    Try following java script, it works on new browsers (NS 4+, IE5+). For IE you have to enable 'ActiveX objects creation' in security options.
    var agt=navigator.userAgent.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
    && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1));
    var is_ie5up = (is_ie && (is_major == 4)
    && ( (agt.indexOf("msie 5.0")!=-1)
    || (agt.indexOf("msie 5.5")!=-1)
    || (agt.indexOf("msie 6.0")!=-1) ) );
    var pluginDetected = false;
    var activeXDisabled = false;
    // we can check for plugin existence only when browser is 'is_ie5up' or 'is_nav4up'
    if(is_nav4up) {
    // Refresh 'navigator.plugins' to get newly installed plugins.
    // Use 'navigator.plugins.refresh(false)' to refresh plugins
    // without refreshing open documents (browser windows)
    if(navigator.plugins) {
    navigator.plugins.refresh(false);
    // check for Java plugin in installed plugins
    if(navigator.mimeTypes) {
    for (i=0; i < navigator.mimeTypes.length; i++) {
    if( (navigator.mimeTypes[ i].type != null)
    && (navigator.mimeTypes[ i].type.indexOf(
    "application/x-java-applet;jpi-version=1.3") != -1) ) {
    pluginDetected = true;
    break;
    } else if (is_ie5up) {
    var javaVersion;
    var shell;
    try {
    // Create WSH(WindowsScriptHost) shell, available on Windows only
    shell = new ActiveXObject("WScript.Shell");
    if (shell != null) {
    // Read JRE version from Window Registry
    try {
    javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
    } catch(e) {
    // handle exceptions raised by 'shell.regRead(...)' here
    // so that the outer try-catch block would receive only
    // exceptions raised by 'shell = new ActiveXObject(...)'
    } catch(e) {
    // Creating ActiveX controls thru script is disabled
    // in InternetExplorer security options
    // To enable it:
    // a. Go to the 'Tools --> Internet Options' menu
    // b. Select the 'Security' tab
    // c. Select zone (Internet/Intranet)
    // d. Click the 'Custom Level..' button which will display the
    // 'Security Settings' window.
    // e. Enable the option 'Initialize and script ActiveX controls
    // not marked as safe'
    activeXDisabled = true;
    // Check whether we got required (1.3+) Java Plugin
    if ( (javaVersion != null) && (javaVersion.indexOf("1.3") != -1) ) {
    pluginDetected = true;
    if (pluginDetected) {
    // show applet page
    } else if (confirm("Java Plugin 1.3+ not found, Do you want to download it?")) {
    // show install page
    } else {
    // show error page
    }

  • How to create role(s) in Web As Java?

    Hi there,
    Can you please tell me how to create roles and assign to a user in Web AS Java Standalone system? I know How to do it if it is Dual Stack...but not with Standalone java System?
    Thanks In Advance
    Kumar

    Hello Kumar,
                        I guess by by dual stack you mean an ABAP+JAVA environment right?
    Anyways, in a JAVA only schema, if you are using your user store as UME, you can create the roles in UME through the browser by logging in as J2EE_ADMIIN or a suer with equivalent authorizations.
    on the other hand you can create J2ee roles in Visual administrator(VA). For that you need to login to VA and go to the service Security provider. There you will find the option to create roles. But please be advised that the actions (equivalent of authorizations in ABAP stack) should already have been defined by your programmers before you can go ahead with the task of creating roles.
    One morething, each J2EE role can contain only one action.
    Where as in UME roles you can group them together.
    Regards,
    Prashant

  • How to detect plug-ins path for Photoshop CC?

    Hi
    I downloaded new CC SDK but unfortunatelly in html doc there is not info how to detect a plug-in path for new Photoshop CC. Pdf doc also contains very old info (still for Photoshop 5.0)
    - Could you advice how my installers can detect new Photoshop CC and detect a target place for plug-in installation? Forboth  win and Mac cases.
    - Is CC a pure 64bit windows app or it also can be presented into both C:\Program files and C:\Program files(x86) folders?
    Thanks
    Maxim

    Thank, Bartek, for your responce
    I checked this approach for CS4. In my winRegistry there is not {06870682-6f3c-4b97-9143-f03e85c0 bd3e} key. Should it work only for CC?
    Previously, I checked "HKLM\Software\Adobe\Photohsop" and found all presented PSD versions, like #12 for CS5, #55 for CS5.5 #60 for CS6. And Wow6432Node accordingly
    Will this approach work if I will search for CC the key like "HKLM\Software\Adobe\Photohsop\80\PluginPath" ? (if I had PSD CC I could check it but I dont wan to install it yet for dont break my currect working environment)
    Also, could you advise what it default installation path for Mac? Some like "/Applications/Adobe/Adobe Photoshop CC" ? Will CC have same plug-ins subfolder like previously versions?
    Best regards
    Maxim
    PS. Ilya, it means what I should check bot 32 and 64 bit windows versions and for CC also? 32bit windows version of CC is still available? wot is <version> key for CC? 80? CC? Do you know what is default installation path for CC on Mac?

  • How many single role we can attach to single user?

    Dear Friends,
    How many single role we can attach to single user?
    Sachin

    Hi Sachin,
    The below parameter can be checked for this topic. Infact the limit is about 9000 for this parameter and typically i have seen ID's in 4.7 environment with around 150 roles or more...
    <b>Auth/auth_number_in_userbuffer</b>
    When a user logs onto SAP, the authorizations contained in the user’s profiles are copied to a user buffer in memory.  The maximum number of authorizations copied is set by this parameter.  The size of the buffer must always exceed the maximum number of authorizations as authorization checks are made only against those in the buffer.
    Refer to OSS notes 84209 and 75908 for more detailed information regarding changes to the size of the user buffer.
    Transaction SU56 shows the contents of the user’s user buffer and a total for all the authorizations in a user master record.
    Hope this info helps
    Br,
    Sri
    Award points for helpful answers

  • How can I use environment variables in a controller?

    Hi all,
    How can I use environment variables in a controller?
    I want to pass a fully qualified directory and file name to FileInputStream and would like to do it by resolving an env variable, such as $APPLTMP.
    Is there a method somewhere that would resolve this??
    By the way,Did anyone used the class of "oracle.apps.fnd.cp.request.RemoteFile"?
    The following is the code.
    My EBS server is installed with 2 nodes(one for current,and other is for application and DB).I want to copy the current server's file to the application server's $APPLTMP directory. But the result of "mCtx.getEnvStore().getEnv("APPLTMP")" is current server's $APPLTMP directory.
    Can anyone help me on this?
    private String getURL()
    throws IOException
    File locC = null;
    File remC = new File(mPath);
    String lurl = null;
    CpUtil lUtil = new CpUtil();
    String exten;
    Connection lConn = mCtx.getJDBCConnection();
    ErrorStack lES = mCtx.getErrorStack();
    LogFile lLF = mCtx.getLogFile();
    String gwyuid = mCtx.getEnvStore().getEnv("GWYUID");
    String tmpDir = mCtx.getEnvStore().getEnv("APPLTMP");
    String twoTask = mCtx.getEnvStore().getEnv("TWO_TASK");
    // create temp file
    mLPath = lUtil.createTempFile("OF", exten, tmpDir);
    lUtil.logTempFile(mLPath, mLNode, mCtx);
    Thanks,
    binghao

    However within OAF on the application it doesn't.
    what doesnt work, do you get errors or nothing ?XX_TOP is defined in adovars.env only. Anywhere else this has to go?
    No, it is read from the adovars.env file only.Thanks
    Tapash

  • How to do Enhancements in Reporting & What is Role and How to create Roles

    Hi All,
    Can any one tell How to do Enhancements in Reporting, and also What is Role and How to create Roles in Reporting?
    Plz reply back me on [email protected]
    Regards,
    Kiran

    Reporting Enhancement - RSR00001 - BW: Enhancements for global variables in reporting
    And using the SAP Exit - EXIT_SAPLRRS0_001
    RSR00001- With this enhancement to global variables in reporting you have the option of determining your default values for variables. You can use this enhancement for variables, for which 'Processing by Customer-Exit' has been selected in the variable maintenance. This is valid for all variable types (characteristic value, node, hierarchy, formula and text variables). You use the Exit EXIT_SAPLRRS0_001 for this.
    The Enhancement component (RSR00001) must be assigned to a Project Created using the Transaction CMOD. On activating the Project, the Exit would become active and in turn the logic written inside the Exit.
    To ensure that the data warehousing soultion reflects your company's structure and business needs it is critical that you establish who is authorized to access the data.With SAP BW, Authorizations can be defined and maintained by object and can also be applied to hierarchies and these authorizations can be inserted into roles that are used to determine what type of content is available to specific users or user groups.
    T-code for Role maintainence -PFCG.
    Please assign points if it is useful.
    Regards
    Pavan Prakhya

  • How to detect USB Flash Drive name in LabVIEW

    Hi there
    I was looking for how to detect a USB Flash Drive name in Labview
    appearently every time i insert USB Flash Drive in a computer, windows assign it a different name
    once "J:" and sometimes "M:"
    Is there anyway to obtain USB Flash Drive name programmatically in Labview ?
    Because in my program an user shouldn't be able to access HDD Drives except his USB Flash Drive (for inserting some file ...)
    thank you and excuse me for my poor english 

    I was able to get the demo.vi to load, but it could not load the other two because there is no block diagram associated with those.  I'm not sure why this is.  I haven't had any issues with other llbs before.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

  • How to detect a selected row in ALV GRID

    Hi,
    Can anyone tell me how to detect and catch an event when a row is selected in an ALV GRID?
    I would like to catch such event when the end user presses Ctrl + Shif + Space bar.
    Thank you and best regards.
    Hassane.

    Hi,
    Use this wiki link, to have a checkbox with all the records in ALV Grid and to process those selected records at a user command, as per the requirement.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • How to detect the Acrobat Browser Plug-in version installed on a users system for non-IE browsers?

    How to detect the *Acrobat Browser Plug-in version* installed on a users system, on Firefox, Safari, Opera, etc?
    Or one script for detecting Plug-in version for major browsers. Need full example code.

    Wrote an article on this with code samples (Javascript + HTML) - basically there are differences between IE and other browsers. Chrome natively comes with the Chrome PDF Viewer so I've incorporated that in my detection script.
    The script detects the browser type, and the installed acrobat version...
    Have a look here:
    Detect the Adobe Reader Plugin

  • How to detect color pages in a PDF?

    I am using a C++ Acrobat plug-in do read/edit a PDF file.
    I need to get the total number of pages in the PDF as well as the page numbers of color pages.
    So far I have been able to get the total number of pages using PDDocGetNumPages() without any trouble.
    However, I cant seem to find an API that lets me know whether a particular page is color or not. Is there a way to do this?
    Thanks in advance!

    But what if there is RGB data that means black or gray (R == G == B), does that mean black or RGB?
    There is some sample code in the SDK for iterating over the content in the PDF, and then you can get the colorspace and the color of each object.
    But you really need to do some background research on colors & colorspaces to properly achieve this goal.
    From: Sachintha81 <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Wed, 8 Feb 2012 16:57:10 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How to detect color pages in a PDF?
    Re: How to detect color pages in a PDF?
    created by Sachintha81<http://forums.adobe.com/people/Sachintha81> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4194889#4194889

  • How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?

    How to detect the HTML extension window close in In-design? Does the In-design throws any event on opening/closing of extensions?
    I have a HTML extension running in In-design CC 2014 version.
    I want to perform some required set of actions before my extension window is closed(by clicking on the cross button on top right corner).
    Does In-design throws any event for it? Or can we capture it using C++ plugin in some way?

    Naah.......haven't got any event for that yet.
    Although, since HTML extensions are using chromium browser,  as a workaround, u can attach listener to HTML onClose event, but it won't solve any purpose if you
    are looking to logout session or do some business login in your code.

Maybe you are looking for

  • TDS not calculating at the time of advance payment to vendor

    hello gurus, need urgent help , TDS not calculating for advance payment made to vendor, checked configuration in detail. payment WT type is marked as central invoicing prop.all other config is o.k. regards, Anand

  • Can Quick Look but not open a PowerPoint file

    Someone sent me a power point file, and I can open it in Quick Look both in Apple Mail and in the Finder. However, Quick Look doesn't allow me to enlarge it big enough to make out the details or to print it. Text Edit won't open it. When I try to dou

  • How to give the calculation in Finacial report templates asper indian local

    Dear experts help me, how to give calculation in Financail report Templates in SAP b1 for calculating  Gross profit and Netprofit seperately.  I am facing some error while giving formula in financial report templates. Thanks Regards

  • Based on some conditions table rows should be of different color

    Hi Experts, I have created one WD application which calls RFC. The displayed result is Trip No    Date                 Status 1             01-jan-2009     Approved 2             05-jan-2009     Rejected 3             09-jan-2009     Cancelled I want

  • Best Workflow to Add Footage to Existing H.264 files?

    I have some ready-made clips for the Internet already spec'd to H.264 at about 640x480. The audio is AAC. I would like to add bumpers to the beginning and end of these clips. Would you simply import them into FCP, make a 640x480 timeline add the bump