Time Synchronization using NetRemoteTOD in vb.net - vb.net

I use NetRemoteTOD() for time synchronization with remote PC. As I understand it requires at least basic permissions from client to access that remote PC. If I just execute NetRemoteTOD(), it gives me Error 5 (Access denied). But when I connect to other PC/Server with no log in credentials it works perfectly.
and here my reference of Time Synchronization using netRemoteTOD
BTW, it's a WINFORM Application.
Question is - How to login to remote PC programmatically?
Any help will be greatly appreciated.

Related

Connecting to my remote SqlServer database

Im currently making a wpf Windows Application, and it withdraws data from a database, so it is needed that I setup a connection to my remote servers SQL Server Database. Now i am getting a couple errors. When I first of all try to connect to my remote servers Sql Server using management studio, just to test if I could actually make a connection, I get the following error.
A connection was successfully established with the server, but then an error occured during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)
(Microsoft SQL Server, Error: 233)
And ovcourse, I did try my best to do my research, and I found out a few things talking about allowing the SqlBrowser in firewall properties, done that...
allowing a connection to port 1433 and port 1434 through windows firewall, done that both.
Is there something Im missing or not doing?
Also it says "a connection was succcessfully established with the server" which means that It is able to connect, but something is going wrong somewhere. Also where it says "error occured during login process" could it simply mean I entered the wrong credentials?
I mean, when installing the SQLExpress I chose Windows Authentication so I never really got a username and password, So i just used the username and password for the Administrator account I use to connect to my server itself. Dont know It could have something to maybe just do with my login.
Could anyone please point me in the right direction as to why Im getting that error, even though I have enabled the TCP Connections and allowed SqlBrowser.
Any help would be greatly appreciated.
Thanks.
This is a bad certificate-related error, probably caused by different operating systems/environmental differences. If this is for testing purposes I'd disable the certificate, or you can configure it here (which is probably a good idea if you're creating a real application and not just playing around with it).
Please run the sql service and agent service by creating new id and start the service with that like ea admin or any other.
The port error will continue to show even if you fix the port ,check telnet configuration and enabled/open port via it.
I had similar problems so i created a virtual server installed sql server2008 r2 and then started it worked fine.
There are possibilities of error and authentication problems since we reuse the server by formatting it .

Getting SqlException, Timeout error

I'm making a WPF application that is data driven and uses dynamic data. Now through the development process on my local computer, everything went fine, the application and my local sql server were functioning perfect.
Now what I did was transfer my database from my local machine to my server, By copying and pasting the database into the SqlServer DATA Folder on my remote server.
Now I'm able to connect to the server just fine, and i made sure to test the connection strings in Visual Studio to make sure it connects, and when i click "Test Connection" it says that the connection was successful.
But now when I try run the application, using the database that is located remotely, I get error:
Sql Exception, Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
And I find it strange because it was working fine 10 minutes ago on my local machine, so I think it must be a setting I have on my remote server or something?
Also I'm using LINQ to SQL, and I've even tried editing the LINQ to SQL Classes (dbml file) and increasing the timeout and such but still get the exact same error. I dont get what I'm doing wrong. Because the whole thing was working not too long ago on my local machine...
Any ideas what the problem is or how I could fix it?
Thanks
This error is generally due to Connection problem between server and the client. There may be a problem in network. Make Sure that database server is accessible from Application machine and no Firewalls are blocking the Connection.

How to configure access from clients to Firebird 2.5 in Windows 2008 Server?

I'd like to access a Firebird DB 2.5 from clients. Firebird is installed in Windows 2008 Server, running and operational. There's no connection problems when trying to do it in the server itself. But I'm not reaching do the same when in clients. I've opened 3050 port in Win 2008 Firewall, but nothing happens. When I test the conection using IBExpert, for example, the following erro message appears:
Attempting to connect to:
XX.XXX.XXX.XX:SuperFireBD\SuperFireDB.FDB
Connecting... Failed!
------------------------------------
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements.
I/O error during "CreateFile (open)" operation for file "SuperFireBD\SuperFireDB.FDB".
Error while trying to open file.
The system cannot find the path specified. .
Attempting to connect to services manager... Passed!
Disconnecting from database... Passed!
I'm operating over a domain, and I'm not sure wether I have all the grants of the domain's network firewall. Thus, how can I test the 3050 port without telnet? What would I doing wrong? Thanks!
It looks to me it is connecting, but Firebird cannot open your database file.
Try an absolute path like x.x.x.x:c:\SuperFireDB\SuperFireDB.FDB
If that works, I highly suggest making use of aliases.conf located in the Firebird install directory. Then, clients only have to connect to x.x.x.x:SuperFireDB or whatever you decide to name it. If you need to move the database file later, you only have to update aliases.conf and not every client.
Hope this helps! Also if you install firebird server on your machine (no need to run it), you can try to connect through Firebird's own command line client (ISQL).
Some help here: http://www.firebirdsql.org/manual/qsg10-connecting.html.
I met the same problem.
Answer is very simple: fbserver.exe process has no permissions to read/write file *.fdb.
I added read/write permissions for the user SYSTEM on file *.fdb (fbserver.exe runs as windows service as user SYSTEM) and problems disappear.

Windows 7 64 Bit - ODBC32 - Legacy App Problem

Good day StackOverFlowlers,
I´m a little stuck (really stuck) with an issue with a legacy application on my organization.
I have a Windows 7 Enterprise 64 Bit machine, Access 2000 Installed and the Legacy App (Is built with something like VB but older) The App uses System ODBC in order to connect to a SQL 2000 DataBase on a Remote Server.
I created the ODCB using C:\Windows\SysWOW64\odbcad32.exe app in order to create a System DSN. I did not use the Windows 7 because it is not visible to the Legacy App.
I tested the ODBC connection with Access and worked ok, I can access the remote database.
Then I run the legacy App as Administrator and the App can see the ODBC, but I´m getting errors on credential validation and I´m getting this error:
DIAG [08001] [Microsoft][ODBC SQL Server Driver][Multi-Protocol]SQL Server does not exist or access denied. (17)
DIAG [01000] [Microsoft][ODBC SQL Server Driver][Multi-Protocol]ConnectionOpen (Connect()). (53)
DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)
I use Trusted Connection on the ODBC in order to validate the user by Domain Controller.
I think that the credentials are not being sent by the Legacy App to the ODBC, or something like that. I don´t have the source code of the Legacy App in order to debug the connection.
Also, I turned off the Firewall.
Any ideas??
Thanks in advance!
When you run it as administrator is it your same account elevated or is it a second account all together?
Try running Access 2000 under that same method and see if it can still access the database. You can also check the SQL server logs to see who the app is trying to authenticate as. This should help you identity where to start looking.

Vista + VB.NET - Access is denied while trying to start/stop a Windows Service from within an application

I get the following error in Vista while trying to start/stop a Windows Service that I created.
Cannot open ServiceName service on computer '.'.
The same code works for XP. What should I do to solve this problem?
User Account Control (aka UAC). UAC means that the user is not running as an administrator. Your application needs to tell windows that it requires admin rights. I think this page explains it better than I can.
Just stumbled upon your question today, though you had asked it a while back :)
I was having a similar problem on Windows Vista while i was trying to start a .net based service that i had developed.
I opened the Properties dialog of the service and changed the Log On user to Local System (Previously i was trying to start the service using Network Service). On restarting the service i didn't get any error.
In case you are still wondering about the answer, this has worked for me. I hope it will work for you too.
Cheers!