?
Solved

Opening Office files in different modes from ASP.NET

Posted on 2004-09-09
4
Medium Priority
?
335 Views
Last Modified: 2010-04-06
Hello, all!

I have a web application developed with asp.net, vb.net.

My client wants to have this kind of feature:

When the user clicks on the links to Office files (Excel, Word, Visio), the files are opened based on the user profile, in other words, the files are either open in read-only or in full-mode.

I tried several different solutions which I found on the internet but none of them worked properly or required a lot of configuration.

1) I found a client-side vbscript which allows opening office files. It works ok for for simple html pages but in my application it doesn't work giving me Activex component error. http://support.microsoft.com/support/kb/articles/Q178/2/22.ASP

2) Also, I tried using Microsoft.Office.Core library (for example,  
Dim objExcel as New Excel.Application
objExcel.Visible = true
objExcel.Workbooks.Open (location))

to do the same thing but unfortunately as I discovered, it doesn't allow opening the files on the fly. However, it opens the files for Windows-form application.

3) I installed Office Web component 11 and I tried using it to achieve the same goal but I was unlucky again.

So, is there a way to open Office files in different modes from the web application?

I need clear explanation with some code snippet in vb.net or c# or some scripting language.
May be, someone had the same kind of problem.
0
Comment
Question by:EugeneTrukhin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 1500 total points
ID: 12017749
ANY internet based use of Office programs will be accessed through the IUSR_machine account ON THE WEB SERVER. Unless you set up accounts for all your users AND turn off anonymous access, reguiring them to login, they will ALL be the anonymous user, with NO write access to ANYTHING.

They are NOT using the files on THEIR systems -- they're using them on the WEB SERVER. Huge difference.
0
 
LVL 1

Author Comment

by:EugeneTrukhin
ID: 12018461
Clarification:

well,  the users need to login, so there are no anonymous users, right now users can click on the links which open the office files in a new window, and they are able to change the content and store it on the web server. Yes, the links are to the files on the web server.

is it clear?
0
 
LVL 19

Expert Comment

by:webwoman
ID: 12022871
Then you need to set the permissions on the web server, on the file directly. It still might not work, but it's the only thing that's even got a chance.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question