Question: I am trying to add page with custom extension, say .asp2 with my set of html tags.
Now whenever i try to access the page on browser...it asks me "Save as". This happens because I am using an extn which the server is not able to recognise.
What should I do to so that my server, IIS 5.1 recognises this extension??

Please suggest

Also please suggest on how to associate custom events on such custom page?

Answer: 
std::string generally should not be part of a public interface of a library distributed in binary form (object, static lib, or DLL). But libcurl is pretty intelligently designed, probably the std::string support is provided by an include file (that's ok) which converts things to a portable format before calling into the library.

I think you just need to be careful to link your debug builds with the debug version of libcurl, and your release builds with the release version. Otherwise part of your program wants msvcrt.lib and part wants msvcrtd.lib, and they conflict if you try to use both at once.

EDIT in response to the asker's comment:

There's a dropdown combo box in the compile/build toolbar, that lets you select between Debug and Release configurations.

Also, the Linker "Additional Inputs" setting in the project properties can have different values for Debug and Release. Probably the debug version should use "libcurld.lib" and the release version "libcurl.lib", but not everyone follows that same convention.

If you added the .lib file to your project instead of listing it in the link options, you can still do this by adding both variants and setting "Exclude this file from the build" appropriately. But this looks ugly and will confuse anyone else who works on the project. I would use the Linker options in the project properties.
```
    //login
    curl_easy_setopt(handle,CURLOPT_USERNAME,username);
    curl_easy_setopt(handle,CURLOPT_PASSWORD,password);

    m_popsAccount = "pop3s://pop.gmail.com:995/"; //this URL only returns the list of emails with "[index] [size]" format

    curl_easy_setopt(handle, CURLOPT_URL, m_popsAccount.c_str());
    curl_easy_setopt(handle, CURLOPT_USE_SSL, CURLUSESSL_ALL); 
    curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0); 
    curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0); 

    curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(handle, CURLOPT_VERBOSE, 1); 

    curl_easy_setopt(handle, CURLOPT_WRITEDATA, (void *)&chunk);
    //some servers needs this validation
    curl_easy_setopt(handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");

    res = curl_easy_perform(handle); 

    if(res != CURLE_OK)
    {
        fprintf(stderr, "curl_easy_perform() failed: %s\n",
            curl_easy_strerror(res));
    }
    else 
    {
        printf("%s\n",chunk.memory); //here is the information
    }

    if(chunk.memory)
        free(chunk.memory);
    /* always cleanup */ 

    curl_global_cleanup();
}

```

here is the code that you need to make the request... as you could see, you must create a static method called WriteMemoryCallback which is coded like this:

```
struct MemoryStruct {
    char *memory;
    size_t size;
};  

size_t MailServer::WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
    size_t realsize = size * nmemb;
    struct MemoryStruct *mem = (struct MemoryStruct *)userp;

    mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1);
    if(mem->memory == NULL)
    {
        /* out of memory! */ 
        printf("not enough memory (realloc returned NULL)\n");
        return 0;
    }

    memcpy(&(mem->memory[mem->size]), contents, realsize);
    mem->size += realsize;
    mem->memory[mem->size] = 0;

    return realsize;
}  

```

This solution works perfectly for me, and stores the info inside **chunk.memory** member.
Tell me if it was useful for you!