What is the best way to access remote filestore in ITHit webdav - webdav

I am in the middle of implementing a WebDAV server using the ITHit WebDAV engine for .net. The server is a httplistener running as a windows service so using Mapped drive on the service machine is causing problems as it seems services cannot see mapped drive.
I have had some success with using UNC path but the GetExtendedFileAttrjbutes don't seem to work with UNC path ( I am not really using them either but wondering what else might not work).
So the question is, what is the best way of implementing the server which needs to run as a service and access a remote filestore folder?
Are there any recommendations?
Regards
Amar

Currently WebDAV server samples with file system back-end provided with IT Hit WebDAV Server Engine for .NET do not support network path. You can use only local path with it. The problem is in storing locks, that are saved in extended attributes or NTFS Alternative Data Streams - they are not supported in case of a network path (at least on Windows).
To keep locks you will need some other storage, such as database, some extra files or any other storage. You will reprogram IFileAsync interface (implemented in DavFile.cs and ExtendedAttributes in file system samples).
We try to keep our sample code as simple as possible, that is why we do not support network path, this will make our sample code more complex. We continue to investigate how we can make a simple and viable implementation in our samples to provide such implementation in future updates.

Related

How to deploy SWF file to Websphere application server?

I want to deploy my application coded in FLEX to my WAS 7.0.0.4 on localhost. The application is exported as a SWF file. But I don't have got any experience with WAS and I didn't find any tutorial how to do that and that whole system looks really confuzing to me. Could somebody write step-by-step solution or give me any advice how to reach my object?
If I understand you correctly, you'd probably be better off just using an HTTP server like Apache or IBM HTTP Server (which is much the same thing). It sounds like you're deploying static content (from the server's perspective), so an application server will only add complexity and use more resources without providing you with any additional functionality. On an HTTP server, all you need to do is place the files you want to deliver to the browser in a specific directory.

Can I access MS Access file as Database for ASP.NET site without SQL hosting plan?

I am creating a site with ASP.NET C#. Now my problem is I purchased one hosting plan without SQL database hosting, so can I use MS Access as my database for my site? I have taken hosting plan from net4.in.
Yes you can. Make sure you have the appropriate security access to the file - this can typically be done by putting the Access .mdb file in the App_Data 'magic' folder in ASP.NET. Update the connection string in your application configuration / web.config with the appropriate values.
Refer to connectionstrings.com for building / configuring the connection string.
Not all features available in SQL Server are available in Access and there might be slight changes to your queries / SQL syntax so make sure Access has everything you want before you go down this route - the extra cost of switching / upgrading your host will probably be less than modifying and retesting your code.
EDIT: ASP.NET also supports disconnected database MDF files in the App_Data - it might be worth checking with your host if they support this as you would not need to alter your code at all.
The short answer is yes, however I'd strongly recommend against it. The reasons for using Sql Server are limitless. Sql Server is much more secure and it performs better than Access when it comes to optimizing queries. The Sql Server Query Optimizer is remarkable in its ability to analyze the optimum route for pulling back data and is very efficient in preserving server resources.
However, if you are unable to pay the price for Sql hosting then you can certainly use Access. This article: http://www.aspfree.com/c/a/Microsoft-Access/Connecting-to-a-Microsoft-Access-database-with-ASPNET/ can help you get started... it is outdated, but it should get you on the right path for setting up the connection string to grant your application access to your MS Access data.
Thanks for all your answer but i tried by myself downloaded one sample application and uploaded on my server, and its working. So now i can use MS Access database on my server which is without SQL server hosting. As there was very small need for using database so i used MS Access here.

What methods are there to send read/ write a file from one machine to another?

Using asp.net what non http / ftp methods are there to read a file from one machine and write it back from another?
For example i have an image on machine A called test.JPG. Machine B should be able to grab a copy of test.JPG generate a thunmbail and send it back to Machine A.
I've looked at the following solutions but unsure which if it's architecturally sound
Machine A
Set up a WCF web service
with read / write operations
Machine B
Set up a WCF service to read and write
files from the WCF service on machine
A
Part of the problem is that Machine B needs to know when there are files on Machine A to be processed. What kind of setup do i need on both machines to enable this? Initially i am thinking of polling for files on Machine A.
I am unsure of the above setup so please help me improve it, particularly if WCF is suitable for this kind of work.
If copying files is the only thing you need to do, you might be able to save yourself some trouble and use pre-written software. I'm thinking of software that's designed to replicate files between load-balanced web servers.

How to write an offline version of an AJAX/ASP.NET web application

We have a web application that uses AJAX to talk to an ASP.NET web service. We would like to write another version that can be used offline. We need to be able to re-use our existing code as much as possible. What approaches should we consider?
The app is currently using XmlHttpRequest to get dynamic data from the server. Obviously the offline version will not be able to talk to the server, but it does need to talk to something! I'm sure installing IIS or Cassini on the client would work, but I was hoping for a simpler solution. Is there no other way for JavaScript to talk to some external code?
There are plenty offline web apps nowaday. It simply evolve from AJAX.
For example:
WoaS (wiki on a stick / stickwiki), Tiddly Wiki,
Google doc and Gmail is going to be offline.
You don't need a webserver to run these webapps in offline mode. Just store the required data, scripts on the client side (usually as XML).
One of the possibilities would be to use Cassini. This is a web server that acts as a host for the ASP.Net runtime. You can host Cassini in a Windows application or a Windows Service. In this scenario you do not have to rewrite the web app and the web service.
Most other solutions do require a rewrite of both your web app and your web service. Depending on the way you have written the existing app you can reuse more or less code.
Have you considered HTML5 with application cache and offline storage?
If you hope to create an "offline" version of your package your biggest issue by far will be the need to install your site into a local copy of IIS (registering a virtual directory, etc.). I pursued this briefly a few years ago and gave up in frustration. It can be done: a number of software vendors such as DevExpress do this so you have local copies of their demonstration projects. Indeed, I was able to do this. The problem was the classic "it works on my computer" syndrome. There was simply no way to guarantee that most of my end-users had anywhere near the technical proficiency to make this work.
Thus, I would strongly recommend that you not pursue this path unless you have very technically proficient users and a huge support staff.
But there is one more very important question: did you abstract all data access code to a DAL? If not, then you have a lot of work to do in managing data access as well.
Update: user "Rine" has recommended Cassini. I just wanted to let you know that I pursued Cassini and another 3rd-party web server as well. I think that there are licensing issues with Cassini but may be wrong - it has been awhile. However, I do distinctly remember running into barrier after barrier with this approach and very little documentation to help me out.
if you want a web application run offline, you need a webserver (IIS for ASP) bound to the localhost (127.0.0.1) address. After this so can access your web application by typing http://127.0.0.1/ in your web browser the same way as you do online.
If your AJAX relies on XMLHttpRequest's, you can:
Make the static versions of XML's you get over XMLHttpRequest and put then into a folder on disk.
Rewrite your XMLHttpRequest URL's so that they point to files on disk.
Rewrite your XMLHttpRequest's so that they don't check status (it's always 0 for the file:// protocol.
All JScript works on file:// pages as well as on http:// ones.
Of course it's not the best way to develop static pages, but it may save you some time on rewriting.
I havent come across any framework specifically built for asp.net like the ones available for PHP or RoR.
Here is a good article by Steven to get you started with HTML 5 and ASP.Net Creating HTML 5 Offline application
Obviously the offline version will not be able to talk to the server, but it does need to talk to something!
Enter HTML5 LocalStorage. It works like a database and enables you to put data on your client. Indeed you have to rework parts of your code in javascript and transmit it to the client, but then it would work offline.
Local Storage works like this:
- Setter: window.localStorage.setItem(KEY, VALUE)
- Getter: window.localStorage.getItem(KEY)
- Remove: window.localStorage.removeItem(KEY)
To get the main page working offline you need to create a manifest. This is used to store complete sites on the client. Please refer to this for more information about manifests:
http://diveintohtml5.info/offline.html
You want to build a web application to work offline?? It can't be done.
You could split the interface code from the rest (in diferent dlls) and create a windows application to mimic the behaviour of your web application. This way you have 2 distinct user interfaces but the same code for business rules and data access.
I don't really see any other way...

How do I cluster an upload folder with ASP.Net?

We have a situation where users are allowed to upload content, and then separately make some changes, then submit a form based on those changes.
This works fine in a single-server, non-failover environment, however we would like some sort of solution for sharing the files between servers that supports failover.
Has anyone run into this in the past? And what kind of solutions were you able to develop? Obviously persisting to the database is one option, but we'd prefer to avoid that.
At a former job we had a cluster of web servers with an F5 load balancer in front of them. We had a very similar problem in that our applications allowed users to upload content which might include photo's and such. These were legacy applications and we did not want to edit them to use a database and a SAN solution was too expensive for our situation.
We ended up using a file replication service on the two clustered servers. This ran as a service on both machines using an account that had network access to paths on the opposite server. When a file was uploaded, this backend service sync'd the data in the file system folders making it available to be served from either web server.
Two of the products we reviewed were ViceVersa and PeerSync. I think we ended up using PeerSync.
In our scenario, we have a separate file server that both of our front end app servers write to, that way you either server has access to the same sets of files.
The best solution for this is usually to provide the shared area on some form of SAN, which will be accessible from all servers and contain failover.
This also has the benefit that you don't have to provide sticky load balancing, the upload can be handled by one server, and the edit by another.
A shared SAN with failover is a great solution with a great (high) cost. Are there any similar solutions with failover at a reasonable cost? Perhaps something like DRBD for windows?
The problem with a simple shared filesystem is the lack of redundancy (what if the fileserver goes down)?

Resources