Cant do a file get from external server using file sender adapter with ftp

Hi all,
Up until now our company has only used the file sender adapter with ftp protocol to get a file from our XI server for processing and input the file into an integration process
I have a requirement to do an ftp file get from an external server
From our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...).  So all firewall issues and communications are fine
Unfortunately I cannot currently pull files from the external server using the XI file adapter with ftp protocol from the XI development server AWB017
FTP Connection Parameters: External server name using port 21, Data Connection is Passive, No security, I supply a userid and password
Processing Parameters: Processing Mode is Archive (I tried test but this did not work either)
No messages appear in the RWB
Is there something else that I need to set up in order for the external ftp get to work via the XI file adapter?
Regards,
Mike

Thanks for your responses.
I have found the error messages in the File Adapter Monitor
Scenario 1
When I prefix the source directory with a forward slash, eg <b>/Folder/Subfolder</b> the error message is as follows
<b>EST: Error: Error connecting to ftp server 'ip address': FTPEx: /Folder/Subfolder: The system cannot find the path specified</b>
Scenario 2
When I DO NOT prefix the source directory with a forward slash, eg <b>Folder/Subfolder</b> a different error message is returned
<b>Error: Retrieving file 'FILENAME.XML' failed unexpectedly: FTPEx: Folder/Subfolder: The system cannot find the path specified</b>
At least in this scenario the adapter has been able to identify the file on the external FTP site but cannot retrieve it
Questions
I thought that the backslash prefix for the source directory was mandatory but I am receiving an error in each scenario
I receive the same error message whether the Processing Mode is 'Archive' or 'Test'
The logs on the external ftp server seem to indicate that I am simply connecting, sending username and password then quiting straight away. I am not issuing any commands that they can see
I thought that being a Sender adapter it would inherently execute a Pull or Get command
To recap, from our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...). So all firewall issues, communications, userid and password are fine
Has anyone experienced these issues?
Please advise on next course of action?
Regards,
Mike

Similar Messages

  • File Sender Adapter with FTP protocol

    Hi,
    I implementet a file sender adapter with FTP protocol. There is a problem: the sender processes the files even if they're in use by another application.
    I.E. If another application put files (via ftp) in the sender work directory (that is on ftp), the sender processes those files before their transfer is completed.
    I don't want that this sender in a communication channel in PI 7.1, imports files in the system when they aren't completed yet.
    There are some ways to block sender before it processes incompleted files (in an ftp)?
    Thanks
    Matteo

    Hi,
    File sender adapter provides a check for NFS mode
    +Check this
    To specify additional parameters in the adapter configuration, set the Advanced Modeindicator.
    ●      Msecs to Wait Before Modification Check
    Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.
    This parameter is not available if you have selected File Content Conversion as the Message Protocoland then made an entry under Recordsets per Message that splits an input file into several messages.
    This parameter is applicable only for the File adapter. If you enter a value in this field when configuring the sender FTP adapter, it will have no effect.+
    Other approach can be to apply OS level checks
    Regards
    Suraj

  • Any issues pulling files from external partners using PI File adapter?

    I would like to know if there are any issues with pulling files directly from external partners using PI File adapter.
    We are estimating 60 communication channels to pull files from the external vendors (25 vendors). Polling for these communication channels will be done for every 5 minutes. We have a load of around 500 files per day with peak size as 50MB and average file size as 2MB. We are currently using PI 7.0 SP12.
    Did any one face any problems with respect to performance or any other issues?

    The volume as described would be handled with no issues.
    Memory tuning and threads tuning may be required - see this guide:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016a0b1-1780-2b10-97bd-be3ac62214c7?quicklink=index&overridelayout=true

  • I still have problems with getting my website online. I have defined my server. Then I did the test and there was a connection via FTP. I put my files on the external server and there is a connection with the external server. But when I check to see my we

    I still have problems with getting my website online. I have defined my server. Then I did the test and there was a connection via FTP. I put my files on the external server and there is a connection with the external server. But when I check to see my website online (with Firefox, Explorer, Chrome browser) I always get the message 'Forbidden, You don't have permission to access / on this server.' Can somebody help me please? I have to get my website online..Thank you!

    Hello Els,
    it's well known, that in all these cases you describe I'm not a friend of a detailed Troubleshooting (I see Nancy#s smile already).
    To be able to be independent in all this things It is one of the reasons why I prefer an external FTP program. The difficulties with which you have to fight encourage me in this opinion, not least because we always search for experts, we don't charge a "jack of all trades".
    To manage several websites or to upload my files and sometimes for the opposite way, for a necessary download from my server or to use a "a site-wide synch", I'm using FileZilla. It simply looks easier for me to keep track of all operations precisely and generate or reflect easily the desired tree structure.
    Above all, FileZilla has a feature (translation from my German FileZilla) called "compare file list". Here it's possible to use file size or modification time as a criterion. There is also the possibility to "hide identical files", so that only these files which you want to redact remain visible.
    And even if it means you have to install a new program, I am convinced that there is an advantage. Here is the link to get it and where you can read informations about how it works:
    http://filezilla-project.org/ and http://wiki.filezilla-project.org/Tutorial#Using_the_site_manager
    Mac: Mac OS X (Use: Show additional download options)
    http://filezilla-project.org/download.php
    Of course, you also need all the access data to reach your server and for MIME issues, you should contact your web host/provider.
    Good luck!
    Hans-Günter
    P.S.
    Since I use two screens, the whole thing became even more comfortable.

  • Get the connected users count from sql server using powershell

    Hi,
    I am working on SharePoint 2013,I am having SQL server 2012.
    I want to get the Connected Users count from  sql server using power shell.
    Can any one please let me know how to implement.
    Thanks in advance.
    Regards,
    Phani Kumar R

    Sorry Tom, I dont like to hear "There is no way" :-(
    There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
    Now we (or better the architect of their system) should think of the way :-)
    Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
    once something look in the right way.
    * A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
    the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
    include the application and session events. for example using the method Session_Start
    protected void Session_Start(object sender, EventArgs e) {
    // Code that runs when a new session is started
    * IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
    database and get the information we need.
    * any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
    side.
    * SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
    in several solution without using a trigger as well)
    *** (I'll be brief ... I'm getting bored... probably the reader feel the same)
    * using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
    blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
    .... and i can continue for several days more :-) ...
    "If there is a willing, then there's a way"
    "If you can't do it, Then someone else probably can"
    "Never say never"
    I hope this help somehow :-)
    [Personal Site] [Blog] [Facebook]

  • How to have a live feed from application server log file (realtime viewr )

    how to have a live feed from application server log file (realtime viewr for apps log files)
    hi , thank you for reading my post.
    is there any way to have a live feed of Application server log ?
    for example is there any application that can watch the log file and show the changes as new log items come in ?
    can some one with more experience help ?

    Your question would be more suited to the Developer Forums
    http://devforums.apple.com
    but anyway...
    My goal is to develop a web application that is able to run on iPhone too, to capture the audio and video content from its camera and mic.
    Web Apps running in Safari don't have access to the camera or mic hardware.
    Or I should built a native application distributed through Apple store?
    That is your only option, although such a system already exists:
    http://itunes.apple.com/us/app/ustream-live-broadcaster/id319362690?mt=8

  • Using flash to display images from sql server or file system

    hello,
    what methods and parameters of the urlloader class we have to use to display images in a flash player if possible..
    also movie should update everytime a new image is added to a database or file
    the images can either be in a file system or in a sql database (if possible)
    does flash comes with an object of this type or we have to create it.
    regards,

    i responded to your duplicate message 4 days ago:
    is it possible to insert and retrieve images from sql server using actionscript.
    you'll need server-side script to query your database and you can use the flash urlloader class to call your script.
    also  is it possible to create a flash scrolling gallery based on images  stored in a database and everytime an image is added it is displayed in  the gallery.
    load the data using the urlloader class and  then load the images.  periodically query the database for new images if  there's no direct way for flash to know a new image was added.

  • 11g issue in handling file datastore from different server

    Hi All,
    In ODI 11g we have standalone agent as well as weblogic server agent. In our case master/workrep and weblogic server agent is installed in one of the linux server Say (A).
    We have a scenario to pick the file from one of the different linux box SAY (B). We have child agent running on that box and it is associated with the main weblogic agent under load balancing.
    While setting the topology information for file datastore it just need the driver name and path. At run time how odi will pick the respective file from that server
    Eg:File in location: /app/soa/uo1/testfile/test.txt(B)
    File path:/app/soa/uo1/testfile/test.txt(B)
    ODI Client will start the execution using the Server A weblogic agent. How ODI will route the control to child agent and try to find the file in ServerB and not in server A.
    in my case it is going to server A and saying file doesnot exist......
    Is it really possible to assign the proper server detail, so that we can make sure that execution will happen properly. I am not sure about the weblogic agent and how it control the execution. I think in my case its weblogic agent which is trying to look for the file in server A, where it is installed and thus failing.
    Control is not passing to the proper child agent as expected?
    Any idea?

    There is a difference in your understanding of the load balancing and the way it is implemented in ODI agents.
    In your case, the weblogic agent exists on Server A and hence it expects that the file also be visible to the agent and be local to server A.
    Load balancing comes into picture when there are too many connections for Agent A and it shares its load with other agents. This logic of passing control is within the agent and when file systems come into picture, the filesystem should be visible to all the agents.
    There is no concept of parent-child agents. The agents are simply load-share agents.
    So, Load balancing is not going to give you what you want.
    In your case, you should execute the job using Agent on server B so that appropriate filesystem can be accessed.

  • Reading File from Application Server using Read Dataset

    Hi,
    i am trying to read excel file from Application Server and has multiple records in that based on structure below. but when i execute its giving me error message.here is the code, can sumone suggest me on this please ??
    FORM f_data_upload .
      DATA:
         l_filename TYPE string,   "file name
         l_wa_string TYPE string.  "file record
        l_filename = p_inp_as. "File path from Application Server
        OPEN DATASET l_filename FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        DO.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
    Read the data from the file in Application server.
          READ DATASET l_filename INTO l_wa_string.
          IF sy-subrc = 0.
            SPLIT l_wa_string AT cl_abap_char_utilities=>horizontal_tab
                  INTO w_data-tcode
                       w_data-matnr
                       w_data-mtart
                       w_data-werks
                       w_data-vkorg
                       w_data-vtweg
                       w_data-lgort
                       w_data-meins
                       w_data-maktx
                       w_data-spart
                       w_data-kosch
                       w_data-mstae
                       w_data-brgew
                       w_data-ntgew
                       w_data-groes
                       w_data-matkl
                       w_data-prdha
                       w_data-mstde
                       w_data-mtpos_mara
                       w_data-gewei
                       w_data-spart
                       w_data-mstav
                       w_data-mstdv
                       w_data-dwerk
                       w_data-taxkm
                       w_data-versg
                       w_data-kondm
                       w_data-ktgrm
                       w_data-mtpos
                       w_data-mtvfp
                       w_data-tragr
                       w_data-ladgr
                       w_data-herkl
                       w_data-ekgrp
                       w_data-webaz
                       w_data-dismm
                       w_data-beskz
                       w_data-prctr
                       w_data-bklas
                       w_data-bwtty
                       w_data-vprsv
                       w_data-verpr
                   IN CHARACTER MODE.
            APPEND w_data TO i_data.
            CLEAR w_data.
           ENDIF.
        ENDDO.
        CLOSE DATASET l_filename.
    Error Message while executing
    What happened?
        At the conversion of a text from codepage '4110' to codepage '4102':
        - a character was found that cannot be displayed in one of the two
        codepages;
        - or it was detected that this conversion is not supported
        The running ABAP program 'ZHDI_LOMM_VEHI_MAT_MASS_CREATE' had to be terminated
         as the conversion
        would have produced incorrect data.
        The number of characters that could not be displayed (and therefore not
        be converted), is 449. If this number is 0, the second error case, as
        mentioned above, has occurred.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
         caught in
        procedure "F_DATA_UPLOAD" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        Characters are always displayed in only a certain codepage. Many
        codepages only define a limited set of characters. If a text from a
        codepage should be converted into another codepage, and if this text
        contains characters that are not defined in one of the two codepages, a
        conversion error occurs.
        Moreover, a conversion error can occur if one of the needed codepages
        '4110' or '4102' is not known to the system.
        If the conversion error occurred at read or write of  screen, the file
        name was '/usr/sap/interfaces/conversion/pioneer/ddm/data/test_data1.xls'.
         (further information about the file: "X 549
         24064rw-rw----200812232135082008122307293120081223072931")
    Please help me
    Thank You

    Woah ... perfect guru
    but data looks like all junk characters ? its filling with special characters, hashes # and other characters but not with Excel data.. any idea ??
    Temesh
    Edited by: New2Sap Abap on Dec 24, 2008 6:42 AM

  • Is it possible to load a dump file collected from sql server to orcle 10gR2

    Hi..
    As a part of data migration from legacy systems , we need to migrate only required tables from Sql server to Oracle 10gr2 .
    At present client is telling that he will give it as dump file.
    My question is , Is it possible to load the dump file collected from sql server to oracle 10gR2?
    Thanks in advance ..

    yes, it is.
    Using for example SQL Developer Migration Workbench even allows you to create unload scripts for the desired SQL Server tables and it also creates the DDL scripts for you to create the Oracle tables similar to the SQL Server table AND it alows creates the SQL*Loader scripts that allow you to load the SQL Server generated dump file into the Oracle db.
    Here the link:
    http://www.oracle.com/technology/tech/migration/workbench/index_sqldev_omwb.html
    If you do not want to use this utility, you can also use SQL*Loader to load the content of the SQL Server dump file into the Oracle database; but in this case you have to write the whole SQL*Loader control scripts on your own.
    Edited by: kgronau on Sep 16, 2009 1:54 PM

  • I need to select and upload a image and corresponding url from an external website using file upload control in MVC4. Please help

    I need to select and upload a image and corresponding  url from an external website using file upload control in MVC4.
    Please help
    Latheesh K Contact No:+91-9747369936

    This forum supports .NET Framework setup.
    As your issue appears to have nothing to do with .NET Framework setup, please ask in the MVC forums for best support.
    http://forums.asp.net/1146.aspx/1?MVC

  • How to download a file version from office 365 using csom

    I need to download an older file version from office 365 and get the data into a byte array. I have no trouble downloading the latest version with File.OpenBinaryStream() and I have no trouble loading the previous file versions with File.Versions. But now
    I need to actually download an older version of the file and it seems the only way is to use File.OpenBinaryDirect. So I am creating a client context using my oAuth access token and providing the correct path, but I am getting a (401) Unauthorized
    error. Looking with Fiddler I can see that the call to OpenBinaryDirect is somehow trying to post to my file URL and the server is responding with 401.
    context = TokenHelper.GetClientContextWithAccessToken(SPHostUrl, AccessToken);
    FileInformation info = File.OpenBinaryDirect(context, "/" + _fileVersion.Url);  //throws 401
    //leading slash required otherwise ArgumentOutOfRangeException
    I have to be able to access the older file versions with my c# code -- I don't have a viable app without that ability -- any help urgently needed and greatly appreciated!

    Thank you SO much (Can't wait for the next release)!
    For anyone else who lands here, here's the code I ended up using:
    // VersionAccessUser and VersionAccessPassword are stored in web.config
    // web.Url is loaded via the clientContext
    // myVersion is the FileVersion I got from the file's Versions.GetById() method
    // probably a lot of ways to get hostUrl, it just needs to be https://yourdomain.sharepoint.com/
    // - I'm running my app from a subweb
    // I had trouble following the links to get the full MsOnlineClaimsHelper code
    // (the one on msdn.com was missing RequestBodyWriter, WSTrustFeb2005ContractClient,
    // and IWSTrustFeb2005Contract
    // so I've included the code I used here.
    string myVersionFullUrl = string.Format("{0}/{1}", web.Url, myVersion.Url);
    string userName = WebConfigurationManager.AppSettings.Get("VersionAccessUser");
    string strPassword = WebConfigurationManager.AppSettings.Get("VersionAccessPassword");
    string hostUrl = Regex.Replace(web.Url, "([^/]+//[^/]+/).*", "$1");
    MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(hostUrl, userName, strPassword);
    var client = new WebClient();
    client.Headers["Accept"] = "/";
    client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    client.Headers.Add(HttpRequestHeader.Cookie, claimsHelper.CookieContainer.GetCookieHeader(new Uri(hostUrl)));
    var document = client.DownloadString(myVersionFullUrl);
    // These classes are needed to download old versions of files (see: http://social.msdn.microsoft.com/Forums/en-US/7746d857-d351-49cc-b2f0-496663239e02/how-to-download-a-file-version-from-office-365-using-csom?forum=sharepointdevelopment)
    // I cobbled this file from http://social.technet.microsoft.com/Forums/msonline/en-US/4e304493-7ddd-4721-8f46-cb7875078f8b/problem-logging-in-to-office-365-sharepoint-online-from-webole-hosted-in-the-cloud?forum=onlineservicessharepoint
    // and http://fredericloud.com/2011/01/11/connecting-to-sharepoint-with-claims-authentication/
    using Microsoft.IdentityModel.Protocols.WSTrust;
    using Microsoft.SharePoint.Client;
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Net.Security;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.Text;
    using System.Web;
    using System.Xml;
    using System.Xml.Linq;
    namespace DPSiDoxAppWeb.Helpers
    /// <summary>
    /// Create a new contract to use for issue claims for the SharePoint requests
    /// </summary>
    [ServiceContract]
    public interface IWSTrustFeb2005Contract
    [OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign,
    Action = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue",
    ReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue",
    AsyncPattern = true)]
    IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state);
    Message EndIssue(IAsyncResult asyncResult);
    /// <summary>
    /// Implement the client contract for the new type
    /// </summary>
    public class WSTrustFeb2005ContractClient : ClientBase<IWSTrustFeb2005Contract>, IWSTrustFeb2005Contract
    public WSTrustFeb2005ContractClient(Binding binding, EndpointAddress remoteAddress)
    : base(binding, remoteAddress)
    public IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state)
    return Channel.BeginIssue(request, callback, state);
    public Message EndIssue(IAsyncResult asyncResult)
    return Channel.EndIssue(asyncResult);
    /// <summary>
    /// Create a class that will serialize the token into the request
    /// </summary>
    class RequestBodyWriter : BodyWriter
    readonly WSTrustRequestSerializer _serializer;
    readonly RequestSecurityToken _rst;
    /// <summary>
    /// Constructs the Body Writer.
    /// </summary>
    /// <param name="serializer">Serializer to use for serializing the rst.</param>
    /// <param name="rst">The RequestSecurityToken object to be serialized to the outgoing Message.</param>
    public RequestBodyWriter(WSTrustRequestSerializer serializer, RequestSecurityToken rst)
    : base(false)
    if (serializer == null)
    throw new ArgumentNullException("serializer");
    _serializer = serializer;
    _rst = rst;
    /// <summary>
    /// Override of the base class method. Serializes the rst to the outgoing stream.
    /// </summary>
    /// <param name="writer">Writer to which the rst should be written.</param>
    protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
    _serializer.WriteXml(_rst, writer, new WSTrustSerializationContext());
    public class MsOnlineClaimsHelper
    #region Properties
    readonly string _username;
    readonly string _password;
    readonly bool _useRtfa;
    readonly Uri _host;
    CookieContainer _cachedCookieContainer = null;
    DateTime _expires = DateTime.MinValue;
    #endregion
    #region Constructors
    public MsOnlineClaimsHelper(string host, string username, string password)
    : this(new Uri(host), username, password)
    public MsOnlineClaimsHelper(Uri host, string username, string password)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = true;
    public MsOnlineClaimsHelper(Uri host, string username, string password, bool useRtfa)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = useRtfa;
    #endregion
    #region Constants
    public const string office365STS = "https://login.microsoftonline.com/extSTS.srf";
    public const string office365Login = "https://login.microsoftonline.com/login.srf";
    public const string office365Metadata = "https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml";
    public const string wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
    public const string wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
    private const string userAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
    #endregion
    class MsoCookies
    public string FedAuth { get; set; }
    public string rtFa { get; set; }
    public DateTime Expires { get; set; }
    public Uri Host { get; set; }
    // Method used to add cookies to CSOM
    public void clientContext_ExecutingWebRequest(object sender, WebRequestEventArgs e)
    e.WebRequestExecutor.WebRequest.CookieContainer = getCookieContainer();
    //e.WebRequestExecutor.WebRequest.UserAgent = userAgent;
    // Creates or loads cached cookie container
    CookieContainer getCookieContainer()
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    // Get the SAML tokens from SPO STS (via MSO STS) using fed auth passive approach
    MsoCookies cookies = getSamlToken();
    if (cookies != null && !string.IsNullOrEmpty(cookies.FedAuth))
    // Create cookie collection with the SAML token
    _expires = cookies.Expires;
    CookieContainer cc = new CookieContainer();
    // Set the FedAuth cookie
    Cookie samlAuth = new Cookie("FedAuth", cookies.FedAuth)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(samlAuth);
    if (_useRtfa)
    // Set the rtFA (sign-out) cookie, added march 2011
    Cookie rtFa = new Cookie("rtFA", cookies.rtFa)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(rtFa);
    _cachedCookieContainer = cc;
    return cc;
    return null;
    return _cachedCookieContainer;
    public CookieContainer CookieContainer
    get
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    return getCookieContainer();
    return _cachedCookieContainer;
    private MsoCookies getSamlToken()
    MsoCookies ret = new MsoCookies();
    try
    var sharepointSite = new
    Wctx = office365Login,
    Wreply = _host.GetLeftPart(UriPartial.Authority) + "/_forms/default.aspx?wa=wsignin1.0"
    //get token from STS
    string stsResponse = getResponse(office365STS, sharepointSite.Wreply);
    // parse the token response
    XDocument doc = XDocument.Parse(stsResponse);
    // get the security token
    var crypt = from result in doc.Descendants()
    where result.Name == XName.Get("BinarySecurityToken", wsse)
    select result;
    // get the token expiration
    var expires = from result in doc.Descendants()
    where result.Name == XName.Get("Expires", wsu)
    select result;
    ret.Expires = Convert.ToDateTime(expires.First().Value);
    HttpWebRequest request = createRequest(sharepointSite.Wreply);
    byte[] data = Encoding.UTF8.GetBytes(crypt.FirstOrDefault().Value);
    using (Stream stream = request.GetRequestStream())
    stream.Write(data, 0, data.Length);
    stream.Close();
    using (HttpWebResponse webResponse = request.GetResponse() as HttpWebResponse)
    // Handle redirect, added may 2011 for P-subscriptions
    if (webResponse.StatusCode == HttpStatusCode.MovedPermanently)
    HttpWebRequest request2 = createRequest(webResponse.Headers["Location"]);
    using (Stream stream2 = request2.GetRequestStream())
    stream2.Write(data, 0, data.Length);
    stream2.Close();
    using (HttpWebResponse webResponse2 = request2.GetResponse() as HttpWebResponse)
    ret.FedAuth = webResponse2.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse2.Cookies["rtFa"].Value;
    ret.Host = request2.RequestUri;
    else
    ret.FedAuth = webResponse.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse.Cookies["rtFa"].Value;
    ret.Host = request.RequestUri;
    catch (Exception ex)
    return null;
    return ret;
    static HttpWebRequest createRequest(string url)
    HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.CookieContainer = new CookieContainer();
    request.AllowAutoRedirect = false; // Do NOT automatically redirect
    request.UserAgent = userAgent;
    return request;
    private string getResponse(string stsUrl, string realm)
    RequestSecurityToken rst = new RequestSecurityToken
    RequestType = WSTrustFeb2005Constants.RequestTypes.Issue,
    AppliesTo = new EndpointAddress(realm),
    KeyType = WSTrustFeb2005Constants.KeyTypes.Bearer,
    TokenType = Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml11TokenProfile11
    WSTrustFeb2005RequestSerializer trustSerializer = new WSTrustFeb2005RequestSerializer();
    WSHttpBinding binding = new WSHttpBinding();
    binding.Security.Mode = SecurityMode.TransportWithMessageCredential;
    binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
    binding.Security.Message.EstablishSecurityContext = false;
    binding.Security.Message.NegotiateServiceCredential = false;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
    EndpointAddress address = new EndpointAddress(stsUrl);
    using (WSTrustFeb2005ContractClient trustClient = new WSTrustFeb2005ContractClient(binding, address))
    trustClient.ClientCredentials.UserName.UserName = _username;
    trustClient.ClientCredentials.UserName.Password = _password;
    Message response = trustClient.EndIssue(
    trustClient.BeginIssue(
    Message.CreateMessage(
    MessageVersion.Default,
    WSTrustFeb2005Constants.Actions.Issue,
    new RequestBodyWriter(trustSerializer, rst)
    null,
    null));
    trustClient.Close();
    using (XmlDictionaryReader reader = response.GetReaderAtBodyContents())
    return reader.ReadOuterXml();

  • Access, execute mof from pull server using release management

    I have created a DSC pull server and deployed a mof to this server.
    I could access the mof from pull server using below script and it executed successfully from powershell ISE.
        1. 
    Configuration
    C_Pull_Webserver
        2. 
        3. 
    LocalConfigurationManager
        4. 
        5. 
    AllowModuleOverwrite=$true;
        6. 
    ConfigurationID
    = "db00cf80-cb0e-4537-8344-90e3906e0b34";       
        7. 
    RefreshMode
    = "Pull";
        8. 
    DownloadManagerName
    = "WebDownloadManager";  
        9. 
    RefreshFrequencyMins
    = 15;
        10.
    ConfigurationModeFrequencyMins
    = 30;
        11.
    ConfigurationMode
    = "ApplyAndAutoCorrect";
        12.
    DownloadManagerCustomData
    = @{
        13.
    ServerUrl
    = "http://myserver:8080/PSDSCPullServer/PSDSCPullServer.svc";
        14.
    AllowUnsecureConnection
    = "TRUE" }          
        15.
        16.
        17.
    #Create MOF to push
        18.
    C_Pull_Webserver
        19.
    #push the MOF: this will engage pull mode
        20.
    $FilePath
    = (Get-Location
    -PSProvider FileSystem).Path
    + "\C_Pull_Webserver"
        21.
    Set-DscLocalConfigurationManager
    -ComputerName "CHN-AERO-VM13"
    -Path $FilePath
    -Verbose
    I removed the below lines from the above script
    19.
    #push the MOF: this will engage pull mode
    20.
    $FilePath
    = (Get-Location
    -PSProvider FileSystem).Path
    + "\C_Pull_Webserver"
    21.
    Set-DscLocalConfigurationManager
    -ComputerName "CHN-AERO-VM13"
    -Path $FilePath
    -Verbose
    andand tried  to access it from release management and i get the below error
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. ---> Microsoft.TeamFoundation.Release.Common.Helpers.OperationFailedException:
    Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
    Failed to apply configuration in the DSC script to the computer. Consult the Logs below for details of the error.
    System.Management.Automation.RemoteException: Unable to find the mof file. Make sure you are generating the MOF in the DSC script in the current directory.
       at System.Management.Automation.PowerShell.CoreInvokeRemoteHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
       at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)

    Don't know. How did you generate the MOF?
    When I run this it works just fine:
    Configuration C_Pull_Webserver{
    LocalConfigurationManager{
    AllowModuleOverwrite=$true;
    ConfigurationID = "db00cf80-cb0e-4537-8344-90e3906e0b34";
    RefreshMode = "Pull";
    DownloadManagerName = "WebDownloadManager";
    RefreshFrequencyMins = 15;
    ConfigurationModeFrequencyMins = 30;
    ConfigurationMode = "ApplyAndAutoCorrect";
    DownloadManagerCustomData = @{
    ServerUrl = "http://myserver:8080/PSDSCPullServer/PSDSCPullServer.svc";
    AllowUnsecureConnection = "TRUE"
    C_Pull_Webserver
    ¯\_(ツ)_/¯

  • How to get the read input file name in bpel process using File Adapter.

    Hi,
    I am reading a .txt file from configured directory using File Adapter.
    I had configured file adapter to read file with naming pattern “SalesOrder.*\.txt”.
    Now I had requirement to access the actual file name in bpel process eg: “SalesOrder123.txt”
    How can I get the file name in bpel process.
    Any help is appreciated.
    Vidya.

    1) create a variable of message type. Click on Browse Message type. Here you select Message Type-->Project WSDL Files -->fileAdapterInboundHeader-->Message Types-->Inboundheader_msg. Then click OK
    2)Next dbl Click on teh receive Activity which is receing your File from teh File Adapter. Go to the Adapter Tab. Click on Browse variable and select the variable that you had just created above.
    This would get the File name in the variable declared

  • How do I copy a file to a remote server using runtime exec - plz Help!

    Hi,
    I am trying to copy a file to a remote server using a runtime exec command as follows:
    Runtime.getRuntime().exec("scp "+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_JAR)+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_JAR_NAME)+".jar "+" "+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_USERNAME)+"@"+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_URL)+":"+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_JAR));
    Problem is this statement does not execute, as when I try it directly on command line, it requests for a password. Any suggestions on how I can get rid of that? I think I might have to configure my ssh_config file, but when I did some "Googling", I found the configuration settings of a ssh2_config file. I tried those (changing it to Host-based Authentication), but it didn't recognise them. Please help, this is so urgent!
    Regards,
    Simz

    Don't use Runtime.exec (or ProcessBuilder) for this. Check out JSch at JCraft (or some other Java SSH API.

Maybe you are looking for

  • How to include the NIWebAppServer.conf when building a web service installer in LV2010

    Hi all, I'm build a LabVIEW 2010 web service and creates a deployable setup installation as described in Web Services FAQ: http://zone.ni.com/devzone/cda/tut/p/id/7747#toc12 but also would like to include my .conf file for the NI Application Web Serv

  • Sun ONE Directory SDK for C support on RHAs 4.0 and Win 2003 R2

    What version of Sun One Directory SDK supported on RHAS 4.0 and Windows 2003 R2. Please confirm. Thanks, Rahul

  • Editing of bank statement

    Hi All   I have saved a bank statement by ff67 ,but i dont yet run batch, coild anyone plaease tell me  how could i  edit closing balance of bank statement .                              its really very urgent issue                                   

  • How to get xorg-server 1.13

    Hey guys, I just did a fresh install of Arch after using Gentoo for a little while, and found that the current version of the xorg-server is not supported by Catalyst. Can anyone point me in the direction of how I would manage getting the xorg-1.13 p

  • Signing policy...?

    Hello. My questions are a little bit off-topic and I think it can only be answered by Apple employees, however I ask it anyway... I apologise if it is not correct here. In my spare time I am developing compilers for different computers and I plan an