Ok. Sorry it's under the new tab. My mistake.
S p k 521
Posts
-
How to capture credentials / auth token from Windows credential popup dialog? -
How to capture credentials / auth token from Windows credential popup dialog?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 YWRtaW46MTIzNDU2Nzg5How 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 -
Out of Memory Exception in C++Have you tried catching std::bad_alloc exception?
-
Problem declaring data typeplease include that headerfile..
-
WinSNMPsupports snmp v2.
-
LogOff event in ActiveX controlHi 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.
-
Plugin for activexHi 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
-
Change Image sizeHi John, You can use DrawImage() to rescale images... Regards, Spk521
-
Image FlickeringHi 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
-
HextoCString conversionthank you very much experts...
-
HextoCString conversionThanks laj its working....
-
HextoCString conversionys.. i need to convert hex to its corresponding ascii value...
-
HextoCString conversionHi All, Please let me know some hints to convert a hex value to a string.. Regards, Spk521
-
Draw using GDI+Please include code containing the drawing part...
-
CMyStatic refresh problemcall UpdateData(FALSE);
-
32 bitmap and gdi+ problemThats 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
-
32 bitmap and gdi+ problemYou have to specify Colormatrix and load it via ImageAttributes' SetColorMatrix() before using DrawImage() Regards, Spk
-
ComboBoxDid you set the style of ComboBox as CBS_OWNERDRAWVARIABLE?
-
File ConversionHi 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
-
Restrict Window moveYou 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; }