473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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\<any file name>.xls"

_RptFormat = New Excel.Application()
_RptDocument = _RptFormat.WorkBooks
_RptDocument.Open( _RptFile )
_RptFormat.Visible = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="true"/>
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="true" username = "Domain\username"
password="password/> - 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.HttpUnhandledException was thrown.

'C:\Downloads\Rpt.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.Application()" work properly - and view the Excel file from the server.

Nov 18 '05 #1
3 1168
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\<any file name>.xls"

_RptFormat = New Excel.Application()
_RptDocument = _RptFormat.WorkBooks
_RptDocument.Open( _RptFile )
_RptFormat.Visible = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="true"/>
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="true" username = "Domain\username"
password="password/> - 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.HttpUnhandledException was thrown.

'C:\Downloads\Rpt.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.Application()" work properly - and view the Excel file from the server.

Nov 18 '05 #2
File is in proper place - actual location is H:\username\<filename>.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\<any file name>.xls"

_RptFormat = New Excel.Application()
_RptDocument = _RptFormat.WorkBooks
_RptDocument.Open( _RptFile )
_RptFormat.Visible = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="true"/>
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="true" username = "Domain\username"
password="password/> - 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.HttpUnhandledException was thrown.

'C:\Downloads\Rpt.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.Application()" 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\<filename>.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\<any file name>.xls"

_RptFormat = New Excel.Application()
_RptDocument = _RptFormat.WorkBooks
_RptDocument.Open( _RptFile )
_RptFormat.Visible = True

When I use impersonation in ASP.NET application - web.config file...
<identity impersonate="true"/>
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="true" username = "Domain\username"
password="password/> - 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.HttpUnhandledException was thrown.

'C:\Downloads\Rpt.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.Application()" 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
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 ...
2
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,...
5
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 ...
16
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...
4
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...
6
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...
1
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...
4
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 & "','" &...
1
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...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.