“operation not supported” when invoking an RPC call on Windows 2008 - c++

The application uses Microsoft RPC for interprocess communications. The application works flawlessly on Windows Server 2003 (Server WS2003 or WS 2008 --- Client WS2003). But the application fails when the client is on Windows Server 2008.
Here is the flow of client part
RpcStringBindingCompose(.....)
RpcBindingFromStringBinding(.....)
RpcMgmtIsServerListening(....) //This method returns success even on WS2008
After this whenever i call a method rpcMethod(...) defined in IDL file (code generated using MIDL compiler 6.00.0366), it thorws an exception (Error Code 1764) "Operation is not Supported".
The MIDL-generated stub redirects to NdrClientCall2() which throws this exception.
Similar issue reported here: Operation is not supported

Related

OPENSSL ERROR C++ 17 error:80000005:system library::Input/output error when passing path to client cert file

I am trying to create a TLS GUI Client using c++/WinRT.
The TLS Client I am using is https://github.com/embeddedmz/socket-cpp
For some reason when I try to connect to the socket server the connection fails when using the BlankApp(C++/WinRT Template) and no errors thrown.
When I test it with the blank console application, it works. Everything is the same across the board except the one being a console application and the other being a BlankApp(C++/WinRT Template) application.
Any ideas would be appreciated.
C++ Version: IS0 C++ 17 Standard
**Update 12/16/2022 **
I finally got OPENSSL to print errors to Visual Studio Debugger.
I have the following error.
Code that fails
int e = SSL_CTX_use_certificate_file(m_SSLConnectSocket.m_pCTXSSL, m_strSSLCertFile.c_str(), SSL_FILETYPE_PEM)
That function should return a 1 but returns -2147483643 and this is the error in I get from ERR_error_string method:
error:80000005:system library::Input/output error

grpc client c++ that runs in windows code is not connecting to the grpc server

The grpc server and client were build on visual studio 2017 with out any error. but the client application is giving error message when i tried to connect it with the server
E0924 12:32:13.475000000 5800 resolver_registry.cc:80] don't know how to resolve 'localhost:50051' or 'dns:///localhost:50051'
E0924 12:32:13.497000000 5800 resolver_registry.cc:80] don't know how to resolve 'dns:///localhost:50051' or 'dns:///dns:///localhost:50051'
E0924 12:32:13.525000000 5800 channel.cc:99] channel stack builder failed: {"created":"#1569308533.525000000","description":"resolver creation failed","file":"E:\Grpctest\grpc\src\core\ext\filters\client_channel\resolving_lb_policy.cc","file_line":233}
{
std::string address("127.0.0.1:50051");
MathTestClient client(
grpc::CreateChannel(
address,
grpc::InsecureChannelCredentials()
)
);

Linking two libraries that uses openssl

platform: GNU/Linux Debian Etch 32b
libcurl 7.37.1
qt 4.8.1
openssl 0.9.8
Above is a schema with the dependencies of my app (only the one involved in this question)
+-----------------+
| application |
+-----------------+
| libcurl | libqt |
+-----------------+
| libssl |
+-----------------+
My c++ application is based on qt 4.8.1 but for some http/network operation we use libcurl
Both libs are compiled with the ssl support
Im facing a really strange error scenario:
Object1 runs a curl_easy_perform() to an https site. The call reports an error. The curl_error_buffer contains:
error setting certificate verify locations: CAfile:
/etc/ssl/certs/ca-certificates.crt CApath: none
Later on Object2 calls QSslSocket.write()
This second call generates a QTcpError.
The error string reported by the QSslSocket is:
TCP Error: Error while reading: error:02001002:system library:fopen:No such file or directory, error:2006D080:BIO routines:BIO_new_file:no such file, error:0B084002:x509 certificate routines X509_load_cert_crl_file:system lib
Both objects live in the same application thread.
Tracing the application behavior with gdb it seems like:
The X509_load_cert_crl_file call is performed inside the curl_easy_perform()
When the method QSslSocket.write() is called, the function: X509_load_cert_crl_file is not called netherless the SSL stack returns to the qt network stack the above error.
My idea is that the SSL lib state is somehow global (i.e. errno) and/or shared between two library (qt and libcurl) and performing the QSslSocket.write() we got the error state previously set by the libcurl call.
Does it make any sense?
I'm I using the libcurl the wrong way, so that it is leaving the ssl connection in some inconsistent state?
Please note that the qt write method actually perform internally a write AND a read from the socket. After that the state of ssl is checked with SSL_get_error
(Qt code here: https://github.com/qt/qt/blob/v4.8.1/src/network/ssl/qsslsocket_openssl.cpp#L1140)

SQLBulkOperations Error HY092, Invalid Attribute/Option Identifier

SQLBulkOperations returns SQLState=HY092. The message is
[Microsoft][SQL Server Native Client 10.0][Invalid Attribute/Option Identifier].
I have tried everything, including the latest version of SQL server 2008 R2 Native Client Setup from Microsoft. I have used several differing databases and servers, with the same result. I am essentially using the sample code provided by Microsoft for SQLBulkOperations, although I have attempted modification of that code with the same result.

mysql and c++ in vs 2010: sqlstatementhandle and connection error

I finally solved my problem:
I had been using a lib of mysql that was not compiled with the same settings as the VS10 project. Doing this solved my issue
This was my issue
I am having some trouble, and i was wondering if anyone could give me a push in the wright direction.
I am trying to connect to a local Mysql database, using c++ in VS 2010.
On phpmyadmin i can see that an attempt to connect is made but doesn't succeed.
When building the application, i get some errors.
The first where char* errors. I solved that by changing from unicode to multi byte.
The most important error, i think, is this one:
warning C4700: uninitialized local variable 'sqlstatementhandle' used.
After the application crashes i get this in visual studio:
Run-Time Check Failure #3 - The variable 'sqlstatementhandle' is being used without being initialized.
In the console i get this:
Connecting to SQL...
Connect() - SQL_ERROR
Message: [Microsoft][ODBC SQL Server Driver]Fout in het dialoogvenster
SQLSTATE: IM008
In the documentation i found that error code 008 refers to:
Dialog failed
SQLDriverConnect
But i don't really now how this can help? Is the driver not able to connect, or is the driver not loaded at all? As I told earlyer, i can see in phpmyadmin that there are failed attempts to connect.
my setup: visual studio 2010 and a mysql server administrated true Xampp. A 64bit windows 7 machine.
In connection string, Driver shows "Sql Server". Perhaps Connection String is problem. Try to change it. This site will help you.
http://www.connectionstrings.com/mysql#p31