I'm having trouble finding a simple sdk to integrate the Notes-Client from within my c# winform app.
Requirements:
In a c# WinForm application I have to sent notifications by email. These emails should be stored in the "Sent"-folder of the end-user's mail-client. People who receive the emails should see that the mail does not come from an application, but someone else s mailbox.
Approach:
Since I need to store the emails within the Sent-folder of the end-user, I thought I should make use of some Notes-api and let the client-application take care of storing and delivering the emails. Alternatively use late binding.
Problem:
I don't have Lotus Notes installed and rather not install it (I can test on a different non-developer machine). Apparently the only way you can get the proper interop-dlls is by downloading and installing the Lotus Notes application.
Questions:
- From what I read I understood there are two interop-dll's: 1 for the server (Domino) and 1 for the client (Notes). The latter only supports the 32-bit version of the client. Is that correct?
- Does anyone have a download-link to the sdk or the dll's that I need?
Actually there are three options: the COM interop from the cleint code, the COM interop from the server code, or the OLE classes from the client code. The latter requires that the Notes client not only be installed, but actually running when your code sends the message, as the OLE calls actually drive the client front-end UI to do the work. You probably don't want that.
However, I think you're still going to be better off dropping your "rather not install it" preference. In addition to the COM Interop layer, you have to have the Notes core DLLs installed on the machine where the code runs, no matter what API you use for Notes/Domino development. That means you must either have a Domino server or a Notes client installed on the box where the code will run. (The only exception is for Java programmers, who can use an API that makes IIOP calls to a remove API that executes on the Domino server.)
Yeah, I know you said you'd do late binding... And theoretically you could avoid installing Notes clode on your development machine as long as it's there on your test machine. But in that case, your test machine is really going to be your development machine for this part of the project. You'll end up debugging and modifying your code there, and you'll do it with no help from the compiler. I don't see the point of losing the compile-time benefits of early binding just to keep Lotus Notes off your machine. It doesn't bite, really ;-)
As for your specific questions, the only client code available is 32-bit, and the core DLLS and COM interfaces come with it. The trial client download is available here. What you really should do, however, is get the free Domino Designer download here, which includes the client code and also includes all of the developer help files and examples. As an alternative, you could install 64-bit Domino server code instead of client code, and the 64-bit COM interfaces do exist -- however they are not supported by IBM and there are some things that don't work.
Related
I write small apps to help automate daily work of some colleagues and want to put on a shared folder on my machine so that others from local network can execute when my computer is on. I don't have the luxury of my own server so this is the best I can do.
One of which is a Winform app that connects to an Oracle database via an Oracle client and Oracle Data Access installed on MY machine to retrieve information. I would hope that people can execute the app (.exe file) when my machine is on, without installing anything on their machine. The app will write to an output file (.html) on the same folder and open it on THEIR browser.
My question is : What should I do to make it possible ? How can people run this .exe file using Oracle Client, Oracle DataAccess and .Net framework already installed on MY machine as if I am running it locally.
I mark all C# Assemblies (automatically added by Visual Studio) as Copy Local to True (Microsoft.CSharp.dll, System.Data.dll, System.dll, System.Data.DataSetExtensions.dll, System.Deployment.dll, System.Drawing.dll, System.Net.Http.dll, System.Windows.Forms.dll, System.Xml.dll, System.Xml.Linq.dll). Would people still need .Net framework installed ? My app is quite simple with only one external dll Oracle.DataAccess.dll. How about Oracle client and Oracle Data Access.
Many thanks.
Best solution for your situation is create a webservice and make the clients that'll consume your webservice instead of them making direct calls to your database. It removes system dependencies and easier maintenance.
Your colleagues can go to your computer via remote desktop if it is feasible. In the probable case that this is not feasible, you need to decide what the colleagues will see. If they only need to see the generated html and they only need to trigger the execution of your exe, then you will need to have a program which listens to a port and make sure that the given port is requested correctly by your colleagues via a small client app.
But honestly, the use-case you describe sounds like a website used by your colleagues. You can create a website in .NET, the exe you have would be the controller or code-behind depending on the approach you use and the HTML would be the response. Then the colleagues will just request your page with the port you are listening at.
I want to develop web based configuration utility for WIN CE 6.0 device. This webpage is expected to configure/access/modify device's registry settings, reboot device etc. WIN CE Device has a webserver running on it. I am clueless about how to start.
Suggest some way to modify registry values using webpage.
Take a look at the source code for the default web admin module. Fair warning, it's ISAPI, it's near impossible to debug with anything but MessageBox calls and it has to be done in C++. But it is free.
The source is installed with Platform Builder and ends up on your dev machine at
%WINCEROOT%\PUBLIC\SERVERS\OAK\SAMPLES\HTTP\WEBADMIN
Another free option would be to create and install a COM object (written in C++,. most likely with ATL) on the target. Your web pages could then create an instance of that object and use it to interact with the device using the built-in "classic" ASP server. Installing the COM object on already-deployed devices or devices where you don't create the OS is going to be a large support challenge. Debugging these objects is not fun (though slightly easier than ISAPI if you build a separate test loader app). Also be aware that the built-in ASP server supports only a very scaled-back subset of ASP 3.0 (which is obsolete to begin with).
All of the web-based device admin we've ever done (and we've been doing it for a decade) has been through the Padarn Web Server, which uses C# following a subset of the IIS object model. It's a commercial product, so it's not free, and for full disclosure it's a product that we created (because I felt the built-in option is so bad) and sell.
What I'm trying to do is set up a SharePoint event receiver so that when an item is added to a SharePoint calendar, a reminder is setup in Lotus Notes with the same title/date/time.
I was able to create a Windows Forms Application that creates the Lotus Notes reminder, but when I put that code into a SharePoint event receiver, it doesn't run. I even tried putting some other code in the receiver that I know works, but with the Notes code in there, nothing runs at all.
Is it just not possible to do this because the Lotus Notes code needs to be run on a machine with a Notes client on it?
Yes, if you are using interop classes, you need to have a Notes installation on the machine, otherwise the DLLs that expose the Notes COM API aren't there for you to call. And this could be problematic if your SharePoint server is 64 bit, because IBM does not support the COM API on Win64. It can be made to mostly work, but it's not a good idea to go down that road.
There might be, however, other possible ways to do what you want. Domino can be configured for access via HTTP and supports web services and more recent versions support REST APIs.
As the Out of the box Lotus Search connector requires to have lotus on the local computer, I suppose you are right. You should have lotus on the local box.
It's logic actually, as the Lotus code requires to have the lotus libraries available, unless there is some http API or similar.
Overview
C# File - Users PC
PHP Server - Hosts Webpages for application
Server and Users PC on local network
I have a c# file that reads weight from a USB scale. How would I trigger this file to run so it feeds into my program. The problem is I am using PHP to host our webpage/application so its not running client side and the scale is not hooked up to the server but to the clients PC.
The C# script would have to be on the clients in order to read the scale so how would I trigger this to happen?
Is this even possible and if not what would be a better way?
Important Edit
I was able to run the Scale Script (C#) when I wanted by having PHP and C# use TCP sockets.
The C# would listen for PHP to send something and when it did it would read the scale and send this information back to PHP becuase PHP was listening for a response. Mixed in with a little Ajax and it updates in the web browser.
Gave Chris Credit because he was the most helpful with answering my questions
It sounds like what you really want is for the client application to submit the data to the website itself, and the most suitable approach is probably to expose a web service from your server.
This service should accept weight data, along with some sort of customer key or whatever, to correlate the records correctly on the server side. I've never created a web service in PHP personally, so I can't give any advice on the implementation of that, but it is fairly trivial to hook a C# client app up to a web service once you've exposed its metadata (assuming you use SOAP).
you can't start C# application from a web page in a way that'll work in every browser every time. BUT, you can have some workarounds:
Use ActiveX component that read the data in the client and upload it to the server. the biggest cons is that it'll only work in Internet Explorer
use Silverlight client application that runs on elevated mode (v4) and upload the data to your server.
refer your clients to download application (the C# application you wrote about) and run it - this application will upload the data to your server.
hope this helps.
C# isn't a scripting language, it's a language that compiles into executable binaries or libraries. You won't be able to execute C# code on the client's computer via a website because C# code needs to be compiled before it can run.
Presumably what you really want is for your compiled C# binary to be executed on the client's machine via your website. You won't be able to easily do that. There are a lot of security measures in place to prevent browsers from running programs on your computer. There may be ways to hack around these security measures by using plugins (such as ActiveX), but it's not something that will be a one-liner.
Edit: I think you need to step back and think about what you're trying to do in a broad sense. You're trying to create a website that can read information from a user's USB port. This is the type of thing that browsers are designed to prevent, and for good reason. I wouldn't want random websites to be able to access peripheral hardware without my explicit permission. If you want this website to function the way you're expecting, you're going to have to seriously think about the security implications. You'll need some kind of client-side code (ActiveX, Silverlight, ...), and the user will need to explicitly give permission to for this all to happen. It won't be easy, and it won't be automatic. And I'm damn glad that's true.
I've designed a C# game that makes use of an Access .mdb database file to store variables.
The basic idea is that one of the players will 'host' a game, and the other player will join said game, by connecting to the database, reading and writing items into the database. The database is needed to pass variables to and fro the host and client, and both programs check the database regularly for new messages / variables (yes, yes, I couldn't get TCP/IP Remoting to work).
Now, there, the program works fine (mostly the client, since the host modifies only its local database), for as long as the client can find the database file. Currently, the connection string for the client is located in a .ini file, and for the program to work, it (or at least, the server) must be located in the Shared Documents of an XP machine, or the Public Documents of a Vista / 7 machine.
But then some questions occurred to me:
What if the client user places / installs it into another folder in the Shared / Public Documents? I suppose there's a code out there that could 'drill' into the Shared Documents folders to find the path for the database, share names included... is there?
What about installation? The installer default is always "C:\Program Files\GameName". Could it be set (or locked) to a specific folder into the Shared / Public Documents, by default? And is it even recommended to install it into a Shared Folder, what with problems such as Accidental Deletion?
Say, the default is "C:\Program Files\GameName". I could see that a set installation path will solve any connection issues, since every client will look in the same path of the other computer, and it won't matter if it's XP or Vista. Could "C:\Program Files\GameName" be accessible by a C# program over LAN, without any system modification? Are there any security (UAC?) issues?
P.S. Details that people may find in handy:
I'm using Visual Studio 2005. So is my School.
I'm running .NET framework 2.0. So is my school, and unfortunately, I can't change that.
I hate to tell you this, but this is why the approach is fundamentally flawed. What are you going to do when:
File and print sharing on the server is disabled?
The network client is disabled on a client computer?
The server is configured to only allow authenticated users, and the client doesn't have access?
File and print sharing is blocked because of the firewall?
File and print sharing is completely borked for other who-knows-why reasons?
You need administrator access on the server to share a folder, but the current user is not an administrator?
The Access database engine isn't installed correctly on the server or client?
One of the clients corrupts the database? (This is easier than you might think; all it takes is a network glitch where a client temporarily or permanently disconnects from the server).
These are fundamental issues that you can't resolve with the current solution.
Get it working over normal TCP/UDP ports. You'll have a much easier time. There are libraries to facilitate that, see C# Game Network Library - for example it sounds like Microsoft's XNA SDK has functions for networking in a game. If you use a standard method / standard library to implement networking, your odds of success are much higher. Using a client/server architecture means that the server's state won't be corrupted if a client goofs up.
I realize that this probably involves a significant rewrite. Frankly, I don't think you have a choice if you want this game to be commercially successful on a wide customer base without high support costs, and move beyond being a mere experiment.
Get rid of the access database. The described architecture is already 'user unfriendly'
Use either SQL Express or SQL CE which requires no installed database binaries (they can all be included in the applications folder). This way the db will stay in the applications folder (ideally app_Data) and .Net has included support for databases in this folder.
Please stay away from access you will save yourself a lot of trouble.
http://blogs.msdn.com/b/sqlservercompact/archive/2011/01/12/microsoft-sql-server-compact-4-0-is-available-for-download.aspx
I think that there is little point in using Access unless you wanted to use any of the pretty form-based IO that you can you do with its designer. And I doubt that'll be the case here.
I would encourage you to replace all your file IO with a sound data access layer.
Which will rid you of all the "sharing" issues that you are experiencing, file locks, the overcomplicated installation process, etc.
Alternatively to SQL Server Express as suggested above you could also use SQLite http://code.google.com/p/csharp-sqlite/