I am running unit testing in silverlight.
I have the test data and I need to export it to local disk without user interaction.
I have thinked to export a file but it seems that it requires user interaction.
I thought I could try a local process that listens for silverlight data on a connection, which saves the data automatically, but didnt find if it is possible and how.
Can anyone help me on how to automatically export data from silverlight to local disk?
Checkout the answer on this SO question. It shows how to access the local file system, however it does require user interaction.
I would just add a page to the web app that is hosting the silverlight plugin that allows you to store the data locally. You can the post your data and have your backend (asp.net I suppose) store the data locally. If you already use WCF to comunicate with your backend, you can use that instead.
I have solved with a local server, it provide http web server, policy server and a socket listener.
The server run and:
- listen as http server for silverlight page requests.
- listen on a local port for silverlight test results encoded as xml
- listen on another port as a policy server, because silverlight need it to connect on a socket
Next the server starts internet explorer pointing to his own web server, at unit test page,
When the tests are finished I get the test result data structure in silverlight, open the connection to the local server (validated by the policy server) and send to it the result encoded in a string.
The server have full access to local file system, so it can silently produce output.
Related
We have client side applications written in WPF which are making requests to the server side MVC web app each time.
Since they sometimes are requesting with the same parameters. We want the server side to cache the result.
If one client requests once, another client will use the cache data in the server. But it seems that the client apps are not using the cache data. The second client app will still call the function in the server.
How can we let client side to use cache on the server side?
.Net 4 can use MemoryCache. This article should get you started.
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
I'm currently developing an application with Appengine and GWT. I have to send a lot of data from an Android phone to the GWT client. My question is, is there a way or an API that I can store or cache this data on the local client?
The data which I'm talking about is just a lot of text from a database from Android. It would be awesome if I could store it somehow that the AppEngine server doesn't have to load the data and send it to the client every time the user connects to my application.
Use GWT's Storage API. The application will still need to go to the server if the local copy of your data is deleted or if the browser doesn't support HTML local storage.
I have a WCF REST service running on IIS on port 8000. I have implemented two GET methods in the service. I created another web application project to implement the UI for the GET's. This application is also hosted on the same IIS on port 8080.
The GET methods call a stored proc from a SQL server db, also hosted on the same machine as IIS (this is a prototype).
From my VS 2010 environment, I am able to display the results from the db on the UI (using GridView and ObjectDatasource as the GET methods from the referenced WCF project). However, when both projects are hosted on IIS on different ports, the UI shows the column headers but not the results. I have checked the connection string for the projects and dont see an issue there.
Any suggestions?
First, I know you say you have checked it, but make sure you check the connection strings in the actual IIS directories. If they have been edited, publishing your site may no overwrite them.
Filing that, you may wish to attach to the IIS process to see what is going on. See How to debug a deployed web site.
I'm developing a Adobe AIR application using Flash Builder 4. This app needs to access a remote PHP service which is being hosted on a remote web server.
I am having troubles figuring out how to add a PHP data service which uses a remote service. I can add the PHP data service in Flash Builder as a service hosted on localhost, but given that this will not be feasible when the application is deployed, will not work.
Does anyone know how to connect a Flash Builder (Flex) project to a remote PHP data service?
Thanks,
Chris
Ok, I think I got it figured out. Here's the steps that I took to get it working on the remote server:
First, the service should be set up from Flash Builder as a data service on your local computer (local server running).
After you have checked to make sure the service works from your local machine, upload your PHP service file to the remote server. Also, upload both gateway.php, amf_config.ini, and the ZendFramework folder.
Make sure to keep the folder structure the same on your remote server.
Add a constructor to your service.as file in Flash Builder with a line as follows:
_serviceControl.endpoint = "http://www.remote.com/gateway.php"
Where the URL is pointing to your remote gateway.php.
Make sure your amf_config.ini file on the remote server is configured correctly.
is it possible to pass a variable to service.as for _serviceControl.endpoint eg:
_serviceControl.endpoint = MY_VARIABLE
where MY_VARIABLE is defined somewhere inside the AIR application or is user defined