.NET dll using different TLS versions - ms-access

We have a Microsoft Access application that consolidates many of our activities on eBay. I do this through several com dll's that Access references. One part of the application posts listings from our inventory to eBay. This has been working for at least 8 years. Recently eBay changed it's servers to require TLS 1.2 and we started getting "The request was aborted: Could not create SSL/TLS secure channel" message. Looked this up and MS says upgrading the dll project to Framework 4.7 or later will fix. I upgraded the solution framework and recompiled.
The upgraded dll works with eBay when I call from a win forms test application built in VS. When I call from the Access application I still get the TLS error. When I looked at the communications with eBay in Fiddler the calls coming from the dll when called from the .NET win forms test app use TLS 1.2. When the dll is called from Access it is still using TLS 1.0. Both the Access app and the .NET test app reference the same dll file.
Question: does the application calling a dll influence the TLS version being used? Any ideas on what could be causing different TLS version being used by the same dll?

Hum, I did not think that VBA/Office being the host program would change the TLS settings. But you could consider trying this registry edit:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions" = dword:00000001
"SchUseStrongCrypto" = dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions" = dword:00000001
"SchUseStrongCrypto" = dword:00000001
I believe you also have to re-start your computer for above to take effect.

Related

asp.net core 1. how change the Target Runtime to x86

i develop an Asp core web application (.net framework).
how i specify a run as 32-bit applications?
the publish wizard do not give way to change the Target Runtime, which the selected option is x64 is selected.
I installed on my machine the x86 version of .NET Core Installer.
publish wizard screenshot:
PS Why do I need x86.
I had to run the site on a computer that installed Microsoft Access 32-bit (2003, for an old software).
I also need to access data in Microsoft Access file, which requires me to use the Microsoft.Jet.OLEDB.4.0 driver.
The problem is, probably, that the app's core ASP.NET always running as 64-bit applications, is what gives me the known exception 'driver not registred'
stil after set "enable 32-bit application" in IIS.
i cant install the 64-bit access driver engine, because it requires the removal of MS Access 32-bit...
As mentioned here you need to add the "runtimes" key to your project.json file like below image.
Once you do this, the Target Runtime entry in Publish menu will list all of your specified runtimes. Although this is not enough to get it working since using the Publish menu and selecting x86 version will have no effect and will result in x64 binary files. (This bug may be fixed in future).
The workaround is to navigate to your project folder where the project.json resides. Open a command prompt and type the following to have your binary in desired runtime:
dotnet publish --runtime win7-x86
If you get any error yet, you may need to have the corresponding runtime installed (Download form here).
More info:
https://learn.microsoft.com/en-us/dotnet/articles/core/app-types
https://learn.microsoft.com/en-us/dotnet/articles/core/rid-catalog#what-are-rids
There is also a platform key under buildOptions listing all possible targets, but yet because of some issues (like #1624) it has no effect and it seems the system ignores that.

SSIS C# Script using Google.Apis.Auth.OAuth2;

I made a C# Script in SSIS pulling data from GA API. On Monday, Google closed the access to the api via basic authentication
AnalyticsService service = new AnalyticsService(Dts.Variables["CONFIG_GA_PROJECT"].Value.ToString());
service.setUserCredentials(username, pass);
=> Got 404 error
So I want to move to the following security implementation : Accessing older GData APIs (Spreadsheet API) using OAuth 2 and a service account
The problem is : seems like we can't use nuget installation in SSIS Script as dll has to be pushed in the GAC.
I tried using : How to install a DLL to the GAC on Windows Server 2012 using only PowerShell (without having to install SDK or Visual Studio) but didn't work...
Is anyone found a way to use Google.Apis.Auth.dll in a SSIS C# Script task ?
The problem you are having is due to the fact that the Google .net client library aren't strong name signed, so they cant be pushed to GAC. Also remember that the current Google .net client only works with .net 4 and .net 4.5 so you are going to be locking out the older versions of SSIS I think.
This is reason I didn't use them in my Google Analytics Custom SSIS Data Reader and Connection Manager which uses Oauth2.
Options:
Strong name sign the Client library yourself. code here
Wait for the strong name signed version of the library to be released. I hope its done soon. Strong Naming in binaries #238
Do what I did and code it all yourself with out the Client library, this allows you to code for .net 3.0 and support SQL server 2005 - 2012 like mine.
I hope this helps. The one I made is free for download you are welcome to have a look Data Reader for Google Analytics

SQL adapter in Worlight?

I am new to IBM Worklight,and i found a way to connect to the MySQL using the SQL adapter.
the configuration as below:
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/worklight_training</url>
<user>Worklight</user>
<password>Worklight</password>
</dataSourceDefinition>
Since the adapter are compile together with the app, just wondering, is it safe? is there a possibility of someone decompiling my apk or ipa to view the adapter connection thus acquire the user and password to my mysql database.
A hacker decompiling your .apk or .ipa file will not find the database username/password there, for the simple reason that the adapter is not compiled "together with the app" and is not part of any artifacts that you install in a device.
An adapter is a server-side entity, not client-side.
The adapter is an object stored in the memory of the running application server.
Adapters are Server side code andare not part of the apk or ipa files.
You can check/confirm this information in Worklight documentation. The details about adapters, under "Developing the server side of a Worklight Application" are at:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/devref/c_overview_of_ibm_worklight_adap.html
You can also check the Server Side Development of MobileFirst Platform Getting Started Modules
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/
(MobileFirst Platform is the new name of Worklight)
In worklight, you usually have the application (apk/ipa) communicating with a server side component (the adapters) running in a worklight server. The adapters are used to communicate with backend systems (like a mysql server). There are a few different types of adapters to communicate with different types of backends (like sql, http and SAP)
Please, let us know what documentation/guide caused you the understanding that adapters are part of the client apk/ipa. If that is really stated in any documentation, it is wrong and must be corrected.
Edit:
To connect to a MySQL DB (no matter if it is a standalone MySQL or in XAMP, LAMP or whatever package) you can follow this geting started tutorial
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/sql-adapter-communicating-sql-database/
Also note that, if you are using MobileFirst Studio (previously Worklight Studio) downloaded for free from Developer Works you have a developer version of the WOrklight Server running inside Studio so that you can create and deploy adapters and use it during development as your server. But when you go to production you are required to purchase licenses of Worklight because you don't have the worklight server available for free.
So if you have Studio, you have the server available but only for development purposes.

Connecting Old ASP site to Access (.mdb) on server 2012

I feel that the title pretty much speaks for itself. I keep getting a server 500 error when i try to access a page on my site that is using the Access DB.
I created an ODBC (32 bit) Data Source using the driver Driver do Microsoft Access (*.mdb).
I am sure i am using the wrong drivers/IIS configurations. This used to be hosted on an old server and we are trying to move everything over.
Would anyone be able to point me in the right direction? Thanks!
EDIT
I was able to get errors printed to my page. Below is the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found
and no default driver specified
When I enable 32-bit Applications I get the following error:
HTTP Error 404.17 - Not Found
The requested content appears to be script and will
not be served by the static file handler.
This issue is related to running 32bit applications on a 64bit server. Furthermore, if you have installed something else on it (for example, Outlook Web Access, or OWA for short) it can disrupt the IIS with adding it's 64bit modules to load globally, and that would effectively cause errors on 32bit pools.
The following debugging is assuming you have a requirement to run 32bit ASP application on a 64bit IIS server.
You have to set your application pool to run as 32bit
If the 32bit pool stops right after you make a request for an ASP page, it means that most probably there are 64bit modules failing to load. You need to see which dll is creating the issues by viewing the Windows Event log (eventvwr). Then, one by one, you edit the applicationHost.config file and add preCondition="bitness64" to each module that you see in the eventvwr until you get rid of all the errors in the log.
When finished with step #2, your pool should be working, but your app might not - it will most probably report 404.17, even if there is an ISAPI handler for ASP. When you open IIS, on the left side choose the server and on the right open the ISAPI and CGI restrictions. You will see that there's an ASP entry there (if not - you need to install it as a feature on the server). The ASP might point to something like %windir%\system32\asp.dll, but you need to make another entry. Your appPool is running as 32bit on a 64bit machine (that's shortened as WOW64 = 32bit Windows application running on Windows 64bit - Windows on Windows64), and you need to add an asp from %windir%\SYSWOW64\asp.dll. Also, add the corresponding handler (navigate to handlers, and practically repeat the entry for asp but use the SYSWOW64 folder instead of system32)
This should (finally) get it working.

cas jasig using oracle data source on windows

is there any way that can help cas settings to use the data source oracle on windows
in my company will apply singgle singgle sign on and logout, I've been trying for 5 days, and until now have not been successful.
I've tried several ways
I use
Tomcat 7.0
Java 1.7
cas server 3.5.2
Tomcat 7.0
Java 1.7
cas server 3.5.2
I downloaded cas server 3.5.2
extract cas-server-3.5.2
copy cas-server-webapp-3.5.2.war into tomcat webapps
cas has been successfully deployed, and can be accessed
and then I do not understand anymore, how do I get the authentication process can use oracle database
sorry my english is not good
thank you
There's a few things you need to do:
First of all, if you haven't downloaded and included the Oracle JDBC Driver library (http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html) then you have to do that.
Secondly, you need to configure the JDBC plugin: https://wiki.jasig.org/display/CASUM/JDBC
These instructions (and the preferred method of customizing & building CAS) uses the Maven Web Overlay method. This has the advantage that you deploy lots of un-necessary libraries that you aren't using.