Solved

Opening Office files in different modes from ASP.NET

Posted on 2004-09-09
4
280 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
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now