473,385 Members | 1,740 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.

Authentication problems

Hi,

I have implemented Forms authentication in my website. But I am getting "You
are not authorized to view this page" when i try to access a protected file
in folder2.

In the root of the website there are two folders(folder1 and folder2) and
many other .aspx files.
Files in folder2 are protected. Login page is in folder2. Web.config file in
folder2 is as follows,

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
<location path="existinguserslogin.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>

This error is happening only when I uploaded the website to the production
server(win 2003). On development server(Win 2000 Adv) evrything works fine.

Can anyone guide me as to what is going wrong

Freddy
Nov 18 '05 #1
1 919
Thanks ranganh.

In the IIS control pnale under WebServices extension asp.net allowed is
there.
I figured out the problem. I am trying to access the protected pages using
https: and in the web.config file in the root folder I am using https in the
loginUrl for the form authentication. I removed this https and specified the
file name directly and it worked.

Freddy

"ranganh" <ra*****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...
Dear Freddy,

First let me know if you are able to access other pages.

Basically in Windows 2003, asp.net is prohibited by default and you have to enable the same.
Go to IIS Control panel and check the WebServices Extension. It will display a list of accounts. Make the asp.net "Allowed". That would solve
the problem.
If you have done that already and are able to browse the other pages, let me know.
Thanks.

"Freddy" wrote:
Hi,

I have implemented Forms authentication in my website. But I am getting "You are not authorized to view this page" when i try to access a protected file in folder2.

In the root of the website there are two folders(folder1 and folder2) and many other .aspx files.
Files in folder2 are protected. Login page is in folder2. Web.config file in folder2 is as follows,

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
<location path="existinguserslogin.aspx">
<system.web>
<authorization>
<allow users="?"/>
</authorization>
</system.web>
</location>
</configuration>

This error is happening only when I uploaded the website to the production server(win 2003). On development server(Win 2000 Adv) evrything works fine.
Can anyone guide me as to what is going wrong

Freddy

Nov 18 '05 #2

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

Similar topics

1
by: Adi Sapir | last post by:
Hi, We're currently planning to migrate from SQL Auth to Windows Auth. Personally, I do not have too much experience with Windows authentication but have heard that there are some problems when...
0
by: Dotnet Guy | last post by:
I have set up forms authentication for my web application. I have several subdirectories inside a main directory and I have forms authentication for each of my sub directories. In the logon page...
2
by: Mike | last post by:
1. For some reason after the session has ended and the authentication cookie has expired I'm not being redirected to the login page. Insted I'm be assigned a new authentication cookie? Anyone have...
4
by: Lewis Edward Moten III | last post by:
I have a file that users can download through a web page protected by forms authentication: Download.aspx?ID=45 and within that file ... FileInfo fileToDownload = new FileInfo(fileName);
3
by: SMG | last post by:
Hi All, It might be a silly doubt, but it is a doubt.... I am using form authentication for my website, now my web application is gonna be deployed on two web servers with Load Balancing...
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: 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
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
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...
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.