473,387 Members | 3,750 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,387 software developers and data experts.

Using Virtual Folders and Forms Authentication - Strange problem

Hi,
This is a strange one. I have the following ASP.NET application:

/default.aspx
/login.aspx
/web.config

/bin/myapp.dll

/secure/aCommonSecurePage.aspx
/secure/PageWithNoCodeBehind.aspx
/secure/web.config <- simply denies access to unauthenticated
users
All this WAS under a single web site on my server and worked OK.

However, there are going to be multiple web sites on the server
(differentiated using host-headers, if that's important) and the pages
in the "/secure" folder will be identical for all of them so I thought
I'd put those "/secure" pages in a folder (say "D:\commonpages") and
use a "virtual directory" on each site, all pointing at the same
"D:\commonpages" folder.

However, this "broke" the ASP.NET application in very strange ways! If
I have the "/secure" virtual folder set up as an "application" in IIS,
"aCommonSecurePage.aspx" can't see the "myapp.dll" to execute its
compiled code (I get a "could not load type..." error). I expected
this I suppose. However, if I REMOVE the IIS application and then
browse to "/secure/aCommonSecurePage.aspx", IIS tries to return a
DEFAULT document for the folder, or gives "Directory browsing not
allowed" if there is none! It also TRUNCATES the URL in my browser to
"http://OneOfMySites/secure"!

If I browse to "http://OneOfMySites/secure/PageWithNoCodeBehind.aspx"
(which is exactly as it says (I think!) - just for HTML display only)
- it DOES show the page correctly!

So the virtual folder is set up OK - it just seems to go crazy when it
has to run off and find the dll? I thought that a plain virtual
directory would behave IDENTICALLY to a regular subfolder in the
application. I guess not?

Thanks for any advice.
Nov 18 '05 #1
0 967

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

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
1
by: dotnetprogram | last post by:
I have a web application in the parent directory(http://localhost/). it has a web.config setting as follows: <authentication mode="Forms"> <forms loginUrl="Login.aspx" name="UserToken"...
2
by: John Boghossian | last post by:
Is it possible to get forms authentication to work for a virtual directory in a site? I have been trying with the simplest MSDN sample but it doesn't seem to work. I have tried in a virtual...
1
by: Jerry Morton | last post by:
Hi, Is it possible to use ASP.NET Forms Authentication in an IIS "Virtual Directory"? As long as I don't setup the vdir as an application, it should behave like a regular sub-folder, right? My...
0
by: COHENMARVIN | last post by:
I have a web site where I put my asp.net application in a folder called /asp.net/hotelallocation. I want it to be protected by a password, so I put a web.config file in that folder. But now when...
0
by: abhijit | last post by:
hi, I am facing a strange forms authentication problem in IE 5.0 browser in MAc OS X 9.5 I could not test it in safari. this code: public partial class _Default : System.Web.UI.Page {...
1
by: charles | last post by:
Hi all, I have an ASP.Net application that has worked swell on both my development environment and production for some time now. Development is running on a WinXP Pro box, Production is running...
1
by: jbonifacejr | last post by:
I am unable to use the GetFolder method of the FileSystem object when trying to get the folders from within a Virtual Directory. Here is my setup... I have a Development Box (DB) and a...
4
by: tshad | last post by:
I have a site www.stf.com and a site www.stfstage.com (where I do all my testing). The problem is that www.stfstage.com is only internal and I need to get access from the outside (without...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...

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.