Invalid HTTP session

In my web application, I use session object to carry variables cross pages. After the data is no longer need, I call
          session.invalidate();
          session = request.getSession(true);
          to invalid the old session and open a new one.
          The problem here is that oftenly, I will get a error saying:
          java.lang.IllegalStateException: HttpSession is invalid
          It happens when I am trying to set or get certain Attribute from the session object. I cannot find out what the problem here is. Any help will be greatly appreciated!
          By the way, I am using WebLogic 8.1 with service pack 2.
          

session.invalidate() does not remove the actual session; It just marks it as
          invalid.
          So, you should remove all attributes from the session and keep using the
          same session again (instead of creating a new one).
          for(Enumeration enum = session.getAttributeNames() ; enum.hasNext() ; )
          session.removeAttribute((String)enum.next()) ;
          Eventhough, it is a little expensive in performance, it will work for sure
          Thanks,
          Selva-
          "Clare" <[email protected]> wrote in message
          news:3f8ca9e8$[email protected]..
          > In my web application, I use session object to carry variables cross
          pages. After the data is no longer need, I call
          > session.invalidate();
          > session = request.getSession(true);
          > to invalid the old session and open a new one.
          > The problem here is that oftenly, I will get a error saying:
          >
          > java.lang.IllegalStateException: HttpSession is invalid
          >
          > It happens when I am trying to set or get certain Attribute from the
          session object. I cannot find out what the problem here is. Any help will be
          greatly appreciated!
          >
          > By the way, I am using WebLogic 8.1 with service pack 2.
          

Similar Messages

  • Authentication Fault: Invalid User Session Token

    Hi,
    I am trying to protect a call to third party webservices using OWSM and OAM. I followed the steps mentioned in Oracle Web Services Manager
    Deployment Guide to integrate OAM in OWSM, but not able to make any break through. I am getting following error if I test my web service using OWSM's inbuilt test tool:
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode
    xmlns:p="http://schemas.oblix.com/ws/2003/08/Faults">p:Client.AuthorizationFault</faultcode>
    <faultstring>Authentication Fault: Invalid User Session Token</faultstring>
    null</SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    In gateway.log file, I get following oneliner message:
    security.SimpleXMLCredsExtractor - SimpleXMLCredsExtractor failed to Extract creds.
    I am using standalone OWSM installation.
    Installed OAM SDK on the same machine of OWSM.
    Added OAM SDK libraries into OWSM's path.
    Please advise as I have already wasted 3-4 weeks into it.
    .. Paresh
    Edited by: user10301925 on Sep 29, 2009 2:24 AM
    Edited by: user10301925 on Sep 29, 2009 2:24 AM

    Hi,
    Yes, I have registered the service in OWSM and calling that service through OWSM testing tool only...
    Following is the request message:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    - <soap:Header>
    - <wsse:Security env:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    - <wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:Username>owsmuser</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">welcome11</wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    - <soap:Body xmlns:ns1="http://service/">
    <ns1:getDateTime />
    </soap:Body>
    </soap:Envelope>
    Please advise.
    .. Paresh

  • ECC-- SAP PI-- Successfactor Integration: Invalid SFAPI session

    Hello Experts,
       I am working on  EmployeeData Synchronization interface the content of which is predelivered from SAP.
    I configured the interface and while testing
    as first step I was able to retrieve the session ID from Successfactor,
    but using the session ID retrieved from Successfactor cloud application when I am trying to upsert data in the second step  I am getting an error "Invalid SFAPI session".
    How can I overcome this error?
    I have done my research on the SDN and went through the blogs but for not much use.
    I am sure about the content and the version being used by me as the correct one.
    Has anybody seen this error and if yes how did you overcome the same?
    Please let me know.
    One point that I have to make is that since I was able to retrieve the session ID I did not install the certificates from Successfactors.
    Is installing the certificates mandatory and if yes which step is this being referred?
    Any help is really appreciated.
    Anu Patyath

    First of all, you should get it running with SOAP UI:
    Please make sure, you got those steps right behind each other:
    login
    upsert
    logout
    The important step is to set "Main HTTP session":
    You can use the payloads for login, upsert and logout as they are generated by SOAP UI when importing the WSDL.
    e.g. upsert:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:sfobject.sfapi.successfactors.com">
       <soap:Header/>
       <soap:Body>
          <urn:upsert>
           <urn:type>User</urn:type>
           <!--1 or more repetitions:-->
           <urn:sfobject>
           <urn:upsert>
           <urn:type>User</urn:type>
           <!--1 or more repetitions:-->
           <urn:sfobject>
                <urn:type>User</urn:type>
                <urn:type>User</urn:type>
                <urn:status>active</urn:status>
                <urn:externalId>testuser</urn:externalId>
                <urn:username>testuser</urn:username>
           </urn:sfobject>
         <urn:processingParam>
              <urn:name>sendWelcomeMail</urn:name>
              <urn:value>true</urn:value>
         </urn:processingParam>
         </urn:upsert>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

  • HTTP Sessions tracking using in-memory session replication

              I am using wls5.1. I have a situation where the "Java Heap size
              used" exceeds 100%, then it drops down to maybe 20% (after garbage
              collection). What happens to the active Http sessions when using
              in-memory session replication with persistance set to false.
              Are the sessions written to disk? If so, where?
              Are the sessions, before the garbage collection, still active?
              

    Also looks like either your session invalidation time is too high or your
              heap size is too small. Make sure you tune either of this paramater
              properly.
              Viresh Garg
              Principal Developer Relations Engineer
              BEA Systems
              Prasad Peddada wrote:
              > Replicated session data is never written to disk. I dont' understand
              > your second questions. If the session is active and if GC kicks in it
              > won't delete the object since the servlet engine has reference to that
              > session object.
              >
              > Make sure you never swap and your application has enough heap.
              >
              > -- Prasad
              >
              > chris mckinnon wrote:
              >
              > > I am using wls5.1. I have a situation where the "Java Heap size
              > > used" exceeds 100%, then it drops down to maybe 20% (after garbage
              > > collection). What happens to the active Http sessions when using
              > > in-memory session replication with persistance set to false.
              > > Are the sessions written to disk? If so, where?
              > > Are the sessions, before the garbage collection, still active?
              >
              > --
              > Cheers
              >
              > - Prasad
              

  • Invalid Kiosk session configuration...

    Guys,
    I have a Solaris-based SRSS 4.2 installation. I have Global Kiosk set to connect to VMware View server (and it works fine).
    I have certain people that need to connect to their Linux desktops. So I created another Kiosk configuration using the Kiosk Mode Generic Session (http://wiki.sun-rays.org/index.php/SRSS_Addon:_Kiosk_Mode_Generic_Session)
    My generic.conf looks like this:
    KIOSK_SESSION_EXEC=$KIOSK_SESSION_DIR/generic-session
    KIOSK_SESSION_LABEL="SGD"
    KIOSK_SESSION_DESCRIPTION="Provides an SGD X session for running a Kiosk script."
    KIOSK_SESSION_ARGS="/usr/bin/firefox http://sgdserver/sgd"
    KIOSK_SESSION_PROTOTYPE=generic-session
    I have then ran these commands to import the configuration and assign it to certain users:
    # utkiosk -i SGD -f generic.conf
    # utkiosk –l
    SGD
    session
    Now assign the SGD configuration to users’ token:
    # utkioskoverride -r Payflex.xxxxxxx -s kiosk -c SGD
    Here’s the kick… If I set Global Kiosk to SGD, it works fine and brings up SGD login page as it is supposed to.
    If I set Global Kiosk back to View and try to use a smartcard to bring up SGD for the particular user, I get:
    Login Incorrect, please try again
    then an error stating:
    Error starting Kiosk session: Invalid Kiosk session configuration
    In the logs I see this:
    kiosk:initsession[14382]: [ID 702911 user.error] Error: $KIOSK_SESSION not specified
    Jan 12 15:30:55 dsys-vfrb-sray1 kiosk:initsession[14383]: [ID 702911 user.error] Error: failed to load Session Descriptor
    Jan 12 15:30:55 dsys-vfrb-sray1 dtlogin[14250]: [ID 705508 user.error] pam_kiosk: pam_sm_open_session: Child process /opt/SUNWkio/lib/initsession failed with exit code 1.
    Any ideas? It works fine in my Lab, but at a customer site, it does not work!
    Thank you in advance for your help!

    Vitaly91 wrote:
    I have a Solaris-based SRSS 4.2 installation. I have Global Kiosk set to connect to VMware View server (and it works fine).
    I created another Kiosk configuration using the Kiosk Mode Generic Session (http://wiki.sun-rays.org/index.php/SRSS_Addon:_Kiosk_Mode_Generic_Session)
    My generic.conf looks like this:
    KIOSK_SESSION_EXEC=$KIOSK_SESSION_DIR/generic-session
    KIOSK_SESSION_LABEL="SGD"
    KIOSK_SESSION_DESCRIPTION="Provides an SGD X session for running a Kiosk script."
    KIOSK_SESSION_ARGS="/usr/bin/firefox http://sgdserver/sgd"
    KIOSK_SESSION_PROTOTYPE=generic-session
    I have then ran these commands to import the configuration and assign it to certain users:
    # utkiosk -i SGD -f generic.confUnfortunately Kiosk has two kinds of *.conf files: session descriptors (see the kiosk(5) man page) and session configurations (see the session.conf(4) man page). And these types are rather similar - some settings can be in the descriptor as default, but also in the session configuration. The generic.conf you have is a session descriptor. Those must be stored into /etc/opt/SUNWkio/sessions/. But for import into utkiosk you need a session configuration. Probably utkiosk should do more validation of the configuration you are importing to protect against this confusion.
    The generic session is intended for configuring any command to be executed from the admin UI. If you know your command and need a prototype, you should go the extra step and make a specific session. Here is how:
    Rename your file to /etc/opt/SUNWkio/sessions/SGD.conf and change it to be:
    KIOSK_SESSION_EXEC=/usr/bin/firefox
    KIOSK_SESSION_LABEL=SGD
    KIOSK_SESSION_DESCRIPTION=Provides an SGD X session for running a Kiosk script.
    KIOSK_SESSION_PROTOTYPE=SGDAlso rename your /etc/opt/SUNWkio/prototypes/generic-session directory to /etc/opt/SUNWkio/prototypes/SGD, as per the last line above.
    You can leave the KIOSK_SESSIONS_ARGS line in the file, if you wish, but it will just be a default, so I'll show how to set the arguments via utkiosk.
    To verify that you have set up the descriptor correctly, use
    /opt/SUNWkio/bin/kioskdesc print SGD Now create your session configuration:
    # utkiosk -i SGD <<!
    KIOSK_SESSION=SGD
    KIOSK_SESSION_ARGS=http://sgdserver/sgd
    ! Of course you can also put these two lines into a file and use it with the -f argument to utkiosk.

  • Invalid Portal Session

    While browsing through the forums, I got the message below :
    Invalid Portal Session*
    An error was encountered while processing your Portal request, because your portal session is no longer valid. You have been logged out and you will automatically be redirected to the OracleAS Portal home page in 30 seconds. Click OracleAS Portal home page to go directly to the OracleAS Portal home page, or if your browser does not automatically redirect you. If you continue to have problems while accessing OracleAS Portal, close all your browser instances and try again.
    Nicolas.

    user11945767 wrote:
    Hello,
    In our case, I have tried Opera, Safari, Chrome and Mozilla browsers and none of them show 'Invalid Portal Session' error. It only occurs with Microsoft Internet Explorer. And this happens consistently with IE. Not a single time it succeeds unless F5/Refresh is hit.
    What could be the reason for this and how can it be resolved. We are running Oracle 10.1.2 AS.
    Thanks.Nicolas asked the question about the Oracle Forums. Since this is a Forums Community issue, he correctly asked it in the "Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)" Forums area.
    You seem to be asking the question about the Oracle Application Server Portal product. Even though it appears your question and Nicolas' may be related, you are probably asking the question in the wrong area.
    Your question is likely better asked
    1) of Support (by opening a service request) and/or
    2) asking in http://forums.oracle.com/forums/category.jspa?categoryID=193 and/or
    3) asking in http://forums.oracle.com/forums/category.jspa?categoryID=196

  • IMAQdx: Invalid camera session

    I want to use GigE camera on LabVIEW2011.
    I have already installed Vision Acquisition software (ver Aug 2012) and got image on NI MAX.
    But on LabVIEW2011, I could not get image. Error was occured as follows.
    Error code 1074360315 was occured
    on IMAQdx Get Image.vi
    NI-IMAQdx: (HEX 0xBFF69004) Invalid camera session
    Please help me.

    Hi wmaker,
    For your information, this is japanese discussion forum, it might be useful for you to use English boards like here;
     Machine Vision Board.
    http://forums.ni.com/t5/Machine-Vision/bd-p/200

  • How to close a HTTP session when a user closes the window

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template and this was implimented on the Menu page, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly.
    If user navigates to the other pages from the main page... then the logoff function was not implimented in the other pages. So many of the users are closing the windows directly. Eevn if we impliment logoff in all the subpages, As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    Regards,
    Tony

    Hi,
    And also take a look on the Genral property of the web template. We solved this problem by changing only this property (no extra things).
    <b>Property:                            Value</b>
    Automatic Session Management:           Active
    With rgds,
    Anil Kumar Sharma .P
    Message was edited by: Anil Kumar Sharma

  • Bw web report plugin http session hangs at the server side

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly. But As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    By the way, we actived our BEX service at the SICF.
    Thanks for help!
    JA

    Hi
    If you want to avoid a blank page with logoff button, add opener=0
    <a href="<SAP_BW_URL CMD='LOG_OFF' ~command='logoff'
    >" onClick="javascript:window.close(opener=0);">Log off</a>
    If you want to close the session via X, use this code:
    create a sapscript function
    function closeSession()
    logoff()
    window.unload=CloseSession()
    However, the Plugin HTTP session isn't killed.
    Regards

  • In-memory replication of http session is not working in BEA7 cluster

              Hi everyone,
              I have 3 managed servers in Bea7.0 SP4 in a cluster. The client requests are sent
              through apache web server. I have given cluster address as URL in httpd.conf of
              apache server which sends the client requests for dynamic pages such as JSPs and
              servlets to the weblogic cluster.
              Load balancing is working fine. I ensured this from the log files of all the 3
              servers. All the 3 servers are getting different client requests and thus load
              balancing is working.
              Now, I wanted to achieve Fail-over. I do not think that i should use proxy plug-in
              for this. I feel the cluster itself will handle fail-over provided i make the
              http session as memory replicated.
              I updated the weblogic.xml with the following entry :
              <session-descriptor>
              <param-name>PersistentStoreType</param-name>
              <param-value>replicated</param-value>
              </session-param>
              </session-descriptor>
              I guess this is sufficient to make the http session as cluster aware.
              But when I shutdown server1, the user connected to server1 will be kicked out
              of the session and come to login page through server2 or server3 which are running
              fine.
              Could anyone help me to achieve http session as cluster aware. Does it indicate
              that I have to go for WLS proxy – HttpClusterServlet to achieve fail over for
              http session ?
              BTW, for your info, i am using setAttribute() and getAttribute() while manipulating
              the session.
              thanks in advance.
              

              Hi Ryan,
              Thanks for ur valuable input.
              I can see failover working.
              But, I can not continue with the same session in my application.
              I printed session Ids before and after failover, I found both are different.
              I guess session replication is a responsibility of weblogic/apache plugin.
              If not please let me know which all settings I should do to make failover working?
              Thanks again.
              Plad
              "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >Plad,
              >
              >Are you trying to gracefully shut down the server? If you are then the
              >problem that you say you can't identify is simply the server's default
              >behavior which is to wait for all non-replicated sessions to be dropped
              >or
              >timed out before killing the process. Try forcing the shutdown: kill
              >-9 the
              >PID or CTRL-C if you started the server from the command line. You can
              >also
              >check the ``Ignore Sessions During Shutdown" checkbox under the server's
              >control tab in the admin console, this should allow you to shut down
              >gracefully without waiting for session timeout. BTW your sequence is
              >off
              >in #5 below, the replication doesn't occur upon failure, the replication
              >has
              >already happened once you created the session object on the first server,
              >I
              >think maybe you're confusing replication with failover.
              >
              >~RU
              >
              >"Plad" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi,
              >> I have 2 managed servers in a cluster.
              >>
              >> 1. I have got a DNS name configured which maps to these 2 managed server's
              >IP
              >> addresses.
              >> 2. I can browse my site using this DNS name.
              >> In HTTPD.conf I have :
              >>
              >> ServerName dev.a.b.net
              >>
              >> <IfModule mod_weblogic.c>
              >> WebLogicCluster 10.1.38.232:7023,10.1.34.51:7023
              >> MatchExpression *.*
              >> </IfModule>
              >>
              >> LoadModule weblogic_module modules/mod_wl_20.so
              >>
              >> 3. I have adeded session descriptor in weblogic.xml , also enabled
              >proxy
              >plugin
              >> in weblogic console.
              >>
              >> 4. I tested accessing my application using DNS url after shutting down
              >alternatively
              >> each manaed server. I can access application.
              >>
              >> 5. Now, problem comes when I access a managed server1 , keeping server2
              >down.
              >> I am able to access my application.
              >> Now, I start the server2.
              >> (Here I am supposing that replication should occur)
              >> Then I am shutting down server1.
              >> But, this time the server log shows me following:
              >>
              >>
              >> 9:58:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 2 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >> 10:00:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 4 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >>
              >> I am unable to make out where the problem is?
              >> Can it be a problem of Liecense? Is there any specialcluster liecense
              >for
              >weblogic8?
              >>
              >> Hoping to get replies.
              >> Thanx.
              >> Plad
              >>
              >> "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >> >See my reply to your first post, but I've also added a few comments
              >here.
              >> >
              >> >"jyothi" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> I guess someone from bea support team only can answer both your
              >question
              >> >and mine.
              >> >> As per my knowledge, we do not need to do any setup at Apache
              >side
              >> >regarding
              >> >> cluster other than mentioning cluster address as URL while
              >contacting
              >> >WLS
              >> >> from apache.
              >> >>
              >> >> I hope someone from Bea, will help us. I do not think that we
              >> >go for
              >> >WLS
              >> >> proxy plug-in using HttpClusterServlet for making session replication.
              >> > I
              >> >strongly
              >> >> feel that the cluster itself be able to manage the fail-over of
              >> >http
              >> >sessions
              >> >> provided we put the entry "PersistentStoreType" in weblogic.xml
              >> >regarding
              >> >> the session replication.
              >> >>
              >> >
              >> >The cluster does handle the management of Sessions. The clustered
              >> >applications still create the Session objects and the cluster manages
              >> >them
              >> >as per your deployment descriptor settings (replicated, JDBC, File)
              >however
              >> >the proxy has to be aware of which server the client has an affinity
              >> >for
              >> >(only with replicated sessions) and it does that by reading a cookie
              >> >passed
              >> >back from the server that handled the initial request and created
              >the
              >> >primary session object. The proxy has a list of both the primary
              >and
              >> >secondary server locations from this cookie that it can use to failover
              >> >the
              >> >request if the primary server fails. Clusters _DO NOT_ failover nor
              >> >do they
              >> >load balance, that's the job of your proxy, whether you're using the
              >> >HTTPClusterServlet, WLS Plug-in or a more sophisticated hardware load
              >> >balancer like Big IPs F5
              >> >
              >> >> jyothi
              >> >>
              >> >
              >> >~RU
              >> >
              >> >
              >>
              >
              >
              

  • How can we cleanup invalidated archive sessions  (remove from UNIX)

    Over the years, we have accumulated many invalidated archive session files in our archive directory in UNIX.  We would love to remove these invalidated session files to free up space. 
    We have been looking at BC_ARCHIVE ... but the documentation on it only mentions the archive of logs  ... not the cleanup of invalid session files that need to be deleted
    Can we just delete the files of sessions that are invalid?  Or must we perform some function in SAP to delete them?  SAP ... can you document the process for this?

    Hi,
    You can simply delete the archive files at unix level thats all. No need to do anything else in SAP.
    Cheers!
    Samanjay

  • How to find the list of users loggin through HTTP session

    Hi All,
    we are using SRM 5.5 system with ITS. I am able to find the list of concurrent users from ABAP level using report "CCUEVAL" but how do I know the list of concurrent users logged in from HTTP session?.
    could you please let us know the SAP note number or any report?
    Thanks in advance,
    Mohan Karri

    Hi Uday,
    thank you very much for your prompt response.
    I need a report because by end of every month I would need the average peak http users list for the reporting month.
    or tell me how to find " how many users logged in through HTTP session in a day?"
    Thanks
    Mohan

  • Failed to load resource: the server responded with a status of 405 (Method Not Allowed) XMLHttpRequest cannot load (WCF service URL). Invalid HTTP status code 405

    Hi,
    while consuming the  WCF service POST method Jquery, getting error in Chrome and firefox, in IE  Its working fine.
    ERROR:Failed to load resource: the server responded with a status of 405 (Method Not Allowed)  XMLHttpRequest cannot load (WCF service URL). Invalid HTTP status code 405.
    Jquery used to call:
    $.support.cors = true
            $.ajax({
                type: "POST",
                url: serviceURL,
                data: JSON.stringify(managedProps),
                useDefaultXhrHeader:false,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                //processData: true,
                crossDomain: true,
                success: function (data, status, jqXHR) {
                   alert("sucess");
                error: function (xhr) {
                    alert("error");
    WCF sevice Web.config
    <webHttpBinding>
            <!--<binding name="webHttpBindingWithJsonP" transferMode="StreamedRequest" />-->
            <binding name="crossDomain" crossDomainScriptAccessEnabled="true" transferMode="StreamedResponse" />
          </webHttpBinding>
        </bindings>
        <services>
          <service name="DynamicRefinerWCF.DynamicRefiner">
            <endpoint address="" behaviorConfiguration="REST" bindingConfiguration="crossDomain" binding="webHttpBinding" contract="DynamicRefinerWCF.IDynamicRefiner" />
            <endpoint address="mex" binding="mexHttpBinding" contract="DynamicRefinerWCF.IDynamicRefiner" />
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost/example.svc" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <!--<protocolMapping>
            <add binding="basicHttpsBinding" scheme="https" />
        </protocolMapping>-->    
        <!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />-->
      </system.serviceModel>
      <system.webServer>
        <!--<modules runAllManagedModulesForAllRequests="true"/>-->
        <modules>
          <remove name="WebDAVModule" />
        </modules>
        <handlers>
          <remove name="WebDAV" />
        </handlers>
        <directoryBrowse enabled="true" />
        <httpProtocol>
          <customHeaders>
            <add name="Access-Control-Allow-Origin" value="*"/>
            <add name="Access-Control-Allow-Headers" value="Content-Type"/>
            <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS"/>
            <add name="Access-Control-Request-Headers:" value="*" />
            <add name="Access-Control-Request-Method:" value="*" />
          </customHeaders>
        </httpProtocol>
        <!--
            To browse web app root directory during debugging, set the value below to true.
            Set to false before deployment to avoid disclosing web app folder information.
          -->
        <!--<directoryBrowse enabled="true"/>-->
      </system.webServer>
    </configuration>
    Thanks,
    Swathi

    Right on - I have done that a number of times.

  • How to get HTTP session in Applcation Module IMPL file

    Hi Guys,
    Can any one tell me how to get HTTP session in Applcation Module IMPL file ?
    thnks

    You can, but that's not a best practice.
    Re: How to reach HttpContext from model Project

  • Define HTTP Session Attribute in a Custom Authenticator

    Hello everyone I developed sucessefully a Custom Authenticator for WLS10 that interacts with a web service.
    But now I need to provide an object to the web applications with the some user information.
    I was wondering defining the object in the HTTP Session but I dont know how to do it via de LoginModule of the custom authenticator.
    Can anyone provide me some tips?
    thanks in advance.

    What kind of user information do you need to pass on to the webapplication ? username can be retrieved by request.getRemoteUser() (after successful login).
    May be you need to clarify little bit more on what you want to achieve.
    -Utpal

Maybe you are looking for