How to send e-mail from Silverlight without ASP.NET server? - silverlight

My task is simple, send an e-mail from a Silverlight app, but it has to work in most webservers so, Linux, Apache. Cannot use Windows Servers.
Is my best bet to create a simple PHP script to do the heavy lifting and make request to that using SL?

Even with a ASP.NET you would need to write code server side to accept a request from SL to send an email. Ok so Visual Studio would make creating that much easier but essentially either with PHP, ASP, ASP.NET or whatever you need a service to for SL to send its request to send an email.
I know very little about Apache but PHP would be one way to do it, although I'm sure there would be other ways to create a web service that SL could consume.

Related

What technology to deploy RESTful Server with SQL+COM capability

We're developing a cloud based web application for customer management. One of the main goals i the capability to connect to different local applications on the customer endpoint.
As example, we don't want to have a customer database in out application, the customer should be able to search within his local ERP system right away.
What we need is not much. Only a client on the customers server with access to the local SQL server as well as the COM model.
But as webdevelopers and mainly going with PHP the question came up, what technology we should use?
I've got two approaches in mind:
NodeJS
Lightweight, Javascript and with the Express and winole32 extension we should have everything we need. But the deployment and installation as a service seems to be a bit wacky.
C# .Net Web API
Also a good approach I guess since the client servers are allways windows. But is there a way without IIS?
Or do you have something completely different in mind? It should be very fast and compact. So its basically just a RESTservice that can be deployed with ease.
Thanks for your inputs and thoughts.
C# .Net Web API Also a good approach I guess since the client servers are
allways windows. But is there a way without IIS
It is called OWIN and it is properly documented (web api self host is a good keyword) and works like a charm. Using that on various services to expose an API into the service.

How to get the data from mysql database without using webservices like WCFin silverlight application

Is there any other ways so i can get the data from mysql database to show in a datagridview in a Silverlight application without using Webservice like WCF webservice .?
Silverlight is a client side web technology and as such cannot access a database directly. Web services are normally the best way to access the data you want but I guess you could get creative using an elevated trust application and reading from the file system in some kind of hacky way but that's not going to be a good idea!

uploading file from Access 2010

I have a Access 2010 frontend database + MySQL as backend. So far it is working fine. I would like to upload document and decided to save on the server rather than on the Database. My first question is, how do I upload file from access frontend to the remote server/location?
I was thinking, maybe store the data on the database and use some kind of triggers or script which reads the blob file from database and saves on the server as well as fills the file path into another column.
is there any easier way to upload files from access frontend to a remote server? I am using MySQL server as backend.
thank you in advance
SFTP with Putty
This might help you - it's a great example using Putty on the Windows machine to communicate over SFTP with the Linux server using VBA: SFTP upload with VBA
You would need to install putty on each Windows machine that uses Access and ensure that the appropriate rights are in place on the Linux server.
Custom Add-In
You could use .NET to create an add-in for access to transfer the file to the server over sockets, but this would require you to write a server-side application to listen for requests. You would have complete freedom over how you implement it at the cost of added complexity for yourself as the developer.
You would need to:
Create an add-in using Visual Studio (or other .NET IDE)
Add this into your Access application and use the API you've built.
Create a server-side application to listen to it (this could be a simple Python application)
SMTP Approach
If you want to be creative you could email the file to your own mock SMTP server using Access' CDO functionality: Sending emails with Access
Again, you would have to create a handler application to handle the SMTP protocol, but I'm sure there are some great examples out there.
HTTP Approach
You could even encode the file and send it over HTTP to a simple PHP server in a simple POST request: Example web request with Access You would need to encode the file to base64 or something or file a way of handling file uploads.
Conclusion
As you can see, the easiest approach by far is using Putty, but there are some interesting custom approaches you could take.
I'd say using either SMTP or HTTP would be suitable but that depends how easily you could set up the server-side handler. There may be existing SMTP emulators out there that you could use to handle receiving and managing files.
this might help someone.
I have used Chilkat FTP activeX component and its working fine. Chilkat provides prewritten code just copied from his website and everything is fine. Although I could not find how to show the transferring progress.
regards
krish

Send simple data from wp7 to winforms application

I want to send simple data (geolocation data to be precise) from Windows Phone 7 application to a windows forms application and use it, as I'm a total beginner in this field I don't know which tools to use.
I searched about wcf services and tested this method but there's some issues: the data is sent from the phone application but isn't sent to the winforms application (guess something is missing)
If your know how to do this in a quick way, or have good tutorials I'll be thankful.
EDIT
I found this tutorial, it show how to connect directly wp7 application and desktop application without using sockets neither wcf service, I'm wondering if it is really works if the application isn't in localhost.
the like for the tutorial: wp7 tutorial
I had a similar problem and so I created a REST/JSON WCF service hosted in IIS with AppHarbor to provide the data. There's hundreds of ways to do it (Ruby/Heroku, etc..), but that particular one fits well within the Microsoft stack. I also needed to share route data and I used the WCF service to wrap the BingMaps services so that route computations are cached and shared. Considering that I had already created a local model, moving it out of my phone project into a service took less than a few hours (including the usual config hiccups, and forgetting to add the appharbor user to my bitbucket repo).
Consuming the service from WinForms (or any client) shouldn't be an issue as the service knows nothing about the client implementation.
Here's a tutorial from code project. REST WCF Service with JSON
I think you would need to implement some sort of server side solution which you could upload to on your Windows Phone and download from on your Windows Form application. This could be achieved using a WCF service which was connected to a server side database.
Another option would be to use sockets and communicate directly with your WinForms application. Check this tutorial on how to use basic sockets on WP7.

Silverlight - Client Verification

I have a Silverlight application that needs to retrieve some data from my database. This data is sensitive. Because of this, I only want my Silverlight application to be able to access the data. How do I ensure that only my applications can access the services that expose this data? Is there a way that I can validate a client attempting to retrieve the data?
Thank you!
These might be of interest:
Using ASP.NET Secure Services and Applications Services
Build Line-Of-Business Enterprise Apps With Silverlight, Part 2
MS Whitepaper: Security Guidance for Writing and Deploying Silverlight Applications
Well, everything your SL application does could be spoofed. So direct answer is NO, you cannot ensure that only your application will access to the data.
But there are number of options. For example you can implement authorization and then authenticate your user. In this way you can ensure that only users you trust access to the data.
Another option is to make spoofing harder. For example you can include sort of "secrete" token to all your requests. So other application will need to steal this token. This harder to achieve.
I think this question is more pertaining into implementing a web service or wcf service with authentication and authorization. If your service takes care of it, then you can be ensured about your data. Your silvelight app is just calling the service.
Whoever download the xap can decompress and reverse engineer your code, so your best bet is to build a web service as others suggested. Silverlight Ria ships with a full blown authentication membership that you can leverage.

Resources