9

I can not understand the difference between these two concepts "service or service-like process".

At msdn WinHTTP vs. WinINet page says:

When selecting between the two, you should use WinINet, unless you plan to run within a service or service-like process that requires impersonation and session isolation.

At msdn note for WinInet function says:

Note WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).

What "service or service-like process that requires impersonation and session isolation" means?
"WinINet does not support server implementations" refers to run on Windows Server?
If my application run with IIS Have I to use WinHTTP instead WinInet?

2 Answers 2

6

WinINet was designed for human facing applications, and in some cases it displays error messages and connection popups on the user screen. If you use it from a service, or otherwise there is no human that can dismiss the popup, it will block your application. That is why you should not use WinINet unless you are sure user sitting in front of computer and waiting to dismiss the "Setup connection" dialog or error messages.

If my application run with IIS Have I to use WinHTTP instead WinInet?

Neither. IIS has its own HTTP stack with HTTP.sys driver running in kernel mode

1

If my application run with IIS Have I to use WinHTTP instead WinInet?

If your application is a ISAPI-DLL, the DLL runs in the service-context of IIS. Therefor you should use WinHTTP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.