Save xml file directly to the client and not to the server

Asked

Viewed 44 times

0

I have an XML file, which can be created, is altered, and can be deleted, but wanted to save it on the machine the client is using, and not on the server, it is possible ?

This is one of the ways I use:

FileStream arquivo = new FileStream(item.Caminho + "\\NFSe-SUB" + numero.ToString().PadLeft(15, '0') + ".xml", FileMode.CreateNew);

As I posted on the server, it will try to search the folder on the server, and I wanted it to access the configured folder, which in case is on the machine that the client is accessing E:\XML

  • I think there is no way to do this with 1 normal web page, the client would have to upload XML, can even do in batch, but will have to do. I work with Nfse, Nfe, Cte, etc and know what you’re trying to do, but it won’t be possible unless you’re using an Electron-like api for the application to run locally

  • You want to manipulate (read, create, edit, delete) the file in the client?

  • @Reiksiel in case the user can choose to save both on the server and on his machine.

  • @LINQ this, how can I do?

  • 2

    @marianac_costa You cannot.

  • @LINQ there is no way around the situation ?

  • 1

    @marianac_costa, I gave you the option to run locally. All access that html/javascript has there is machine is done by the browser that interprets the language and provides an interface for it to have access to some system data. What you want would cause a tremendous security breach.

  • @Reiksiel understood, in case I shared the folder, and put to save on it, so it works out, I would like to take a question with you, since you have experiences with Electronic Notes, I have the certificate, and it will stay on the user’s machine and not on the server, How can he recognize it? I seek so var store = new X509Store("MY", StoreLocation.CurrentUser); right on my machine it works, but when you put it on the server, it gives error.

  • @marianac_costa, I don’t think this is the place, but if you have any questions please contact my email: [email protected] About the certificate: the certificate needs to be installed on the server so that it has access, the customer will have to give you the certificate once at least.

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.