473,385 Members | 1,693 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,385 software developers and data experts.

Help with <location> element in web.config

Hi. I need to deny unauthenticated users from accessing an excel file
located within my webapp at SecurePages/ExcelFile1.xls. I've added the below
<locationelement to my web.config, but it allows unauthenticated users to
access the file. What am I doing wrong? Cannot .xls files be protected this
way?

<location path="SecurePages/ExcelFile1.xls">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
Jun 7 '07 #1
2 1688
I think you will have to map the xls extension to the asp.net DLL in IIS to
get this to work, so the request is being processed by asp.net and not just
by IIS.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Mike" <Mi**@discussions.microsoft.comwrote in message
news:BD**********************************@microsof t.com...
Hi. I need to deny unauthenticated users from accessing an excel file
located within my webapp at SecurePages/ExcelFile1.xls. I've added the
below
<locationelement to my web.config, but it allows unauthenticated users
to
access the file. What am I doing wrong? Cannot .xls files be protected
this
way?

<location path="SecurePages/ExcelFile1.xls">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>

Jun 7 '07 #2
On Jun 7, 11:04 pm, Mike <M...@discussions.microsoft.comwrote:
Hi. I need to deny unauthenticated users from accessing an excel file
located within my webapp at SecurePages/ExcelFile1.xls. I've added the below
<locationelement to my web.config, but it allows unauthenticated users to
access the file. What am I doing wrong? Cannot .xls files be protected this
way?

<location path="SecurePages/ExcelFile1.xls">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
It would work with Windows Authentication only.

Jun 7 '07 #3

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

Similar topics

0
by: Joe Abou Jaoude | last post by:
I have an application that support multiple cultures. the main folder is english, and the subfolder "French" is french. I don't want to create a web config in the subfolder french to specify the...
1
by: Cantekin Guneser | last post by:
when i used <location> tag as follow; </system.web> <location path="members" allowOverride="false"> <system.web> <authentication mode="Forms"> <forms loginUrl="./default.aspx"></forms>...
2
by: joeted | last post by:
Hello, I am trying to run a batch file on a (remote) .NET server (i'm not the admin) using system.diagnostics.process I find that the batch file is successfully executed. However, when i...
10
by: Brian Henry | last post by:
Hi, I am having a problem with an attachment system I made... it works with files up to ~3MB in size then after that if you try to upload a file it just goes to a "Page can not be displayed" page...
3
by: serge calderara | last post by:
Dear all, How to configure in config file, the fact that all users get access to the root web folder but only some of them to a restricted forlder Any sample ? thnaks for your help regards...
1
by: Dica | last post by:
i've got a few pages on my site that don't require authentication. is it possible to specify each on of these in the same node within web.config, or do i have to repeat for each? i'd like to do the...
1
by: paris baughman | last post by:
Im trying to setup impersonation in the root directory and turn it off ( false ) in another directory. im doing to allow my crystal reports to work ( as i get the login failed message ) and also...
1
by: alexvodovoz | last post by:
Hi, I have been struggling with this for the past couple of days. We have a custom http module setup in our project to filter some requests. I only want this module to be applied to certain...
2
by: alexvodovoz | last post by:
Hi, I have been struggling with this for the past couple of days. We have a custom http module setup in our project to filter some requests. I only want this module to be applied to certain...
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.