Categories
Mastering Development

Digital signatures invalid when I use the iTextSharp

This is my Form – Following are the code – private void btnSign_Click(object sender, EventArgs e) { string sbase64 = richTextBox2.Text; byte[] bytes = System.Convert.FromBase64String(sbase64); PdfReader reader = new PdfReader("F:\\test1.pdf"); FileStream os = new FileStream("F:\\output.pdf", FileMode.Create); IExternalSignatureContainer external1 = new MyExternalSignatureContainer(bytes); MakeSignature.SignDeferred(reader, "Signature1", os, external1); reader.Close(); os.Close(); } private class MyExternalSignatureContainer : IExternalSignatureContainer { protected […]

Categories
Mastering Development

Unable to get custom appearance in Digital Sign using itext7

Appreciate any help as I am using itext7 java custom appearance during Digital Sign. Though I am using example from itext7, somehow it is not reflecting neither image nor text post sign. I have pasted the code below. Thanks in advance. import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.PrivateKey; […]

Categories
Mastering Development

The SSL connection could not be established. Authentication failed

I got an error of "The SSL connection could not be established, see inner exception. Authentication failed, see inner exception." when trying to POST request over SSL via C# HttpWebRequest(have tried RestSharp and HttpClient the result is the same). I also tried all the possible resolutions mentioned on the web, like: ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, […]

Categories
Database Development

Optimal selection of predefined non-materialised data

Take the following result set as an example: Store Category Item Cost Stock Sold Ordered ABC Accessories Lock 344.31 281 141 225 DEF Components Chain 24.15 312 53 45 GHI Other Gloves 57.50 121 102 100 … We are looking to demo a feature for our application and this requires us to pull data in […]

Categories
Mastering Development

Why training a RNN timeseries forecast model stops after a few iterations using GluonTS?

I am trying to build an RNN model for time-series forecasting using GluonTS. I am following the official documentation example here: https://gluon-ts.mxnet.io/examples/extended_forecasting_tutorial/extended_tutorial.html#5.4-From-feedforward-to-RNN I have a categorized time-series data (Github Gist of the CSV is here), that I am trying to use for building a forecast model. The first epoch of the model training begins but […]

Categories
Mastering Development

Jupyter on Linux: URLError:

I am currently just following a tutorial showing how to use the pandas library and I can across this error. I’m still new to the whole scene so I’m not entirely sure what’s going on or how to interpret this error: ————————————————————————— SSLCertVerificationError Traceback (most recent call last) /snap/jupyter/6/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args) 1316 […]

Categories
Mastering Development

Using https connection for source image in Xamarin forms

I’m developing an app using Xamarin Forms (4.5.0.356). I have to show an image which come from an HTTPS links using the default bind: <Image Source=”{Binding PhotoURL}” /> At runtime I have the error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:219) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126) […]

Categories
Development System & Network

Fail2Ban not banning, Regex shows many fails in logs

I have the following jail defined in my /etc/fail2ban/jail.conf. For privacy/security I’ve replaced references to IPs with local 10.0.0.x addresses. [ssh-iptables] enabled = true filter = sshd banaction = iptables[name=SSH, port=ssh, protocol=tcp] logpath = /var/log/secure backend = auto findtime = 18000 bantime = 65535 maxretry = 5 Using the filter available here for sshd. I […]

Categories
Development

WebApi and Xamarin.Forms [Android Emulator] Bad Request

Every time I tried to consume my web Api with my android emulator, It doesn’t work. I tried the simple get values but It didn’t work : public async void Test() { HttpClient httpClient = this.HttplicentAccount; var uploadServiceBaseAdress = “https://192.168.0.19:44336/api/values”; var value = await httpClient.GetAsync(uploadServiceBaseAdress); var status = value.StatusCode; Console.WriteLine(status); } I use : private […]

Categories
Development

Unable able to communicate between two services

I have created two Web API in Asp.net Core one is Wrapper Service to be deployed on DMZ Server and other is core service which have access to our DB Non DMZ. The problem i am facing is that i am unable to communicate between two services. Both are running on local machine through dockers. […]