Symantec Scan Engine .NET API Error - virus-scanning

I am currently using Symantec Scan engine .NET api for anti virus scanning. I am getting this error "ERR_INITIALIZING_STREAM_REQUEST" - Problem encountered while initializing a stream request to Symantec Scan Engine. But not much details are present. Just object reference error is present in the exception part.

Found the answer.
The problem was with Windows firewall.
Solution:
Go the server (Win 2008R2 in my case.).
Access Windows Firewall with advanced security.
In the InBound Rule, create a new rule for the port(1344 in my case) through which you are gonna access the symantec scan engine
Similarly create an OutBound Rule for the same port.
Run the application... Viola..... it was working!!!!!

Related

SSL/TLS Handshake error while calling Azure Vision API

I have a spring boot based microservice in which I am using Microsoft Azure Computer Vision API to read data from a PDF file. After containerizing the microservice, the container works fine and I am able to send/receive data to/from Computer Vision API on my machine. But, when I run this container on an Azure based Linux Virtual Machine, the container cannot communicate with the Computer Vision API and throws exception java.lang.RuntimeException: javax.net.ssl.SSLKeyException: RSA premaster secret error. Also, the spring-boot jar is able to communicate with Azure on VM and throws no such exception.
Do you think I need to pass any self-signed certificate to the container for it to be able to communicate smoothly?
I think the biggest advantage of using these containers is that it makes the code platform independent. So, why is this error thrown only on Azure VM and runs completely fine on my machine? Please advise.
java.lang.RuntimeException: javax.net.ssl.SSLKeyException: RSA premaster secret error
On local computer was working fine but when run the container on Azure Linux VM it is not working so there might be compatibility issue between Linux VM and Java JRE’s.
Based on above error the solution is Just remove the updated java version from your server Classpath and try to install the old java version
Please refer this link had the same discussion over here related to above error : https://community.oracle.com/tech/developers/discussion/1533888/another-rsa-premaster-secret-error
Second, try to set the SSL/TLS parameters in the java panel because An SSL certificate is a bit of code on your web server that provides security for online communications. When a web browser contacts your secured website, the SSL certificate enables an encrypted connection. It's kind of like sealing a letter in an envelope before sending it through the mail.
Supported SSL/TLS versions by JDK version
I was able to find out what the error was. There was nothing wrong with the JDK/JRE setup. The issue arose due to the version of docker engine installed on the Azure VM.
Azure based computer vision APIs required server to be TLS1.2 compliant, whereas the version of the docker engine installed on my machine was older and did not support TLS1.2. I was able to fix it after upgrading the docker engine to the latest version.

CA Siteminder 12.5 Web Agent Host Registration Tool or SDK for Policy Server Checks

I need to be able to verify if a new siteminder web agent is already registered on the policy server. Is it possible to do this using Java?. I couldn't find the 12.5 SDK details or sample files.
Any input is welcomed.
The PolicyMgmtAPI in the Java SDK is what you are looking for. I have done this sort of thing with the Perl PolicyMgmtAPI (get trusted host, get agent, etc...)
If you want to do this from the Policy Server it is pretty easy. If you plan on implementing this type of thing in an application server you will need to also create a 4.x agent in order to communicate with the Policy Server for the PolicyMgmtAPI calls.

IIS to SQL Server Error 26, Same connection string works outside of IIS but not from within

I have gone through every checklist I could find for configuring SQL Server I could find. I get the same issue on Windows Server 2008 and Windows 7 Pro. First the environment:
SQL Server Express 2012 --installed as main instance (i.e. no named instances)
IP access turned on
Firewall exception for SQLServer
SQL Server user for application access
Windows Server 2008 service pack 2 (also tested with Windows 7 service pack 1)
IIS 7 (also tested with 7.5 with the same results)
.NET 4.0
Our own database code integrated in a .NET MVC 3 application
We have a tool we developed to import data from the old Ruby on Rails app into the new ASP.NET MVC 3 app. The tool can connect to the database using the user account we created, and that's how I discovered some permissions issues for access to stored procedures. This is the tool we are using to verify the connection works.
Data Source=SERVER_IP,1433;Network Library=DBMSSOCN;Database=MYDB;User ID=webuser;Password=webpassword;multipleactiveresultsets=true;
We are using a straight IP address, but to protect our infrastructure I substituted the IP, username, and password. But this is the structure of the connection string we are using. Following the checklists, I was able to connect from another machine on our network using the import tool to the database and import data. I was also able to import data from the same machine that IIS is installed on.
The same connection string provides the dreaded Error 26 "can't find the database server" message on both Windows Server 2008 and Windows 7 Pro:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I have exhausted every resource I can find, and can't seem to get any closer to an answer. I'm not trying to mount file based database, IIS has read/write access to the web application in any case.
I've ruled out the firewall as a cause for the issue. I've tried the settings with the firewall on and completely turned off. There has to be some other permissions level problem that's happening. Problem is I have no idea what permissions level things I have to check.
After opening a ticket with Microsoft, it turns out I was my own worst enemy. The model classes were set up in their own DLL so I could use them for data migration and other supporting tools for the website.
The DLL was looking in the assembly config for the connection string, and if it wasn't found it would use a reasonable default. Problem is the web application never overrode the location from the Web.config file.
The application couldn't find it because I didn't install the database with the default settings.

IIS 7 on Windows Azure default configuration not passing through custom authentication header to service running

I am using a digest like (but not digest) custom authentication scheme where the authentication header field of the http request contains username:encryptedtokendata
I do not have any problems with this scheme on on Windows 7 and Azure emulator. However when I deployed my service to Azure's Windows 2008 Server SP2 my authentication header fails to make it through to my wcf service. It is null.
IIS on Windows 7 & Windows 2008 Server has both anonymous and membership authentications enabled (because i use membership for certain authentications). Every other authentication is disabled.
Any ideas what might be causing this issue for me? I searched stack-overflow and google up and down without any luck.
I would check and make sure your authentication module is getting installed in Azure and that it is listed correctly in IIS there. You should be able to remote into the instance and troubleshoot it just like you would on premise.

Visual Studio can't add WSDL resource in Windows Vista or later through Apache reverse proxy

I am at my wits' end on this one.
FYI, I work in infrastructure, not .net development, so I know very little about WCF and next to nothing about Visual Studio as an environment, but I don't think that's where the problem lies.
We have a WCF service running on a couple of IIS 7.5 servers on our internal network. This is exposed to the outside world via reverse proxy on Apache 2.2.15 on Fedora 11. The reverse proxy handles load balancing between the IIS servers, as well as SSL.
The WCF service is configured to use transport level security, and the IIS servers have self-signed SSL certificates. The reverse proxy does not authenticate the IIS servers, and the only reason we have SSL on the IIS servers in the first place is so the WSDL will present the correct location URL.
We thought we had it working perfectly, but there's one annoying and crucial exception: the WSDL can't be added as a service reference in Visual Studio on machines running Windows Vista or later. On an XP machine, it's fine, but anything later throws the following error:
There was an error downloading
'[URL]'. The operation has timed out
Metadata contains a reference that
cannot be resolved: '[URL]'. An error
occurred while making the HTTP request
to [URL]. This could be due to the
fact that the server certificate is
not configured properly with HTTP.SYS
in the HTTPS case. This could also be
caused by a mismatch of the security
binding between the client and the
server. The underlying connection was
closed: An unexpected error occurred
on a send. Received an unexpected EOF
or 0 bytes from the transport stream.
If the service is defined in the
current solution, try building the
solution and adding the service
reference again.
The WSDL is accessible through a browser, or through regular SOAP, on any machine and without any SSL complaints. It's just Visual Studio that has an issue.
Initial Googling revealed that it might be a problem with the cipher suite that VS used, suggesting that VS on Vista or later would by default attempt to use TLS1.0 in HTTPS connections, and if an intermediary device didn't support that protocol, it would just drop the request. This is definitely not the case, though. The reverse proxy explicitly prefers TLS1.0, and even when viewing the WSDL through a browser, it flags up as using TLS1.0 for the connection.
Having pointed the proxy at other functioning WCF services on different IIS servers, the same error occurs, leading me to assume it revolves around the reverse proxy configuration. The trouble is that it seems to be identically configured to another reverse proxy carrying out the same task elsewhere.
It's presumably some transport level issue around how VS establishes HTTPS connections on different operating systems, but I simply don't know enough about it to hazard a guess about what that might be. Anyone have any suggestions?
Well, that was embarrassing.
I'm sure there's some unwritten cosmic law that results in me finding the incredibly simple solution to a problem I've been grinding away at for days about ten minutes after posting it up on StackOverflow.
The ServerName directive in the virtual host config didn't match the URL. It did match the certificate (which has a Subject Alternative Name, so it didn't throw up any SSL warnings), but that wasn't the name I was accessing it with.
I'm assuming there's some extension of TLS1.0 that VS uses which enforces this, which isn't used by browsers or SOAP clients. This is probably useful information for anyone else trying this with a certificate that has Subject Alternative Names. It wouldn't have come up otherwise.

Resources