473,809 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
<locationelemen t 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="SecurePag es/ExcelFile1.xls" >
<system.web>
<authorizatio n>
<deny users="?" />
</authorization>
</system.web>
</location>
Jun 7 '07 #1
2 1707
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**@discussio ns.microsoft.co mwrote in message
news:BD******** *************** ***********@mic rosoft.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
<locationelemen t 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="SecurePag es/ExcelFile1.xls" >
<system.web>
<authorizatio n>
<deny users="?" />
</authorization>
</system.web>
</location>

Jun 7 '07 #2
On Jun 7, 11:04 pm, Mike <M...@discussio ns.microsoft.co mwrote:
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
<locationelemen t 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="SecurePag es/ExcelFile1.xls" >
<system.web>
<authorizatio n>
<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
1540
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 culture, so I m using the location element in the web.config in the main folder. I have the folowing in web config file: <location path="MyWebApp/French/"> <system.web> <globalization culture="fr-FR" uiCulture="fr-FR" >
1
2582
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> </authentication> <authorization> <deny users="?" /> </authorization>
2
2126
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 put <identity impersonate="true"/> in my web.config i get an "access denied" exception.
10
3091
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 like it tried to do it but errored... I thought changeing the max size for the file input box to about 100mb would fix it but nope here is my page code and my code behind code... ===============
3
1487
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 serge
1
1113
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 following if possible: <location path="LoginFailed.aspx", "help.aspx", "faqs.aspx", "sendpassword.aspx"> <system.web> <authorization>
1
1479
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 ensure that only certain people has access to the maintenance folder ( impersonation = true ). Here is the webconfig : <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web>
1
1268
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 pages. In order to try to do this I have added the following test code in our web.config file. <location path="Login.aspx"> <system.web>
2
2362
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 pages. In order to try to do this I have added the following test code in our web.config file. <location path="Login.aspx"> <system.web>
0
9603
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
10378
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
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...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
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
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4333
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
3862
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.