vb.net - ASP.NET Cannot launch Excel's file on server -


i'm trying open launch excel specifing existing file open. code:

protected sub filemanager_selectedfileopened(source object, e filemanagerfileopenedeventargs)      try         dim fullname string = e.file.fullname         system.diagnostics.process.start(fullname)         dvfileerror.visible = false     catch ex exception         dvfileerror.visible = true         lblfileerror.text = ex.message     end try  end sub 

in e.file.fullname can found file's name path, when launch process should open excel's file. code works on local, when upload on web server not works. "an error occurred in sending command application".

i've created .txt file test if application can access folder take "access denied" error.

it strange because if open same excel's file using aspxspreadsheet control of devexpress, file opened.

any solutions?

your web service can't open executable on client in normal circumstances. there's few exceptions:

  1. your web server has admin privileges on client. typically happens in company lan scenario
  2. your web service same machine client.
  3. you have sort of software running on client can launch program necessary. requires technology outside of web html/css/js sandbox of browser.

you operating under #2. switch remote clients isn't going work. can't use system.diagnostics.process start applications on remote client. , can't directly access files on remote clients machines. vb.net code running on server, not on client. html/css/js runs on client, , that's in limited sandbox of browser.

the general pattern accomplish want offer file user download writing file http response. user can open file , launch default program editing filetype.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -