|
difference between interface and abstract class in c#
|
|
|
|
|
Have you never been taught how to search for your own information? The three questions you have asked here could all be answered with simple Google searches.
This space for rent
|
|
|
|
|
difference between api and web services
|
|
|
|
|
I'm sorry but I have to conclude that you are a help vampire[^].
This space for rent
|
|
|
|
|
I have a .NET (not MVC or ASP.NET) application (which is an Excel plugin), which performs 1 REST call for data (REST call is a protected resources - requires authenticated user). Currently this Excel plugin authenticates with the REST backend using basic authentication (with username/password input fields). Users are authenticated on a Windows domain.
Problem
I want to get rid of the username/password inputs and start using SAML2 to achieve true single signon for these users.from within this .NET application.
Question 1: Is it possible to perform client-side SAML2 authentication for my app?
Which framework/library to use?
If it is possible (I hope so...), I found this info:
"No is official C# client-side protocol stack", but there are various 3rd party libraries which implement SAML2", but these seem all focused on ASP.NET.
Sustainsys.Saml2
OneLogin
AspNetSaml
ITfoxtec
I've tried several libraries but they all seem to want to redirect the user (in browser - which I don't use in the app) to a specific endpoint.
I am no .NET guru, so if it is possible, any library with a clear example/tutorial would be really appreciated.
Thanks
Katherine
|
|
|
|
|
Hi all,
We created a windows application, we are going to sale it but we need to create a license key for that application
license key should be valid for one user and one time only
any other suggestion..
|
|
|
|
|
And you are looking for what exactly? How to do that from code, or do you want to download an application that provides these services? Have you tried Google?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Member 14064585 wrote: any other suggestion.. There are a lot of different ways to do licensing. I would suggest searching the internet and finding the approach that works for you.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Please excuse me if this is not the correct forum for my question. I would like to know if I can prevent users from seeing the markups and scripts of my page if I display it in a Winform and calling Javascript from C#.
modified 20-Nov-18 1:17am.
|
|
|
|
|
They can see any request with fiddler. If you provide a WinForm, I will decompile that too.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
You can't completely prevent the users of your site, no matter what they use as a browser, from seeing the markup and script code.
|
|
|
|
|
Depends on how sophisticated the "user" is.
You can start by trapping "right mouse clicks" ... to disable the context menu "popup" for "View Source".
Then go from there: transparent panels, keyboard lockouts, etc. (i.e. "kiosk" mode).
Transfer content encrypted and "serve locally" (to defeat "fiddling").
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
can any one help me to write this java function by vb.net
public static String HmacSha256Encode(String key, String data) {
try {
Mac sha256_HMAC = Mac.getInstance("HmacSHA256");
SecretKeySpec secret_key = new SecretKeySpec(Base64.decodeBase64(key.getBytes("UTF-8")),"HmacSHA256"); sha256_HMAC.init(secret_key);
return new String(Base64.encodeBase64(sha256_HMAC.doFinal(data.getBytes("UTF-8"))));
}catch (Exception e) {e.printStackTrace();
}
return null;
}
|
|
|
|
|
Try:
Public Shared Function HmacSha256Encode(ByVal key As String, ByVal data As String) As String
Dim secret_key As Byte() = Convert.FromBase64String(key)
Dim data_bytes As Byte() = Encoding.UTF8.GetBytes(data)
Using hash As New HMACSHA256(secret_key)
Dim result_bytes As Byte() = hash.ComputeHash(data_bytes)
Return Convert.ToBase64String(result_bytes)
End Using
End Function
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
Please help me how to add text from text file and put it on the datagridview here is my code:
Dim FileLine As String
Dim LineLength As Integer
Using sr As New StreamReader("C:\Users\WIN 7\Desktop\rmsbp050_09032018.txt")
While Not sr.EndOfStream
FileLine = sr.ReadLine()
LineLength = FileLine.Length
If LineLength = 59 Then
DataGridView1.Rows.Add(FileLine.ToString, sr.ReadLine() & vbNewLine, sr.ReadLine() & vbNewLine & vbNewLine, sr.ReadLine() & vbNewLine & vbNewLine & vbNewLine)
End If
End While
End Using
Here is the sample text file :
BANK NAME 15 CUSTOMER INFORMATION SYSTEM *RMR100 * PAGE NO 1
CTL 2 000 PNB SAVINGS BANK MONDAY PROCESS DATE 09/03/18
CTL 3 000 ACTIVITY *RM 100* PROCESS THRU 09/03/18
CTL 4 0000 CURRENT DATE 09/03/18
BRANCH 0000 - PNB SAVNGS BANK
CUSTOMER NAME CUSTOMER NBR CUSTOMER INITIATED?
TRAN DATE TIME FIELD DESCRIPTION ACT TRAN ID AFTER
EMPLOYEE TERMINAL LST MNT DATE LST MNT TIME BEFORE
KEY
CO, CARLOS VERA 00000004676090 N
09/03/18 10:21:42 RESP BR MNT RM1P 0000
15-000-1027993 B112 03/29/2017 02:16:23
09/03/18 10:21:42 SRC OF FUNDS MNT RM1P PENSION
15-000-1027993 B112 03/29/2017 02:16:23 SSS PENSIO
09/03/18 10:21:42 ACT OFFICER ID MNT RM1P 869376
15-000-1027993 B112 03/29/2017 02:16:23 00305294
09/03/18 10:21:42 DT LST RM ACTV MNT RM1P 20180903
15-000-1027993 B112 03/29/2017 02:16:23 20170329
09/03/18 10:21:42 CL RISK CLASS MNT RM1P B
15-000-1027993 B112 03/29/2017 02:16:23 C
09/03/18 10:21:42 CHK USER ID MNT RM1P 1027993
15-000-1027993 B112 03/29/2017 02:16:23 00144193
09/03/18 10:21:42 PH NBR MNT RM1P .
15-000-1027993 B112 03/29/2017 02:16:23 0 0 0
R 01 N
09/03/18 10:21:42 PH ISO CTRY CD MNT RM1P PH
15-000-1027993 B112 03/29/2017 02:16:23
R 01 N
09/03/18 10:21:42 PH NBR MNT RM1P 09091232585
15-000-1027993 B112 03/29/2017 02:16:23 639091239585
M 01 N
09/03/18 10:21:42 CITIZENSHIP MNT RM1P PH
15-000-1027993 B112 03/29/2017 02:16:23
09/03/18 10:21:42 SPOUSE NAME MNT RM1P CRISTINA GARCIA CO
15-000-1027993 B112 03/29/2017 02:16:23 CRISTINA CO
09/03/18 10:21:42 EMPR NAME ADD RM1P NA
15-000-1027993 B112 03/29/2017 02:16:23
00000000 00000000 NA
09/03/18 10:22:15 LENDING UNIT MNT RMLC 6041
15-000-1027993 B112 09/03/2018 10:21:42 1830
09/03/18 10:22:15 LOAN OFF MNT RMLC 869376
15-000-1027993 B112 09/03/2018 10:21:42 305294
CO, CARLOS VERA 00000004676090 N
09/03/18 10:22:15 CALC CRR MNT RMLC 5
15-000-1027993 B112 09/03/2018 10:21:42
It should be output like this :
http://i346.photobucket.com/albums/p421/Christopher_Alexis_Santor/Capture_zpspidlvxsa.png[^]
Thank you,
modified 14-Nov-18 19:05pm.
|
|
|
|
|
|
The problem is all of the dates are the same btw the text file is daily activity logs.
|
|
|
|
|
Sorry, but you have still not given a proper explanation of what you are trying to achieve.
|
|
|
|
|
hi sir,
I need to put the string from text file to datagridview but the dates and the other columns should be aligned with one another just like the output that i provided above. The linelength above is the customer no that is the length of the string which is set to 59 in the text file example is CO, CARLOS VERA 00000004676090 N
Here is the sample text file :
BANK NAME 15 CUSTOMER INFORMATION SYSTEM *RMR100 * PAGE NO 1
CTL 2 000 PNB SAVINGS BANK MONDAY PROCESS DATE 09/03/18
CTL 3 000 ACTIVITY *RM 100* PROCESS THRU 09/03/18
CTL 4 0000 CURRENT DATE 09/03/18
BRANCH 0000 - PNB SAVNGS BANK
CUSTOMER NAME CUSTOMER NBR CUSTOMER INITIATED?
TRAN DATE TIME FIELD DESCRIPTION ACT TRAN ID AFTER
EMPLOYEE TERMINAL LST MNT DATE LST MNT TIME BEFORE
KEY
CO, CARLOS VERA 00000004676090 N
09/03/18 10:21:42 RESP BR MNT RM1P 0000
15-000-1027993 B112 03/29/2017 02:16:23
09/03/18 10:21:42 SRC OF FUNDS MNT RM1P PENSION
15-000-1027993 B112 03/29/2017 02:16:23 SSS PENSIO
09/03/18 10:21:42 ACT OFFICER ID MNT RM1P 869376
15-000-1027993 B112 03/29/2017 02:16:23 00305294
09/03/18 10:21:42 DT LST RM ACTV MNT RM1P 20180903
15-000-1027993 B112 03/29/2017 02:16:23 20170329
09/03/18 10:21:42 CL RISK CLASS MNT RM1P B
15-000-1027993 B112 03/29/2017 02:16:23 C
09/03/18 10:21:42 CHK USER ID MNT RM1P 1027993
15-000-1027993 B112 03/29/2017 02:16:23 00144193
|
|
|
|
|
I still do not understand what the problem is. The solution to such a problem is reasonably simple:
- Read each line of text.
- Split the text into its separate fields.
- Add a new row to the datagrid.
- Add the data fields to the relevant columns of the row.
Since not all lines of the text file are in the same format you need to test which fields are contained in the line before adding them.
|
|
|
|
|
Member 13637678 wrote: It should be output like this : This will sound rude to you, but you either need to find a programmer, or learn the basics.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I had created a windows application thatcontains 4 forms and 1 class, the class is
Public Class cMyButton
Inherits Button
Dim m_Form As Form
Public Property FormToOpen As Form
Set(ByVal value As Form)
m_Form = value
End Set
Get
Return m_Form
End Get
End Property
Private Sub cMyButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
m_Form.ShowDialog()
End Sub
End Class
what i want is, when i put the control cMyButton to the stage, and i select the property FormToOpen from the property window, a menu including the 4 forms of the application appears to select one of them. now it appears only the current form
Hisham Shaaban
|
|
|
|
|
This is cute and all but this is kind of useless. ShowDialog returns a value about how the dialog was dismissed. You have no way of returning that value back to the code in the container of your button. The code will have no way of knowing if the dialog was modified and the data in it should be used or if it was canceled and the data ignored.
If you change the ShowDialog to just Show, you now have another problem. Forms have to be Disposed when you're done with them. Since the button code holds the reference to the form and the button Click handler will be done executing, the button will not be able to properly Dispose the form and your app will leak resources.
|
|
|
|
|
Hello All
I have multiple installers along with my application where in I want to bundle all of them to one single setup file. When user wants to install the software, I would like to make sure all installers install first before installing my application files.
Using MS Visual studio Installer project, I have tried to do this but failed to create a single setup file.
Request you to guide me or provide some pointers on how I can do this.
Best Regards
Sudhakar
|
|
|
|
|
Don't report the question in multiple forums.
Asked and answered in QA, here[^].
|
|
|
|