I have a website which uses OLEDB to connect to MS SQL Analysis Server Services. I use C++ to call OLEDB APIs, and build it as DLL, which is loaded into IIS and called by my website. I can successfully connect to data source by calling OLEB APIs if I run C++ module locally, but my website fails to connect to data source in IIS.
The error message is "An error was encountered in the transport layer". According to MSDN documents, it's an authentication problem. But anonymous user is allowed in data source side.
And it's curious that my website can run normally in VS2010 built-in web server. One thing I noticed is both VS2010 built-in web server and local C++ module are running with my current use account, and IIS is running with Network Service account. So I configured IIS using my current use account according to this article. But IIS still cannot connect to data source.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- thread_local variables initialization
I've solved this problem. The identity of thread in IIS used to handle request is affected by many options according to this document. When impersonate is true and authentication mode is Windows, if IIS uses anonymous authentication, , the identity of thread is MACHINE\IUSR_MACHINE. This account is not trusted by data source. Use other authentication modes for IIS and login into IIS with account is trusted by data source can solve this problem