Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

S p k 521

@S p k 521
About
Posts
46
Topics
16
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to capture credentials / auth token from Windows credential popup dialog?
    S S p k 521

    Ok. Sorry it's under the new tab. My mistake.

    C# help tutorial sysadmin hardware security

  • How to capture credentials / auth token from Windows credential popup dialog?
    S S p k 521

    Hi Experts,

    I have a requirement to access a connected printer device through their embedded web server.
    The device had an option to secure its details using username and password.
    Once it is set, we can only communicate through "https" to that device.
    Also there is windows credentials popup will come from UWP app once we initiate communication through https and wait for the user to enter the correct username and password as in web server.

    My requirement is we need to pass those credentials as authorization header for a POST request to that device.

    eg:-
    Authorization: Basic YWRtaW46MTIzNDU2Nzg5

    How to access those Windows credentials in UWP app. Without this authorization token, i am getting HTTP:401 unauthorized error for the POST request.

    Please guide me to resolve this issue.

    What I have tried:

    I tried hard coding the username and password entered in the web server.

    var username = usrName;
    var password = pwd;
    var base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
    _httpClient.AuthorizationHeader = new KeyValuePair("Basic", base64String);

    then in this case the POST request is successful.

    Also tried the same in a separate test application. In that case after entering the credentials in the windows credentials popup the same POST request is again sending automatically with those credentials as Basic auth token.

    Regards
    Spk

    C# help tutorial sysadmin hardware security

  • Out of Memory Exception in C++
    S S p k 521

    Have you tried catching std::bad_alloc exception?

    C / C++ / MFC help c++ performance question

  • Problem declaring data type
    S S p k 521

    please include that headerfile..

    C / C++ / MFC question c++ help

  • WinSNMP
    S S p k 521

    supports snmp v2.

    C / C++ / MFC

  • LogOff event in ActiveX control
    S S p k 521

    Hi Experts, I have a problem. I need to do several cleanup jobs , when the system log off. I tried it by using WM_QUERYENDSESSION on Activex Control class. But it is not working. Please help me. Thanks, Spk.

    C / C++ / MFC help com

  • Plugin for activex
    S S p k 521

    Hi Experts, How to write a plugin(firefox) for an activex control. please give me some clues regarding this. I have searched many times but didn't got a proper way... Regards, Spk521

    C / C++ / MFC com tutorial

  • Change Image size
    S S p k 521

    Hi John, You can use DrawImage() to rescale images... Regards, Spk521

    C / C++ / MFC question winforms graphics

  • Image Flickering
    S S p k 521

    Hi John, You can solve your problem by implementing double buffering concept...ie you can do all the drawings in a bitmap and once your drawings are over just bitblt it in to your client DC.. Regards, spk521

    C / C++ / MFC question graphics

  • HextoCString conversion
    S S p k 521

    thank you very much experts...

    C / C++ / MFC

  • HextoCString conversion
    S S p k 521

    Thanks laj its working....

    C / C++ / MFC

  • HextoCString conversion
    S S p k 521

    ys.. i need to convert hex to its corresponding ascii value...

    C / C++ / MFC

  • HextoCString conversion
    S S p k 521

    Hi All, Please let me know some hints to convert a hex value to a string.. Regards, Spk521

    C / C++ / MFC

  • Draw using GDI+
    S S p k 521

    Please include code containing the drawing part...

    C / C++ / MFC graphics question winforms

  • CMyStatic refresh problem
    S S p k 521

    call UpdateData(FALSE);

    C / C++ / MFC graphics help tutorial question

  • 32 bitmap and gdi+ problem
    S S p k 521

    Thats based upon your requirement... if you need to convert 80% of the bitmap alpha values use this sample one... ColorMatrix colorMatrix = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.8f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}; ImageAttributes imageAtt; imageAtt.SetColorMatrix(&colorMatrix, ColorMatrixFlagsDefault, ColorAdjustTypeBitmap); Regards, Spk

    C / C++ / MFC graphics winforms help tutorial

  • 32 bitmap and gdi+ problem
    S S p k 521

    You have to specify Colormatrix and load it via ImageAttributes' SetColorMatrix() before using DrawImage() Regards, Spk

    C / C++ / MFC graphics winforms help tutorial

  • ComboBox
    S S p k 521

    Did you set the style of ComboBox as CBS_OWNERDRAWVARIABLE?

    C / C++ / MFC graphics

  • File Conversion
    S S p k 521

    Hi Experts, Please let me know if any method is there to convert .json file to .po/.pot file in python script.. I have used Gettext library to parse po files and convert it to .json. But can't found any one to parse po files... Regards, Spk

    Linux, Apache, MySQL, PHP python tools json

  • Restrict Window move
    S S p k 521

    You restrict your window's size by handling the WM_GETMINMAXINFO message. LRESULT OnGetMinMaxInfo ( WPARAM wParam, LPARAM lParam ) { MINMAXINFO* pmmi = (MINMAXINFO*) lParam; pmmi->ptMinTrackSize.x = 100; pmmi->ptMinTrackSize.y = 150; pmmi->ptMaxTrackSize.x = 600; pmmi->ptMaxTrackSize.y = 400; return 0; }

    C / C++ / MFC help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups