NI Server remote connection security

Hi,
I searched all the NI site and all the Labview help but couldn't find answers. My intention is to run one or more VI Server on an unsecure TCP/IP network. I would like to allow remote access using Open Application Reference node. We have Academic Site License so I have access to most recent version of almost all NI software. Related to this I have the three following questions:
1) I'd like to limit the access to certain VIs and certain VI servers (if there will be more than one server) on user level. The IP address level access rights are not enough since multiple users may have the same IP address. There is a feature in Labview 8.0 called Domain Account Manager with which I can create domains and create users and user groups. Can I use this information to limit access to VIs running on a VI server? There seems to be a NI Security: Get Access Rights Method which is more or less undocumented. Where can this be used?
2) How is the connection created by Open Application Reference and used in remote VI calls secured? Is the connection encrypted or can it be made encrypted using strong cryptography? How is the user information passed to the VI server when user logs in to a Domain Account Manager account? How is the user identity secured after the login during the session when user accesses security controlled resources?
3) What is the NI Labview related roadmap for authentication, access control, accounting and security of remote connections? I would really appreciate if the roadmap would include features that would allow secure remote access to any labview resources with user level dynamically controllable access control. I also would like to see some kind of session management so that passive users could be automatically logged out.  I would also appreciate if each instance of re-entrant VI (or class objects in the future) could have different access rights that could be defined when VI (object) reference is opened. Now anybody who has access to a certain VI can access the dataspace of any reentrant instance of that VI.
Tomi Maila

It seems nobody knows... I assume no answer means no security at all. I suppose I have to write my own API for remote application calls then.
I guess the following solution may work for user level security on remote VI calls. Put VI server behind a VPN capable firewall. This firewall is taking the responsibility of access control. Allow only VPN connections to pass trough the firewall. Allocate a unique IP-address for each VPN connection. Now each user has a separate dynamic IP-address. Since open application reference calls can be allowed/denied on the IP-address basis, this functions as a user level access control. However this is really overkill solution. Does anybody come up with anything simpler? Of course some other secure certificate based connection can be used instead of IP-sec based VPN.
Tomi
Message Edited by Tomi M on 06-05-2006 04:15 PM
Tomi Maila

Similar Messages

  • Can't connect to server remotely, connects fine locally

    I've got an extremely frustrating problem that I can't figure
    out. I have a simple application to test the connection to the FMS
    2 server. If it can connect it basically just says "Connection
    Successful", if it can't connect "Connection Failed". It's named
    'FMStest' and I have created a folder by that name in the
    'applications' directory within the FMS2 directory. The local
    version connects successfully and shows as connected in the
    management console--the connection string I'm using locally is:
    rtmpNow = "rtmp:/FMStest";
    The remote connection fails everytime--I upload the published
    files to our webserver and access the created html file. the
    connection string I use for the remote connection is:
    rtmpNow = "rtmp://my.domain.com/FMStest"; //domain changed
    for security reasons
    Here is the full code:
    var nc:NetConnection = new NetConnection();
    var rtmpNow:String = new String();
    rtmpNow = "rtmp://my.domain.com/FMStest"; //changed for
    privacy
    nc.onStatus = function(info){
    trace ("Level: "+info.level+" Code: "+info.code);
    trace(code.list);
    connect_txt.text = info.code;
    if(connect_txt.text == "NetConnection.Connect.Failed"){
    stat_text.text="Status: Not Connected";
    status_text.text = "Connection to "+rtmpNow+" failed"+"
    Level: "+info.level+" Code: "+info.code;
    else{
    status_text.text = "connection successful";
    stat_text.text="Status: Connected!";
    nc.connect(rtmpNow);
    stat_text.text = "Status: Connecting";
    We've checked all the firewall and other configurations, I've
    tried all variations of the connection string (including using the
    IP address) No luck. Any ideas?

    If you get a "Connection failed" from typing "telnet
    my.domain.com 1935", you have a connection problem. Try running the
    client from different sites (starting from the server itself) to
    identify the component that's blocking the connection.
    You can try running the server on more ports than 1935. Try
    port 1935 and port 80 with RTMP and RTMPT.
    To do so shutdown your server and edit the ADAPTOR.HOSTPORT
    entry in fms.ini. You may have to disable your webserver to avoid
    port conflicts. Then start FMS again and retry. Then check the log
    files. Best is to have a tail on access.00.log

  • OPC Server Remote Connection LabVIEW 8

    Hi
    Currently I am trying to access a VI with a Shared Variable from a remote computer using an OPC Client. I haven´t succeed on this becasue I cannot find the OPC Server on the Host Computer.
    Here is what I am using:
    Host Computer:
    Windows XP SP2
    NI Developer Suite November 2005
    LabVIEW 8 with DSC Module.
    Remote Computer: The same as above.
    Here´s what I have done.
    I created a new project with a library that included a Network Published Shared Variable. The VI is quite simple it just generates a number that is written to the Shared Variable. Once the VI was running I opened the Server Explorer on the host computer, browsed My PC and connected to the server Variable.Engine in which I was able to see my shared variable. Then on the Remote Computer I opened the Server Explorer and browsed on my Network Places and when I tried to access the Host Computer I got the following error: "Unable to connect to \\HOST! Make sure that this computer is on the network, has remote administration enabled, and that both computers are running the remote registry service"
    I have tried by using the Matrikon OPC Server Explorer and I got the same results. I read many documents that refer tis problem as a DCOM setting because of the firewall fo XP SP2.
    Here´s a list of the NI documents I reviewed.
    How Can I set up LabVIEW, LabVIEW DSC, and Lookout to work with the windoes XP firewall
    URL: http://digital.ni.com/public.nsf/websearch/0D7B86F4B4D19A5E86256F9A006EECB1?OpenDocument
    Setting Proper Access for Remote OPC Server When Using National Instruments OPC Clients
    URL: http://digital.ni.com/public.nsf/allkb/5C8A90CD57B279F286256C2C006F1EB4
    I never got the results I expected. Then I tried the Matrikon OPC Simulation Server and the Matrikon OPC Server Explorer(Client) and I Succesfully connected between Matrikon servers and clients.
    My project is based in accesing the LabVIEW OPC server with a generic OPC client but I cannot get the client to connect to the server.
    I will apreciate some advice on this issue.
    Marcos

    Marcos,
    If you are using two instances of LabVIEW 8, I would first take the OPC part out and just try viewing Shared Variables on the remote computer.  This needs to work.  One document to check is the following KB: http://digital.ni.com/public.nsf/websearch/6E37AC5435E44F9F862570D2005FEF25?OpenDocument. I would also make sure the opcenum.exe service is running on both machines. 
    Once browsing to Shared Variables works, you can test the OPC aspect of the Shared Variable Engine.  Server Explorer is an older OPC 2 client, but should work in most cases to browse to OPC Servers -- you'll need to make sure the registry settings on the host computer are set up correctly as per the KB you mentioned, and also make sure to connect to the OPC Server, add a group, and add items manually from within Server Explorer, rather than using the Wizard.
    Doug M
    Applications Engineer
    National Instruments
    For those unfamiliar with NBC's The Office, my icon is NOT a picture of me

  • Remote Connectivity Analyzer opens port 443 successfully but fails.."Net. conn. not available"

    Trying to set up a client with external access.  I just got their Edge off the domain and in the DMZ, and supposedly the appropriate firewall ports are opened. They have a RP running IIS ARR.
    Microsoft Remote Connectivity Analyzer (testconnectivity.Microsoft.com) does the following for three tests:
    1.  When I do Lync Server Remote Connectivity Test and choose Autodiscover, it is able to open port 443 and it validates the cert.  But it says "Operation failed because the network connection was not available". 
    2.  When I do the same Lync Server Remote Connectivity Test and manually enter the Access Edge service FQDN and choose port 5061, it is able to resolve the name in DNS but it then fails testing TCP port 5061 with "The specified port is either blocked,
    not listening, or not producing the expected response".
    3.  When I do the Lync Autodiscover Web Service Remote Connectivity Test, it fails when trying to open port 443 on the Lyncdiscover URL.
    So, that seems to indicate to me that port 443 might be open on the Edge but not the Reverse Proxy, since that's where the autodiscover URL points.  And it seems 5061 is not open but 443 is on the Edge.  What else could I check on the Edge to get
    443 working?
    Thanks for the help and sorry for any vague information.  Any help is appreciated!
    Brandon

    Okay, I can now telnet to lyncdiscover.mydomain.dom on port 443 successfully, and I can telnet to sip.mydomain.com on 5061 successfully. 
    Now when I do the remote connectivity test:
    Using Autodiscover to detect server settings, I get "Operation failed because the network connection was not available". It opens port 443 fine it looks like.
    Manually choosing lync.mydomain.com as the FQDN and port 5061, I get "The endpoint was unable to register.  See the ErrorCode for specific reason".  Response code is 504 and response message is Server Time-out
    Doing the Lync Autodiscover Web Service Remote Connectivity Test I get "HTTP 403 error was received because ISA server denied the specified URL".
    Looks to me like a rule might not be set right on the firewall if ISA is denying the connection, right?(they are using TMG on a server running Server 2008 as the firewall).  I can't ping the reverse proxy from the firewall (but I can ping the Edge). 
    What else can I check?
    Thanks for all the help so far, I really appreciate it.
    Brandon

  • How  remote managed server to connect to admin server

    I have an admin server on one machine and created a managed server on different
    machine, I am not able to start managed server from either machine. When I used
    the admin server machine to start the managed server remotely I got this message
    Connecting to http://fkeita:7001...
    <Jul 17, 2002 11:11:06 AM EDT> <Notice> <Security> <090082> <Security initializi
    ng using realm myrealm.>
    <Jul 17, 2002 11:11:06 AM EDT> <Notice> <WebLogicServer> <000328> <Starting WebL
    ogic Managed Server "managedserver3" for domain "admindomain">
    <Jul 17, 2002 11:11:28 AM EDT> <Emergency> <WebLogicServer> <000350> <Unable to
    create a server socket on Channel Default for: BFINKELMAN/90.0.0.25, port: 8002.
    java.net.BindException: Cannot assign requested address: JVM_Bind Perhaps the
    a
    ddress BFINKELMAN/90.0.0.25 is incorrect or another process is using port 8002.>
    <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <Security> <090085> <Server failed
    to
    bind to any port such that it is not reachable from the console.>
    <Jul 17, 2002 11:11:29 AM EDT> <Emergency> <WebLogicServer> <000342> <Unable to
    initialize the server: Fatal initialization exception>
    When I tried to connect managed server from its machine to admin server (running
    on separate machine ) I got this error
    Starting WebLogic Server...
    Connecting to http://fkeita:7001...
    <Jul 17, 2002 11:15:18 AM EDT> <Notice> <Security> <090082> <Security initializi
    ng using realm myrealm.>
    <Jul 17, 2002 11:15:18 AM EDT> <Critical> <WebLogicServer> <000364> <Server fail
    ed during initialization. Exception:java.lang.SecurityException: Authentication
    for user system denied
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    >
    <Jul 17, 2002 11:15:18 AM EDT> <Emergency> <WebLogicServer> <000342> <Unable to
    initialize the server: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user system denied
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    >
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    Reason: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user system denied
    java.lang.SecurityException: Authentication for user system denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:978)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1116)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:703)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:588)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:276)
    at weblogic.Server.main(Server.java:31)
    Thanks.

    Is your applications deployed to Cluster?
    If yes it will automatically deploy to new managed servers added to cluster when it comes to running mode

  • How to Configure Remote Connections To SQL Server 2008 R2 Express

    Post written June 10, 2010 and pertains to:
    SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
    SQLX_LOC
    SQL Server 2008 R2 Management Studio on both my server and local machines:
    MS_SRV, MS_LOC
    Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
    SQL Server Configuration Manager on both my server and local machines:
    CMGR_SRV, CMGR_LOC
    Server Manager: SMGR
    I am connecting to my hosting server via Remote Desktop Connection: RDC
    I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine.  I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV.  However I am not able to use MS_LOC to connect
    with SQLX_SRV.  Here's what I have done so far:
    SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles.  Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
    CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue.  On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No.  I've tried it both
    ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP.  On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field. 
    For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field.  For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
    fields.
    CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart.  This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
    On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
    The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS".  My server machine name is "SERVER1" on the EnglishBrains.com domain.  So the proper local name (local within the context of my remote server as connected via RDC) for
    my instance of SQLX_SRV would be:
    SERVER1\SQLEXPRESS 
    Note the use of a backslash NOT a forward slash. 
    Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
    SERVER1.EnglishBrains.com\SQLEXPRESS
    I must also use SQL Server Authentication.  Before I can use such a remote connection, however, there are still several configuration steps required.  So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
    for the server name and Windows Authentication.  Once connected I performed the following steps:
    MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode".  This will enable connections using either type
    of authentication.
    Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
    Click OK to save these changes and close the Server Properties dialogue.
    MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
    On the General page Enter a name for your new login
    Select SQL Server Authorization
    Enter and confirm a password
    Uncheck Enforce password expiration
    Select the default Database and Language
    On the ServerRoles page Public will be checked, also check SysAdmin.  This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
    On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
    At the bottom of the User Mapping page you'll see the Database Roles table.  Public will be selected by default.  Also select db_Owner.  Again this is probably not a good idea, and I'll refine this once I can connect.
    On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
    Click OK to save all changes and close the Login - New dialogue.
    With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login.  I tried this and it worked fine.  Next I tried to use this same login
    remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
    SERVER1.EnglishBrains.com\SQLEXPRESS
    and opting for SQL Server Authentication and supplying the name and password of my new login.
    THIS DID NOT WORK??  Instead I get the following error message:
    Cannot connect to SERVER1.EnglishBrains.com\SQLEXPRESS.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
    For help, click:
    http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
    If you follow the suggested help link, you are told:
    The SQL Server client cannot connect to the server.  This error could be caused by one of the following reasons:
    A specified SQL Server instance name is not valid.
    The TCP, or named pipes protocols are not enabled.
    The firewall on the server has refused the connection.
    The SQL Server Browser service (sqlbrowser) is not started.
    WRONG on all 4 counts!  The instance name IS valid.  Both TCP/IP and Named Pipes protocols are enabled.  The firewall has been shut down, so it is not relevant.  Finally the SQL Server Browser IS started.
    The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
    tcp:68.71.134.186,1433
    Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running. 
    However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work??  I get the following error message:
    Cannot connect to tcp:68.71.134.186,1433.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
    If you follow the help link you are told:
    "The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
    However, the firewall has been shut down and the server HAS been configured to accept remote connections! 
    I confirmed that i could indeed Ping to 68.71.134.186  and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
    tcp:68.71.134.186,1433 .
    IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine! 
    If anyone can help me figure out why I would be very, very grateful!

    My two cents to help you out on c# code example to configure the remote sql server express.
    Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data.SqlClient;
    namespace sqlremoteconnection
    class Program
    static void Main(string[] args)
    // this is the local sql server connection
    // 192.168.1.101\SQLEXPRESS
    // now, the configuration for remote access:
    // activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
    // SQL Server Configuration Manager
    // --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
    // --> Log On -> Start -> Ok
                // netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
    // VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
    // on the router!!!
    // TCP: 1433
    // UDP: 1434
    // or just a personal port like TCP 31433/UDP 31434
    // read carefully the netsh commands above
    // server name: 123.132.24.177\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
    // server name: anyurl.myftp.org\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
    SqlConnection myConnection = new SqlConnection(
    "user id=sa;" +
    "password=password_goes_here!;" +
    "server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
    //"Trusted_Connection=no;" +
    "database=database_name_here; " +
    "connection timeout=30");
    try
    myConnection.Open();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    SqlDataReader myReader = null;
    SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
    myReader = myCommand.ExecuteReader();
    while (myReader.Read())
    Console.WriteLine(myReader["tab01_name"].ToString());
    Console.WriteLine(myReader["tab01_age"].ToString());
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    myConnection.Close();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    Adelino Araujo

  • The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.

     try
                    MailMessage mail = new MailMessage();
                    SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
                    mail.From = new MailAddress("[email protected]");
                    mail.To.Add("[email protected]");
                    mail.Subject = "Test Mail..!!!!";
                    mail.Body = "mail with attachment";
                    System.Net.Mail.Attachment attachment;
                    attachment = new System.Net.Mail.Attachment(@"C:\Attachment.txt");
                    mail.Attachments.Add(attachment);
                    SmtpServer.Port = 587;
                    SmtpServer.UseDefaultCredentials = true;
                    SmtpServer.Credentials = new System.Net.NetworkCredential("userid", "Password");
                    SmtpServer.EnableSsl = true;
                    SmtpServer.Send(mail);
    Catch(Exception exception)
    When i m run this part of code it throw an Ecxeption                                                          
            Given Below is the Error.. 
        The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
    Bikky Kumar

     try
                    MailMessage mail = new MailMessage();
                    SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com");
                    mail.From = new MailAddress("[email protected]");
                    mail.To.Add("[email protected]");
                    mail.Subject = "Test Mail..!!!!";
                    mail.Body = "mail with attachment";
                    System.Net.Mail.Attachment attachment;
                    attachment = new System.Net.Mail.Attachment(@"C:\Attachment.txt");
                    mail.Attachments.Add(attachment);
                    SmtpServer.Port = 587;
    SmtpServer.UseDefaultCredentials = true;    ///Set it to false, or remove this line
                    SmtpServer.Credentials = new System.Net.NetworkCredential("userid", "Password");
                    SmtpServer.EnableSsl = true;
                    SmtpServer.Send(mail);
    Catch(Exception exception)
    Given Below is the Error..      The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
    Solution:
    The error might occur due to following cases.
    case 1: when the password is wrong
    case 2: when you try to login from some App
    case 3: when you try to login from the domain other than your time zone/domain/computer (This
    is the case in most of scenarios when sending mail from code)
    There is a solution for each
    solution for case 1: Enter the correct password.
    Recomended: solution for case 2: go to
    security settings at the following link https://www.google.com/settings/security/lesssecureapps and
    enable less secure apps . So that you will be able to login from all apps.
    solution 1 for case 3: (This might be helpful) you need to review the activity. but reviewing the activity will not be helpful due to latest security
    standards the link will not be useful. So try the below case.
    solution 2 for case 3: If you have hosted your code somewhere on production server and if you have access to the production server, than take remote
    desktop connection to the production server and try to login once from the browser of the production server. This will add exception for login to google and you will be allowed to login from code.
    But what if you don't have access to the production server. try
    the solution 3
    solution 3 for case 3: You have to enable
    login from other timezone / ip for your google account.
    to do this follow the link https://g.co/allowaccess and
    allow access by clicking the continue button.
    And that's it. Here you go. Now you will be able to login from any of the computer and by any means of app to your google account.
    Regards,
    Nabeel Arif

  • SQL Server Express Remote Connection is an Official Function or Not

    There are lots of guide on internet about this topic or in the forum.
    And I have already tested SQL Server 2008 R2 Express Remote Connection successfully, for usage of an application server.
    But I am not sure about this function is Ok or not for production environment, as someone said Remote Connection with SQL Express is not an official function and not supported by Microsoft. Is it true?
    Is there some white paper or official function spec about SQL Express to clarify it?

    Sure it's an official function of the SQL Server Express Edition.
    By default it's only disabled by security reasons, because in common the Express Edition is used for smaller applications running on one machine.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Users can only connect to RD farm website and cannot remote into terminal server , when connected via VPN

    Hello,
    I have a RD farm using 3 Win 2012 servers (1 broker and 2 session host), for internal use only, have not
    configured gateway for internet access.
    Users are able to connect to RD farm website and remote into terminal server, within office
    but can only connect to RD farm website and cannot remote into terminal server , when connected via VPN
    Its takes long time at securing connection and fails.
    Thanks

    Hi,
    Thank you for your posting in Windows Server Forum.
    First of all I would suggest you to configure RD gateway role on your server and pass all the connection through it because it’s a best practice to use RD Gateway in RDS Farm. 
    Apart from this, if you are not using RD Gateway then you must check that you have successfully forwarded port 3389 for RDS to access via VPN. Also check that you have made configuration under IIS Manager to enable Forms Authentication. Please check
    this link.
    In addition, please refer beneath article for additional details.
    1. How to Access Windows Remote Desktop Over the Internet
    2. Remote Desktop Services in Windows 2008 R2 – Part 3 – RD Web Access & RemoteApp
    (For reference)
    Hope it helps! 
    Thanks,
    Dharmesh

  • A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (p

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that
    the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)
    The system cannot find the file specified
    Cannot connect to COWBOYS.
    Here are the technical details===================================
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476
    Error Number: 2
    Severity: 20
    State: 0
    Program Location:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer
    timeout)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance,
    SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
       at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
    ===================================
    The system cannot find the file specified
    I have tried from so many forms. This is so frustrating. Thank for everyone/anyone who wants to help. So this is what happened: I had to uninstall my previous sqlserver 2012(which worked great) for some reason, and I uninstalled everything from that download.
    Then I installed the trial edition of sql server 2012 (64 Bit) and It wouldn't connect to the database. (Error mentioned above.) My local DB is COWBOYS. (COWBOYS is also my computer name.) After this, I have tried downloading sqlexpress and sqlserver 64bit
    many times and cannot connect to my local DB. 
    How do I connect to my Local DB? 
    Also, I think this might help: (When I run sqlserve.exe, which I was able to find in C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn, I get an error: Your SQL server installation is either corrupt or has been tampered with(Error getting
    instance ID from name). Please uninstall then re-run setup to correct this problem.
    I would happily re install it, if it wasn't my 20th time.
    I don't have any remote connections, I don't use username/password, only window authentication. I work mostly on visual studio, but without able to store /retrieve data, I don't know how to survive.
    May be the solution is very simple, but I am too frustrated. 
    Some of the things I have tried:
    From a command prompt, enter one of the following commands:
    net start "SQL Server Agent (MSSQLSERVER)" OR 
    net start "SQL Server Agent(instancename)"(for instance)
    on my sql configuration, I cannot start anything because there is nothing there to start. I can post more details, if that would help. Also, some more details about the error:
    Details
    Product:
    SQL Server
    ID:
    2
    Source:
    MSSQLServer
    Version:
    10.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Version:
    9.0
    Component:
    SQLEngine
    Message:
    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error:
    40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
    Explanation
    SQL Server did not respond to the client request because the server is probably not started.
    User Action
    Make sure that the server is started.
    Any one that can help me, I will be greatful. Thank you so much. p.s. please ask me anything if you have any questions.

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • How do i connect to exchange server remote desktop

    Hi, hope someone can point me in the right direction.
    I have recently purchased a macbook pro and wish to
    connect to our office server which is a windows exchange server (remote desktop).
    Which steps do I need to take.
    Many Thanks,
    Rob K.

    Anyone able to help ?
    I used to be abale to access my company email when the URL for webmail was "email.COMPANY.co.uk" but recently it was changed to "webmail.COMPANY.co.uk" and now my iphone cannot verify my account.
    Any ideas ?
    I have the following info (selected pieces removed for privacy.
    Mailbox owner: XXXXX
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; chromeframe/18.0.1025.58)
    The required version of Silverlight is installed: Yes
    Required version of Silverlight: 2.0.31005.0
    Outlook Web App experience: Premium
    User language: English (United Kingdom)
    User time zone: (UTC) Dublin, Edinburgh, Lisbon, London
    Exchange mailbox address:XXXX
    Host address: https://webmail.COMPANY.co.uk/owa
    Version: 14.2.247.5
    Host name: webmail.COMPANY.co.uk
    S/MIME control: not installed
    Exchange Client Access server name: XXXX
    Exchange Client Access server .NET Framework version: 2.0.50727.5446
    Client Access server operating system version: Microsoft Windows NT 6.1.7601 Service Pack 1
    Client Access server operating system language: en-US
    Client Access server version: 14.2.247.0
    Client Access server language: en-US
    Client Access server time zone: (UTC) Dublin, Edinburgh, Lisbon, London
    Client Access server platform: 64bit
    Mailbox server name: XXXX.XXXX.local
    Mailbox server Microsoft Exchange version: 14.2.247.0
    Other Microsoft Exchange server roles currently installed on the Client Access server: Hub Transport
    Authentication type associated with this Outlook Web App session: Kerberos
    Public logon: Yes
    Internal POP setting:
         Server name: XXXX.XXXX.local
         Port: 995
         Encryption method: SSL
    Internal IMAP setting:
         Server name: XXXX.XXXX.local
         Port: 993
         Encryption method: SSL
    Custom Forms: loaded
    Segmentation settings: fffffffeefc3ffff
    Restricted functionality settings: fffffffeefc3ffff

  • After restoring SharePoint farm backup ( The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connection)

    Hi,
    I have taken farm back and restore it in new UAT environment, while access to the main site getting the below error: 
    Error  
    An unexpected error has occurred. 
    Troubleshoot issues with Microsoft SharePoint Foundation. 
    Correlation ID: 866476f3-23dd-4e1e-97af-bffc62cc2d57 
    Date and Time: 7/15/2014 11:26:35 AM 
    When i checked in log i got below error
    System.Data.SqlClient.SqlException: A network-related or instance-specific
    error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40
    - Could not open a connection to SQL Server)    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj)     at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecu... 
    Thanks in advance
    Said Al Balushi

    Hi Wendy,
    i have checked all below points, every thing is fine but still i am getting the same error.
    Check SQL services are runing
    Check remote conenctions are enabled
    Check SQL Browser service is runing
    Check TCP/IP protocal enabled at SQL server
    Check out windows firewall setting
    Thanks,
    Said
     

  • A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
    server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26- Error:Locating Server\instance Specified)
    How Can i solve this?

    1. Make sure SQL Server Service is running
    2. If a named instance, make sure SQL Server browser service is running
    3. Make sure SQL Server is configured to allow remote connections
    4. Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
    5. Test server connectivity with PING from the client machine
    6. Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine.  For example
    a. TELNET <server-name> 1433
    b. PowerShell: 1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$_)) "server listening on TCP port $_" }
    7. Check firewall settings if step 5 or 6 connectivity test fails
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Web Matrix FTP Remote Connection Error - "Connection Error - Failure to get file list from server. An entry with the same key already exists."

    Does anyone have experience with this issue when connecting to a Linux FTP Web Server running a FTP Site?
    "Connection Error - Failure to get file list from server. An entry with the same key already exists."
    I cannot access the root directory of the ftp file server using Web Matrix 3. The site is .php based, and
    is accessible when connecting with FileZilla or Remote Connecting via FTP with Visual Studio.
    All sites have been deleted from Web Matrix, the user Application Data has been cleared and Web Matrix has been reinstalled.
    Issue Persists....
    Thanks in advance,
    Justin

    Turns out that the program leaves metadata in your app data folder that is not removed upon uninstallation of the software.
    This is incorporated to communicate with a file that uploaded into the ftp directory when publishing pages.

  • SQL Server Express 2008 no longer accepting remote connections

    Last night our SQL Server Express 2008 (running on Windows 2003 server) stopped accepting remote connections. 
    1. We restarted the SQL Server -- no resolution.
    2. We rebooted the host Windows 2003 server - no resolution.
    3. telnet localhost 1433: says Could not open connection to the host on port 1433... connection failed.
    4. netstat -an indicates that the server is not listening on port 1433
    5. SQL Server Network Configuration -> Protocols for SQLEXPRESS2008A -> (properties) -> TCP-IP (enabled), Listen All (yes)
    6. SQL Native Client 10.0 Configuration -> Client Protocols -> (properties) TCP-IP (enabled), Default port (1433)
    Fragment from the server error log:
    2014-03-26 08:50:41.09 Server      A self-generated certificate was successfully loaded for encryption.
    2014-03-26 08:50:41.11 Server      Server is listening on [ 'any' <ipv4> 1026].
    2014-03-26 08:50:41.11 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS2008A ].
    2014-03-26 08:50:41.11 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS2008A\sql\query ].
    2014-03-26 08:50:41.11 Server      Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the
    trace flag 7806. This is an informational message only. No user action is required.
    2014-03-26 08:50:41.11 Server      The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b, state: 3. Failure to register an SPN may cause integrated authentication
    to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
    2014-03-26 08:50:41.11 Server      SQL Server is now ready for client connections. This is an informational message; no user action is required.
    2014-03-26 08:50:41.29 spid10s     Clearing tempdb database.
    2014-03-26 08:50:41.89 spid10s     Starting up database 'tempdb'.
    2014-03-26 08:50:42.09 spid13s     The Service Broker protocol transport is disabled or not configured.
    2014-03-26 08:50:42.09 spid13s     The Database Mirroring protocol transport is disabled or not configured.
    2014-03-26 08:50:42.14 spid13s     Service Broker manager has started.
    2014-03-26 08:50:42.14 spid7s      Recovery is complete. This is an informational message only. No user action is required.
    2014-03-26 08:50:53.48 spid51      Attempting to load library 'xpstar.dll' into memory. This is an informational message only. No user action is required.
    2014-03-26 08:50:53.48 spid51      Using 'xpstar.dll' version '2007.100.1600' to execute extended stored procedure 'xp_enumerrorlogs'. This is an informational message only; no user action is required.
    2014-03-26 08:51:35.68 spid54      Starting up database 'Web TimeSheet2'.
    2014-03-26 08:51:38.47 spid54      Recovery is writing a checkpoint in database 'Web TimeSheet2' (6). This is an informational message only. No user action is required.
    Note: the lines referring to xpstar.dll is new after this porblem.  Previous logs do not have this,Any help will be appreciated.

    Hi,
    >>Server is listening on [ 'any' <ipv4> 1026].
    Your sql server is not listening on default port 1433 but on 1026.When you connect to instance like hostname\instancename you should specify post no also.
    like hostname\instancename ,1026
    Can you try this.Makes sure TCP/IP and named pipes protocol is enabled
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

Maybe you are looking for