The same setup works on Windows 7 / 64 Bit and Windows Server 2008 / 64 Bit:
the Datasnap server application is located on a mounted network drive
registered with tregsvr <drive>:\path\to\server.exe (as Administrator)
the GUID is shown in dcomcnfg
Socketserver and DCOM services are running
The client fails with the error message "Class not registered"
If I move the server app to a local directory, and repeat the tregsvr registration, the client can connect without problems.
What else could I check?
Is the client allowed to connect to the network drive? Since the client is in fact initiating the startup of the server, it should be able to read that network drive (which is exactly what you are seeing, since it works fine if the server is on a local drive)...
The server must not be in any shared network drive
You have to register the server type library on the client side, or DCOM on the client side won't be able to understand what class to instantiate and how to marshall its calls across the network. It is DCOM that will take care of asking the server to instantiate the server application.
In the DCOM connection, you have to tell where the server is (IP or host name).
DCOM must be configured correctly: use DCOMcnfg.exe to configure which user/groups can instantiate and call the server
If you're using the socket server it actually acts as a proxy. It's the socketserver making the DCOM calls on behalf of the client, but still calls are encapsulated inside the packets sent to the socket server.
Solved:
tregsvr the UNC path to the network location of the Datasnap Server (instead of a mounted network drive)
running Socketserver as SYSTEM account is fine, no additional privileges required
After logging off from the server, the Datasnap client still happily connects with the server
The other/old servers are running the Socketserver as an application with the necessary rights :P
Related
since 1-2 months I have problems on some machines in my environment when I try to connect via RDP.
The environment configuration uses a Microsoft PKI (Windows Server Certificate Authority). All computers that are integrated in the domain, request and are given a certificate from:
Computer
RDP (as server)
All machines in the domain have the ROOT CA and SUBCA certificate installed.
The problem is intermittent, on the same machine it does not work, the computer is restarted and for a while it works.
The credentials with which I connect work and the user with which I connect has permissions for RDP (he is a domain administrator).
When I connect using the FQDN (pc1.mydomain.com) the window to enter credentials appears, I enter them correctly and it tells me that the credentials are invalid. I make several tests to verify that I have not made a mistake when entering the credentials. It seems to fail in the connection protection process.
When I connect using IP to the same machine as before, the certificate appears, but if checked, the certificate is valid for the FQDN indicated above, so the certificate is OK (in date, valid and has not been revoked). If I accept the certificate, it starts the connection protection and finally connects.
If I access the same machine physically or through VMWare console, it lets me login correctly.
I have gone to check the Windows event log both in system, as application, as in RDP and I do not see any error, neither in the client from which I connect, nor from the server from which I connect.
If I connect from another machine that is not Windows (Mac) using the Microsoft RDP application, if it lets me connect, even when from Windows it fails.
It happens from several clients and on several machines to which I connect via RDP.
At the Firewall level all the rules are correct, both in the Windows Firewall and in the Network Firewall.
What is the operating system of the pc/server with the issues? I have an issue with an old Windows 2008 r2 server similar to this.
I managed to get remote debugging working on our Windows Server 2008 R2 Server running some ASP.Net WebSites manually (not as a service)
However, I want to run it as a service and I can't figure out how to set it for no authentication as a service or how to specify what users have access to connect to it.
Does anyone know if it has a manual config file somewhere I can modify in notepad, or something of that nature?
I have gone through every checklist I could find for configuring SQL Server I could find. I get the same issue on Windows Server 2008 and Windows 7 Pro. First the environment:
SQL Server Express 2012 --installed as main instance (i.e. no named instances)
IP access turned on
Firewall exception for SQLServer
SQL Server user for application access
Windows Server 2008 service pack 2 (also tested with Windows 7 service pack 1)
IIS 7 (also tested with 7.5 with the same results)
.NET 4.0
Our own database code integrated in a .NET MVC 3 application
We have a tool we developed to import data from the old Ruby on Rails app into the new ASP.NET MVC 3 app. The tool can connect to the database using the user account we created, and that's how I discovered some permissions issues for access to stored procedures. This is the tool we are using to verify the connection works.
Data Source=SERVER_IP,1433;Network Library=DBMSSOCN;Database=MYDB;User ID=webuser;Password=webpassword;multipleactiveresultsets=true;
We are using a straight IP address, but to protect our infrastructure I substituted the IP, username, and password. But this is the structure of the connection string we are using. Following the checklists, I was able to connect from another machine on our network using the import tool to the database and import data. I was also able to import data from the same machine that IIS is installed on.
The same connection string provides the dreaded Error 26 "can't find the database server" message on both Windows Server 2008 and Windows 7 Pro:
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)
I have exhausted every resource I can find, and can't seem to get any closer to an answer. I'm not trying to mount file based database, IIS has read/write access to the web application in any case.
I've ruled out the firewall as a cause for the issue. I've tried the settings with the firewall on and completely turned off. There has to be some other permissions level problem that's happening. Problem is I have no idea what permissions level things I have to check.
After opening a ticket with Microsoft, it turns out I was my own worst enemy. The model classes were set up in their own DLL so I could use them for data migration and other supporting tools for the website.
The DLL was looking in the assembly config for the connection string, and if it wasn't found it would use a reasonable default. Problem is the web application never overrode the location from the Web.config file.
The application couldn't find it because I didn't install the database with the default settings.
I have a service ALOADER which constantly accesses a shared network folder \\10.10.1.100.
Before starting the service ALOADER, i have to make the \\10.10.1.100 visible to the service ALOADER.
The problem is that, the access account of \\10.10.1.100 could not be logged on the service ALOADER, since the \\10.10.1.100 and the server running ALOADER are in different domains.
Instead, I use the "net use \\10.10.1.100" with a local account, and then log on that local account to the service ALOADER.
It works on some servers, but not the others. (the \\10.10.1.100 is accessible on Explorer, but not on the service.)
All the server settings are similar, and the OS is Windows Server 2008 R2.
Looking for your help.
Sincerely,
Jun
In your service you should call NetUseAdd to connect to the network share.
I want to write a application that can send files from server to client:
using windows Remote Desktop login the server from the client.
the application on the server could reversely connect to the client and send several files to the client using the same port as the Remote Desktop.
A application on the client can receive the files.
can't find any solution to do that kind thing. Any idea??
You can do this using Remote Desktop virtual channels. See this blog post for a sample virtual channel application.