Reading / writing to named pipes in java created by C under WinNT

Hi,
i just wanted to know if im somehow able to read/write to a named pipe under WinNT. I've created a named pipe, but i cant seem to access it under java.
i tryed
File pipe = new File("\\\\.\\pipe\\myPipe");
but when i do pipe.exists() it returns false..
When i try to access this very same pipe from C it works like charm, but not from java.. Im 100% sure that the pipe exists, i have a tool that lists me all open pipes under windows and my pipe is listed there too.
I even tryed to use RandomAccessFile, but it just throws a FileNotFoundException..
Anyone was ever able to sucessfully read/write from named pipes in java under WinNT (any windoze ?)
Thanks

Thanks, but i always get a Pipe not found error (FileNotFoundException), im 100% sure the pipe exists, my .dll can write to it and read from it, im using the pipelist tool from http://www.sysinternals.com/ntw2k/info/tips.shtml#NamedPipes to list me all the pipes current open under WinNT - and my pipe is there...
My dll creates the pipe, here is the code :
g_hPipe = CreateNamedPipe(
lptstrPipeName , // name of pipe
//FILE_FLAG_OVERLAPPED |
PIPE_ACCESS_INBOUND, // pipe open mode
PIPE_TYPE_BYTE|
PIPE_READMODE_BYTE |
PIPE_WAIT, // pipe IO type
1,// number of instances
0, // size of outbuf (0 == allocate as necessary)
0, // size of inbuf
1000, // default time-out value
&sa); // security attributes WARNING: passing null
// all clients have the same security rights as the server
Is your CreateNamedPipe any different ? Or does it maybe only work under Win2k ? AFAIK named pipes under windows are not accessable through the file system.
Thanks again for your reply

Similar Messages

  • Named pipes in java

    I need to use named pipes in my java application to communicate with a .net application.
    As named pipes is OS dependent and not included in java it would probably have to be included through JNI. Anyone have any idea how to do this? or if there already exist a library with this function?
    Some information on named pipes:
    http://msdn2.microsoft.com/en-us/library/aa365590(VS.85).aspx

    Zept wrote:
    Opening it like a file you mean? Haven't tried if that works from java, but would simplify things if it does. Just open open \\.\pipe\PipeName then?You can open devices in Windows that way, I don't see why a pipe would be any different. After all, a pipe is made to be treated like a filestream.
    I would also need to create a named pipe from my application. Any tips on how to do that? in .net one can call the CreateNamedPipe function, but to my knowledge that's not implemented in java (at least not by default). I though I might have to wrap it in JNI to use named pipes.AFAIK, that would need JNI since it's pretty OS-specific. IIRC, under Linux, a named pipe can be created anywhere in the filesystem, whereas under Windows, they're accessed from \\.\pipe\. You might look around and see if there's already a JNI library to do so.

  • How to read data from Linux named pipes using java?

    In linux box I want to get data from a named pipe(created using "mkfifo <filename>".
    How I can read the incoming data from the named pipe?

    there are some caveats though: if i remember correctly, when you reach the end of data in a fifo it will look like end-of-file and that may confuse some classes. So your mileage may vary

  • Unix Named pipes from Java

    Hello,
    My problem is with a unix named pipe which I have to write to. To do it, I have to use a FileOutputStream. It works fine when some process is reading the named pipe. My problem is when there is no process reading the pipe, my Java app gets blocked in the open method of the FileOutputStream.
    What we want is to open the FileOutputStream without blocking, although there is no process reading the pipe.Is it possible from Java? Is there anything similar to the unix NON_BLOCK?
    Thank you in advance.
    RCG@

    Hi,
    I think, in UNIX you would get the same problem, at least if you are writing then.
    By NON_BLOCK you would not be blocked, but you would get an error each time you try to write. So in UNIX in most cases the blocking is quite adequate: you want to "listen", until someone "calls", and then continue.
    I assume you want to open the pipe first to see if you can access it successfully.
    For this, try the same trick like with C in UNIX:
    Open that pipe first for reading. So there is a reading process: your JVM.
    Does this help you?
    Regards,
    Hartmut

  • Getting FMS to broadcast a media file being read via a named pipe.

    I know you can broadcast partial AVI videos due to it's format. What I want to do, is feed an avi file to fms which is being generated by software on the local machine. If I create a named-pipe(on windows), will I be able to feed an avi file to fms while it's being read?

    Thanks Balusc!!
    I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
    <h:form id="CaseLookUp">
         <%
         String path = request.getContextPath()+"";
         out.print(path);
         %>
    <iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
         </h:form>

  • Reading/Writing Bulk Data, getting OutOfMemoryError: Java heap space

    Hello,
    I am reading more than a million record using CursoredStream, following is my code snippet for reading data
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(DataBk.class);
    query.useCursoredStream();
    CursoredStream stream;
    stream = (CursoredStream)dbses.executeQuery(query);
           while (!stream.atEnd()) {
           vector1 = stream.read(stream.size());
           }       Problem is I am getting
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap spaceI was reading other forums posts about this and it is mentioned that memory heap size could be increased.
    Where do I increase memory heap size?
    java.lang.OutOfMemoryError while opening 9.0.4.5 mwp in 10.1.3.3
    Besides, if my above code is not alright, someone could suggest best approach for reading and writing bulk data.
    Regards
    Edited by: user20090209 on Oct 14, 2009 10:17 AM

    Hello,
    If you are reading a million records and running out of heap, you will still get the exception by reading it using a cursor one at a time. It also depends on how the driver is processing the million records. Using a scrollable cursor might help ( http://wiki.eclipse.org/Using_Advanced_Query_API_(ELUG) ), increasing the heap as suggested will (In Jdev, Java options can be added to the project properties->Run/Debug/Profile->Launch settings), or even changing your app design to use objects more efficiently all around. It depends on what your are using the objects for, but even using pagination (via setting the firstRows/maxResults on a query) to limit the results returned can help depending on how the application requires the objects. What is important is that the objects be free for garbage collection when you are done processing them, and before the next batch needs to be brought in from the database.
    Also, common problems are that reading in one object can bring in multiple trees if relationships aren't managed efficiently. Only use relationships where required, and use indirection where ever possible.
    Best Regards,
    chris

  • Named pipes?

    Hi everyone,
    Anyone knows how to implement a full named pipe using java?
    i am wondering if it is possible to implement a named pipe in windows xp using .net which could "communicate" with a java app.
    Many thanks,

    Hi everyone,
    here is where i am stuck in:
    after reading the article i have a couple of questions:
    how can the command mkfifo in java be implemented?
    Besides, what i have done is as follows:
    i have an app which is using the runtime to create another process in order to receive all the messages from some libraries. For the moment it is receiving all the messages and copying them into a file (this part works perfectly)
    <Master Code>
    FileOutputStream fos = new FileOutputStream("text.txt");//args[0]);
    Runtime rt = Runtime.getRuntime();
    //Process pipe = rt.exec("mkfifo pipe");
    Process proc = rt.exec("java MainInterface");
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUTPUT", fos);
    // kick them off
    outputGobbler.start();
    <end Master Code>
    <Thread which copyes into a file>
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    OutputStream os;
    StreamGobbler(InputStream is, String type, OutputStream redirect)
    this.is = is;
    this.type = type;
    this.os = redirect;
    public void run()
    try
    PrintWriter pw = null;
    if (os != null)
    pw = new PrintWriter(os);
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    if (pw != null)
    pw.println(line);
    System.out.println(type + ">" + line);
    pw.flush();
    if (pw != null)
    pw.flush();
    } catch (IOException ioe)
    ioe.printStackTrace();
    <End Thread which copyes into a file>
    And the app called by this master program, which should show the messages incoming in the pip in a text area:
    <mainInterface>
    public static void main(String[] args) throws IOException{
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    //Here should be the pipe called
    public void run() {
    createAndShowGUI();
    <End mainInterface>
    Now the point is how can be done to write instead in a file, into a pipe which the mainInterface could access
    Many thanks

  • Reading selection parameters of transaction from Java

    Hi everyone,
    I 'm trying to find a way to read the selection parameters of a transaction from Java code. For example, the transaction MM03 (Display Material) expects a parameter called RMMG1-MATNR. I would like to be able to get the parameter's name in Java code via some RFC using JCO.
    Regards,
    Yoav.

    When the write end of the FIFO pipe is closedNamed pipes can be opened through several file desciptors. When all open file desriptors referring to a pipe are closed, only then is EOF indicated at the reading side. Named pipes "dwell" in the file system, and can be accessed as files through their names in the file system.

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

  • Reading/writing PDF files using JAVA

    how to read/write a PDF file using java,
    while i read a pdf file using BUfferedReader class it gives a list of char. which is not readable.
    how to convert those files to readable format.?
    is there any special class for doin that.?
    plz explain..?

    is there any special class for doin that.?Yes, I'm sure Google knows a few libraries that ca do that.

  • Named pipe in Oracle RAC

    To monitor a long running process I have the process send messages to a named pipe. I was wondering if this will work in Oracle RAC where the process that's writing the messages to the pipe might be running on a different node than the session reading the pipe.

    Emicsoft HD Video Converter is the high definition video converter software develeped to convert HD video files with high quality. With this HD video converter you can also easily convert between HD video formats, convert standard definition videos to HD videos, or convert HD videos to SD (Standard-Definition) videos. The HD video converter supports most of HD video formats: MTS/M2TS, TS, HD MKV, HD AVI, HD MP4, HD WMV, HD MOV, HD ASF.
    How to use this HD Converter?
    1. Launch the software and click "Add File" button to import files into the software. You can watch them on the preview screen.
    2. Edit the added movie by clicking "Effect" "Trim" or "Crop" button which can help you create unique videos easily.
    3. Select output in Profile option. Here all popular formats and mobile devices are supported. Then make sure the destination folder.
    4. Click "Start" button and the program will automatically start conversion.
    Emicsoft AVCHD Converter can convert AVCHD video to all popular video formats, and convert other videos to AVCHD video. So many formats are supported such as HD video (TS, MTS, M2TS, HD MPEG-4, HD MOV, HD AVI, HD VOB, HD ASF, HD WMV, etc.), general video (AVI, MP4, WMV, MPEG-1, MPEG-2, VOB, MOV, 3GP, FLV, SWF, etc.) and audio track (MP3, WMA, WAV, AAC, AC3, OGG, etc.).
    Emicsoft MOD Converter is a powerful MOD video converter which can MOD to AVI, MOD to MPG, MOD to MPEG, MOD to WMV and to other video format, such as FLV, SWF, ASF, DivX, XviD, MP4, VCD, SVCD, DVD-Video, VOB and so on. Batch conversion supported, so you can add several .MOD files one time.
    More softwares may help you:
    Emicsoft Video Converter
    Emicsoft FLV Converter
    Emicsoft MTS Converter

  • Stax reading /writing need help from xml guru plz

    hi, i have been told that stax reading /writing should involve no overhead and that is why i use it and i am now able to write my large data to file, but using my reader i seem to run out of memory, using netbeans profiler i ahve found that char[] seems to be the problem,
    by backtracing i ahve found that javax.xml.parser.SAXParser.parse calls the xerces packages which eventually leads to the char[ ], now my code for my reader is attatched here...
    package utilities;
    import Categorise.Collection;
    import Categorise.Comparison;
    import Categorise.TestCollection;
    import java.io.IOException;
    import javax.xml.parsers.*;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.Attributes;
    import java.io.File;
    import java.util.ArrayList;
    import java.util.List;
    import measures.Protocol;
    * @author dthomas
    public class XMLParser extends DefaultHandler
        static Collection collection = new Collection();
        List<Short> cList;
        List<Comparison> comparisonList;
        File trainFileName;
        File testFileName;
        TestCollection tc;
        List<TestCollection> testCollectionList;
        List<File> testFileNameList = new ArrayList<File>();
        List<File> trainFileNameList = new ArrayList<File>();
        boolean allTrainsAdded = false;
        Protocol protocol;
        List<File> trainingDirList;
        File testingDir;
        int counter = 0;
        File[ ] trainingDirs;
        File[ ] trainingFileNames;
        File[ ] testFileNames;
        TestCollection[ ] testCollections;
        Comparison[ ] comparisons;
        Comparison c;
        short[ ] cCounts;
        String order;
        String value;
        File trainDir;
        /** Creates a new instance of XMLParser */
        public XMLParser() {
        public static Collection read( File aFile )
            long startTime = System.currentTimeMillis();
            System.out.println( "Reading XML..." );
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser sp;
            try {
                sp = spf.newSAXParser();
                sp.parse( aFile, new XMLParser() );
            } catch (IOException ex) {
                ex.printStackTrace();
            } catch (SAXException ex) {
                ex.printStackTrace();
            } catch (ParserConfigurationException ex) {
                ex.printStackTrace();
            long endTime = System.currentTimeMillis();
            long totalTime = ( endTime - startTime ) / 1000;
            System.out.println( "Done..."  + totalTime + " seconds" );
            return collection;
        public void startElement(String uri,String localName,String qName, Attributes attributes)
            if( qName.equals( "RE" ) )
                testCollectionList = new ArrayList<TestCollection>();
            else if( qName.equals( "p") )
                boolean isConcatenated = new Boolean( attributes.getValue( "c" ) );
                boolean isStatic = new Boolean( attributes.getValue( "s" ) );
                protocol = new Protocol( isConcatenated, isStatic );
            else if( qName.equals( "trdl" ) )
                trainingDirList = new ArrayList<File>();
            else if( qName.equals( "trd" ) )
                trainDir = new File( attributes.getValue( "fn" ) );
                trainingDirList.add( trainDir );
            else if( qName.equals( "td" ) )
                testingDir = new File( attributes.getValue( "fn" ) );
            else if( qName.equals( "TC" ) )
                counter++;
                System.out.println( counter );
                comparisonList = new ArrayList<Comparison>();
                testFileName = new File( attributes.getValue( "tfn" ) );
                testFileNameList.add( testFileName );
                tc = new TestCollection( );
                tc.setTestFileName( testFileName );
            else if ( qName.equals( "r" ) )
             order = attributes.getValue( "o" );
                value = attributes.getValue( "v" );
                cList.add( Short.parseShort( order ), new Short( value ) );
            else if( qName.equals( "c" ) )
                cList = new ArrayList<Short>();
                trainFileName = new File( attributes.getValue( "trfn" ) );
                if( !allTrainsAdded )
                    trainFileNameList.add( trainFileName );
        public void characters(char []ch,int start,int length)
            //String str=new String(ch,start,length);
            //System.out.print(str);
        public void endElement(String uri,String localName,String qName)
            if (qName.equals( "c") )
                allTrainsAdded = true;
                cCounts = new short[ cList.size() ];      
                for( int i = 0; i < cCounts.length; i++ )
                    cCounts[ i ] = cList.get( i );
                c = new Comparison( trainFileName, tc );
                c.setcCounts( cCounts );
                this.comparisonList.add( c );
            else if( qName.equals( "TC" ) )
                comparisons = new Comparison[ comparisonList.size() ];
                comparisonList.toArray( comparisons );           
                tc.setComparisons( comparisons );
                testCollectionList.add( tc );
            else if( qName.equals( "RE" ) )
                testCollections = new TestCollection[ testCollectionList.size() ];
                testCollectionList.toArray( testCollections );
                collection.setTestCollections( testCollections );
                testFileNames = new File[ testFileNameList.size() ];
                testFileNameList.toArray( testFileNames );
                collection.setTestingFiles( testFileNames );
                //String[ ] testCategories = new String[ testCategoryList.size() ];
                //testCategoryList.toArray( testCategories );
                //collection.setTestCategories( testCategories );
                trainingFileNames = new File[ trainFileNameList.size() ];
                trainFileNameList.toArray( trainingFileNames );
                collection.setTrainingFiles( trainingFileNames );
                //String[ ] trainingCategories = new String[ trainCategoryList.size() ];
                //trainCategoryList.toArray( trainingCategories );
                //collection.setTrainingCategories( trainingCategories );
                collection.setProtocol( protocol );
                trainingDirs = new File[ trainingDirList.size() ];
                trainingDirList.toArray( trainingDirs );           
                collection.setTrainingDirs( trainingDirs );
                collection.setTestingDir( testingDir );
         //else
             //System.out.println("End element:   {" + uri + "}" + localName);
    }i thought it may have been a recursive problme, hence having so many instance variables instead of local ones but that hasn't helped.
    all i need at the end of this is a Collection which holds an array of testCollections, which holds an array of cCounts and i was able to hold all of this in memory as all i am loading is what was in memory before it was written.
    can someone plz help
    ps when i use tail in unix to read the end of the xml file it doesnt work correctly as i cannot specify the number of lines to show, it shows all of the file as thought it is not split into lines or contains new line chars or anything, it is stored as one long stream, is this correct??
    here is a snippet of the xml file:
    <TC tfn="
    /homedir/dthomas/Desktop/4News2/output/split3/alt.atheism/53458"><c trfn="/homed
    ir/dthomas/Desktop/4News2/output/split0/alt.atheism/53586"><r o="0" v="0"></r><r
    o="1" v="724"></r><r o="2" v="640"></r><r o="3" v="413"></r><r o="4" v="245"></
    r><r o="5" v="148"></r><r o="6" v="82"></r><r o="7" v="52"></r><r o="8" v="40"><
    /r><r o="9" v="30"></r><r o="10" v="22"></r><r o="11" v="16"></r><r o="12" v="11
    "></r><r o="13" v="8"></r><r o="14" v="5"></r><r o="15" v="2"></r></c><c trfn="/
    homedir/dthomas/Desktop/4News2/output/split0/alt.atheism/53495"><r o="0" v="0"><
    /r><r o="1" v="720"></r><r o="2" v="589"></r><r o="3" v="349"></r><r o="
    please if anyone has any ideas from this code why a char[] would use 50% of the memory taken, and that the average age seems to show that the same one continues to grow..
    thanks in advance
    danny =)

    hi, i am still having lo luck with reading the xml data back into memory, as i have said before, the netbeans profiler is telling me it is a char[] that is using 50% of the memory but i cannot see how a char[] is created, my code doesn't so it must be the xml code...plz help

  • Reporting Services 2008 R2 configuration error: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi, I am using SQL Server 2008 R2 and on one of our dev boxes I am trying to setup ReportServer using ReportingServices Configuration manager. This is was installed longtime back and during installation they created a service account for reporting services.
    When I try to configure the service account I do not get the service account created during the installation in the pull down and if I were to use something different I get this "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
    error.
    Thanks in advance...........
    Ione

    Hi,
    Take a look at this blog - http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx
    I hope it will help.

  • Unix pipe and java program

    Hi,
    I want to make an utility that reads from a Unix pipe and prodouce an output to the screen. i.e. there is a "input.log" file to be processed as:
    # tail -f input.log | java myprog | console
    this time, "myprog" should take last few lines from "input.log" and process it in some way and prints the result to the shell.
    Please suggest me possible solution.
    Sumit

    if you want to create your java program in such way that it could take input from pipe and produce output to pipe, then you actually have to get input ftom System.in and produce output to System.out
    but what you mean by that | console after java myprog, that i don't understand...
    actually, what you decribe to be your problem, could be solved with cat or furthermore, it could be solved with not touching anything...
    since when you pipe progs together, then first progs output would be connected to seconds' input and so forth...
    maybe this helps a bit...

  • Disable Shared memory & Named Pipes protocols - Post implementation issues

    Hi,
     As per security guidelines, we disabled Shared memory & Named Pipes protocols and enabled "TCP/IP" only. Also, we changed the port# from 1433 to 1533 and after that, in management studio, SQL Server Error logs is not openning up and SQL
    Agent Service doesn't start.
     Error while opening SQL Server Error Logs in SSMS:
    The description for Event ID 17052 from source MSSQLSERVER cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    Severity: 16 Error:10061, OS: 10061 [Microsoft][SQL Server Native Client 11.0]TCP Provider: No connection could be made because the target machine actively refused it. 
    the message resource is present but the message is not found in the string/message table
    Error while trying to start SQL Agent Service from the configuration manager:
    SQLServerAgent could not be started (reason: Unable to connect to server '(local)'; SQLServerAgent cannot start).
     We changed the Server host in the registry by entering <ServerName>,<Port#>. This resolved SQL Agent Service startup issue. After startup, we tried to run jobs but they all are failing with the below error.
    Job runtime Error:
    Could not load package "Maintenance Plans\Daily DB Backups" because of error 0xC0014062.  Description: The LoadFromSQLServer method has encountered OLE DB error code 0x80004005 (Login timeout expired).  The SQL statement that was issued
    has failed.  Source:   Started:  4:40:45 PM  Finished: 4:41:00 PM  Elapsed:  15.547 seconds.  The package could not be loaded.  The step failed.
     Resolution: If I create an alias name then all problems are solved.
     Question: Alias name is the only one solution or is there any other turn around? For some reason, I’m not at all comfortable with alias name. I feel like cheating. :-) .
     PLEASE COMMENT
    If you feel that I have answered your question then please "Mark as Answer".

    Hi,
     Shared memory is a security threat reported by several security audit tools. In our company, we are using "DBProtect" and "FortiDB" tools. Both checks for "Shared memory" & "Named Pipes" protocols. In case,
    our server is compromised then the last step is to get into the SQL Server to steal the data and we are trying to restrict this from being happening. So, we are disabling both protocols.
     Finally, we got it worked.
     "Cliconfig" in run command and enable "TCP/IP" protocols and it worked like a charm. This is a fluke resolution and I don't know the technical reason why we need to do this in "Client Configuration" on the server when
    we have "Configuration Manager".
     We successfully configured by disabling "Shared memory/Named Pipes" protocols. SQL Browser is also disabled & no aliases are configured.
    Thanks.
    If you feel that I have answered your question then please "Mark as Answer".

Maybe you are looking for