How to include DLL in Netbeans? - dll

I have a Java webservice running on a Glassfish server that uses JDBC with WindowsAuthentication to connect to a SQL Server database so it needs the sqljdbc_auth dll. I've copied that dll to the glassfish bin folder and it works when I start the server.
My problem is that when I make changes to the code in NetBeans and deploy the webservice it doesn't work anymore (saying is not configured for windows authentication), I guess that happens because it is not including the dll. How can I include it in NetBeans? I've placed the DLL in the root of the project but it doesn't work...
Thanks in advance.

I solved it by placing the sqljdbc4.jar in the glassfish lib folder too (rather than importing only in NetBeans).

Related

How to use dll in classic asp

I asked a server if they could install aspJpeg so I can use it in my classic asp project but they told me that I should put its DLL in my own bin folder.
I have read some answers and guidelines using Visual Studio . But I didn't use visual studio in my project. There is no bin folder and no more extra files and settings to add and consume a dll in my project.
Can I consume a dll using manual code through web.config or inline with my asp codes (or vbscript code) or something like that? I have no access to command prompt and server administration and I want to do that through pure coding.
DLL must be registered on server side by using command
regsvr32 <youdll>
Your hosting company/hosting support team have to do this. You cannot do this remotely.
By the way, what IIS version are you using?
"There is no bin folder"
Yes, because it's not an ASP.NET project.
"but they told me that I should put its DLL in my own bin folder."
When you contacted hosting support team, did you mentioned that you are running Classic ASP website? You could upload DLL, but you cannot register it on their server.

How to get database working when i install my project in other system

Okay I have created my project in Visual Studio 2012 express edition. I have used ClickOnce Application deployment to create a setup file. Everything works absolutely fine when i run the project in my computer. But when i install the same project in another computer database connections are not working saying path is not correct. I understand that the path given to connect to the database is of my system. Now that is my problem and what should i do to make the database stuff to work in other systems as well? Please help me as this would make my project complete!
Thanks in advance.
Generally the application would be deployed with an app/web.config. Or another configuration file. Your code then reads the connection string out of this file to find the database.
On deployment, you can change the config file after deployment, this can be done manually, or in IIS if its a web config file, not sure on automatic editing with click once deployments; but a config file or setting of some kind would be key.

Deploying Winforms Application to Client Machines Application Failing on start

This is Edited from the OP. This is a VB .NET 4.0 WinForms application. There is a mysql datasource involved with this project. The target CPU is set to any. Problem: When running this application on any computer that has VS 2010 installed along with the mysql connector it runs flawlessly. When installing on a virgin system(ie. No developer environment installed) but that machine does have .net framework 4.0 installed and a mysql server without the connector installed the application falls immediately. So to fix the issue I install the mysql connector MSI. This immediately fixes the issue on the client system and it runs. The problems is that as you can see below from my Installer setup that the 2 needed DLL files for MYSQL are actually included in the installation package so should not need to be installed separately. So Why is it that using that installer from the images do I need to install the mysql connector? Any Ideas? Below is a screen shot of the References the program uses and from what I believe I do not need to deploy any of those DLL files with my application other than the 2 MYSQL DLL files. So why is this failing?? Below are images showing the project references as well as the Installer Files that are being installed in the applicaiton folder. As shown in the image the 2 mysql dll files are to be put in the application folder. There is also a screen shot showing each dll's properties for in application folder.
You answered your own question.
but that machine does have .net framework 4.0 installed and a mysql server without the connector installed the application falls immediately.
You don't need to install the connector msi package, but you do need to include the two DLL files in the application's directory. Anytime you have some dependency, you need to deploy it with your application.
Edit solution quoted from my comment:
From your update it sounds like you have a version mismatch on the
assemblies, and the references are set to Specific Version = True.
Check the version number of the assemblies on your developer machine
in the output directory, and check the version you are installing on
the client system. (You can just hover over the DLL to read the
version on the ToolTip). You can try to set Specific Version to false
by right clicking your reference and selecting properties, or simply
ensure you deploy the same version of assemblies. Your program is
looking for the versions its compiled against

AppFabric caching on build server - dilemma with assembly referencing

We have recently added AppFabric as a caching option in our project (Windows server version, not Azure cloud). The project thus now has a dependancy on Microsoft.ApplicationServer.Caching.Client.dll and .Core.dll.
Our build server is Windows 2003 and thus AppFabric cache cannot be installed onto it, thus these assemblies are not available.
Short of including the afore mentioned assemblies as explicit binaries in our SVN repository, and referencing them directly (yuck), are there any suggestions as to how to build the project?
Secondly, if we checked in the binaries, performed the build then deleted them from the output folder, is there a way to force .NET to search the %windir%\system32\AppFabric\ folder for the assemblies?
MS do not register them in the GAC...
If your application is using an assembly that can't be installed on your build server, then the solution is to upgrade your build server to Windows 2008.

class not registered

I am installing an application on a client machine. The application is throwing an exception that I am logging that states "Class Not Registered". This an app written in Visual Studio 2005 using VB.NET. The dll dependencies of my .exe are located in the same folder as the .exe. What class is this talking about and how can I resolve this issue?
Does the application use any COM components? If so, make sure that they get registered properly on the client machine. You can either have the setup do this for you (if you have created a setup), or use the regsvr32 utility.
Based on the comments, I would say that you will need to install SQL Server on the client machine. I am no SQL Server expert, but I would guess it would be sufficient with the Client Components.
Try commenting out most/all of the code in the project (or create a hello,world setup) to isolate whether it's one of your 4 dependencies or something else entirely.