473,672 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I get some help here! Posted 10/4/04 - no reply there

1st post 10/4/2004. Any advice is appreciated.

Attempt to open Excel file using ASP.NET. Sample snipet of source code is as
follows:
Dim _RptDocument As Object, _RptFormat As Object
Dim _RptFile As String = "C\Downloads\<a ny file name>.xls"

_RptFormat = New Excel.Applicati on()
_RptDocument = _RptFormat.Work Books
_RptDocument.Op en( _RptFile )
_RptFormat.Visi ble = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="tr ue"/>
I have no problem opening this on my local machine. When I use the network
- I continually get access denied.

If I use a username tag as follows:
<identify impersonate="tr ue" username = "Domain\usernam e"
password="passw ord/> - NOTE: I also set the security settings for
"R/W/Modify" for the folder too!
I get the following run-time error...
Source: System.Web
Error: Exception of type System.Web.Http UnhandledExcept ion was thrown.

'C:\Downloads\R pt.xls' could not be found. Check the spelling of the file
name, and verify that the file location is correct.

What do I need to do on the IIS server - or what security settings - what
account could I use to have the instruction "_RptFormat = New
Excel.Applicati on()" work properly - and view the Excel file from the server.

Nov 18 '05 #1
3 1180
You say if you use impersonation, you get the file not found message.

Question - is the file in question on the C: drive on YOUR machine, or on
the web server?

If the file you want is on the C: drive of your machine but the web server
is a different machine, the web server is going to look on ITS C Drive, not
yours.

"DavidS" wrote:
1st post 10/4/2004. Any advice is appreciated.

Attempt to open Excel file using ASP.NET. Sample snipet of source code is as
follows:
Dim _RptDocument As Object, _RptFormat As Object
Dim _RptFile As String = "C\Downloads\<a ny file name>.xls"

_RptFormat = New Excel.Applicati on()
_RptDocument = _RptFormat.Work Books
_RptDocument.Op en( _RptFile )
_RptFormat.Visi ble = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="tr ue"/>
I have no problem opening this on my local machine. When I use the network
- I continually get access denied.

If I use a username tag as follows:
<identify impersonate="tr ue" username = "Domain\usernam e"
password="passw ord/> - NOTE: I also set the security settings for
"R/W/Modify" for the folder too!
I get the following run-time error...
Source: System.Web
Error: Exception of type System.Web.Http UnhandledExcept ion was thrown.

'C:\Downloads\R pt.xls' could not be found. Check the spelling of the file
name, and verify that the file location is correct.

What do I need to do on the IIS server - or what security settings - what
account could I use to have the instruction "_RptFormat = New
Excel.Applicati on()" work properly - and view the Excel file from the server.

Nov 18 '05 #2
File is in proper place - actual location is H:\username\<fi lename>.xls.
My web app creates the file correctly and it's located here. I can't open
this from the server - I believe it's security issue - since file is there /
and possible error message from server is incorrect. NOTE: If I do this off
a local machine with IIS server - I have no problems too.

ALSO, NOTE: I do same thing with .PDF format of file - and I have no problem
downloading file then opening using Adobe Reader - from server & local
machine.

Problem appears to be issue with .XLS file is it won't open properly from
server. I think the "file not found" is misleading - it's more of a security
issue when doing this with Excel - and I'm @ a roadblock.

"Chuck Haeberle" wrote:
You say if you use impersonation, you get the file not found message.

Question - is the file in question on the C: drive on YOUR machine, or on
the web server?

If the file you want is on the C: drive of your machine but the web server
is a different machine, the web server is going to look on ITS C Drive, not
yours.

"DavidS" wrote:
1st post 10/4/2004. Any advice is appreciated.

Attempt to open Excel file using ASP.NET. Sample snipet of source code is as
follows:
Dim _RptDocument As Object, _RptFormat As Object
Dim _RptFile As String = "C\Downloads\<a ny file name>.xls"

_RptFormat = New Excel.Applicati on()
_RptDocument = _RptFormat.Work Books
_RptDocument.Op en( _RptFile )
_RptFormat.Visi ble = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="tr ue"/>
I have no problem opening this on my local machine. When I use the network
- I continually get access denied.

If I use a username tag as follows:
<identify impersonate="tr ue" username = "Domain\usernam e"
password="passw ord/> - NOTE: I also set the security settings for
"R/W/Modify" for the folder too!
I get the following run-time error...
Source: System.Web
Error: Exception of type System.Web.Http UnhandledExcept ion was thrown.

'C:\Downloads\R pt.xls' could not be found. Check the spelling of the file
name, and verify that the file location is correct.

What do I need to do on the IIS server - or what security settings - what
account could I use to have the instruction "_RptFormat = New
Excel.Applicati on()" work properly - and view the Excel file from the server.

Nov 18 '05 #3
Is Excel installed on the server and working properly?

"DavidS" wrote:
File is in proper place - actual location is H:\username\<fi lename>.xls.
My web app creates the file correctly and it's located here. I can't open
this from the server - I believe it's security issue - since file is there /
and possible error message from server is incorrect. NOTE: If I do this off
a local machine with IIS server - I have no problems too.

ALSO, NOTE: I do same thing with .PDF format of file - and I have no problem
downloading file then opening using Adobe Reader - from server & local
machine.

Problem appears to be issue with .XLS file is it won't open properly from
server. I think the "file not found" is misleading - it's more of a security
issue when doing this with Excel - and I'm @ a roadblock.

"Chuck Haeberle" wrote:
You say if you use impersonation, you get the file not found message.

Question - is the file in question on the C: drive on YOUR machine, or on
the web server?

If the file you want is on the C: drive of your machine but the web server
is a different machine, the web server is going to look on ITS C Drive, not
yours.

"DavidS" wrote:
1st post 10/4/2004. Any advice is appreciated.

Attempt to open Excel file using ASP.NET. Sample snipet of source code is as
follows:
Dim _RptDocument As Object, _RptFormat As Object
Dim _RptFile As String = "C\Downloads\<a ny file name>.xls"

_RptFormat = New Excel.Applicati on()
_RptDocument = _RptFormat.Work Books
_RptDocument.Op en( _RptFile )
_RptFormat.Visi ble = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="tr ue"/>
I have no problem opening this on my local machine. When I use the network
- I continually get access denied.

If I use a username tag as follows:
<identify impersonate="tr ue" username = "Domain\usernam e"
password="passw ord/> - NOTE: I also set the security settings for
"R/W/Modify" for the folder too!
I get the following run-time error...
Source: System.Web
Error: Exception of type System.Web.Http UnhandledExcept ion was thrown.

'C:\Downloads\R pt.xls' could not be found. Check the spelling of the file
name, and verify that the file location is correct.

What do I need to do on the IIS server - or what security settings - what
account could I use to have the instruction "_RptFormat = New
Excel.Applicati on()" work properly - and view the Excel file from the server.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
9871
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ********************************** package Celcom.Client;
2
2535
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text, radio, checkbox, and dropdown. When the form Submit button is clicked, I then need the input data either written to another location on the same page, or written to another page (a different frame would be fine)
5
2986
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig <<<<<<<<<<<<<<CODE>>>>>>>>>>>>>>>> <html>
16
2584
by: expertware | last post by:
Dear friends, My name is Pamela, I do not know anything about javascript, but I would like to ask if it offers a solution to this problem of mine. I have an image on a web page within a css layer: <DIV ID=MyLayer STYLE = "position: absolute;top:68px; left:563px;
4
2620
by: dixie | last post by:
Help, I'm really out of my depth here (not unusual I hear you say :-). I have just installed HTML Help in an application. I told it in the Project Properties the path to the help file. I then type in a command line that runs the help in the correct Context from a button on each form. It all worked fine - HERE. The problem is that when I sent it out to a site, the help file was not able to be accessed because it was my path in the...
6
2425
by: Rylios | last post by:
I am trying to make a very basic text editor using a linked list, fstream, sorting... This is what i have so far ------------------------------------------------------------------------------------------------------------------------------------ The Linked.H --- Header file #include <iostream> using namespace std;
1
1977
by: JumpingOffPlace | last post by:
Hi, I'm hoping that the wealth of knowledge here can stop me from spinning my wheels on this syntax error for hours. :) Below is the code, and the error I am recieving.... Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <%@ taglib uri="/WEB-INF/tag-lib/struts-html-el.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tag-lib/struts-bean.tld" prefix="bean" %>
4
1483
by: Ron | last post by:
I am having a bit of problem with this code: Dim cmd As New OleDb.OleDbCommand("INSERT INTO help (Name, Email, telephone, description)VALUES('" & txtName.Text & "','" & txtEmail.Text & "','" & txtTelephone.Text & "','" & txtDescription.Text & "')", New OleDb.OleDbConnection(strconn)) at the end, strconn is underlined in blue and says not defined, I dont know what to do with this, how do I define it?
1
1417
by: TriAdmin | last post by:
First let me thank you in advance for any help you can provide. I have a left hand navigation (nav) menu in a div tag. The menu has a few links that are actually javascript that display hidden submenu links. The code will be below. This error is happening in IE only - when you click on a link that displays hidden submenu links, it makes the entire nav bar wider. I have tried to troubleshoot with no luck so far so I humbly come to you for...
1
3204
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the code for attachment, I am not able to send anything. I get blank email. Can you please help me on this? Here is the html form:
0
8403
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8677
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7446
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5704
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4417
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.