Http Client Protocol Issues

 

Http Client Protocol Issues

If you use any of these solutions, Please let me know so I can track if any of this is useful to you! Thanks! This is an area to share observations I have made working with Http Client Protocols and the associated technologies. I currently work for the Microsoft team that supports the WinInet, WinHTTP and System.Net API's and classes associated with these technologies. This is not a replacement for Microsoft Support, but an area to discuss these technologies. These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified at Microsoft - Information on Terms of Use

CHttpServer not included in Visual Studio 2008

CHttpServer and CHttpFilter are not included in Visual Studio 2008.  You will get error messages such as: fatal error RC1015: cannot open include file 'afxisapi.rc' fatal error C1083: Cannot open include file: 'afxisapi.h': No such file or directory.  You have to convert your projects to straight ISAPI API calls or come up with some other scheme (such as building the MFC libraries from another version of Visual Studio).  I used the following steps to build a CHttpServer based project in the Visual Studio 2008 environment as a temporary workaround so that you can build your projects based on CHttpServer:

How to build CHttpServer based projects with VS 2008.

The MFC ISAPI classes have been removed from VS 2008.  I suggest you convert over to straight ISAPI calls since in reality these classes are simply a very thin wrapper around ISAPI API’s.  Also, you own the code that you move over and build this way and you will not be able to get any security updates of support if you use this method.

I recently converted a couple of projects that had been built with the MFC wizard in VS 2003.  For these I found by statically linking with the MFC libraries and copying some files from my VS 2005 environment to a local directory in my project, the projects built under VS 2008.

Statically Link with MFC libraries.

1.       Right click on the project, select  ‘All Configurations’ in the top left drop down box

2.       Navigate to ‘Configuration Properties’, ‘General’ and change ‘Use of MFC’ to ‘Use MFC in a Static Library’

Change the C++,  Linker, and Resources to point to a directory containing the legacy libraries, include files and resources.

1.       I created a directory called ‘LegacyMFCISAPI’ in the project directory.  I then copied the following files from my VS 2005 directories:

afxisapi.h

afxisapi.inl

afxisapi.rc

eafxis.lib

eafxis.pdb

eafxisd.lib

eafxisd.pdb

nafxis.lib

nafxis.pdb

nafxisd.lib

nafxisd.pdb

2.       Add this to the Additional Include Directory for C++ and Resources settings to the Additional Libraries Directories for the Linker settings: $(SolutionDir)LegacyMFCISAPI

Build!

(Also see: http://blogs.msdn.com/jpsanders/archive/2008/01/17/building-with-atlserver-based-soap-project-with-visual-studio-2008.aspx for other informaton on building with the CodePlex AtlServer code.  These classes are NOT included in that code however. )

Published Monday, December 10, 2007 3:33 PM by jpsanders
http://blogs.msdn.com/jpsanders/archive/2007/12/10/chttpserver-not-included-in-visual-studio-2008.aspx

你可能感兴趣的:(Http Client Protocol Issues)