473,387 Members | 1,603 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.

webconfig

Hi all

I'm using forms authentication for my page. My webconfig
(parts):

<authentication mode="Forms" >
<forms
name="AuthCookie"
path="\"
loginUrl="Login.aspx"
protection="All"
timeout="200">
<credentials passwordFormat="Clear">
<user name="Test" password="Password" />
</credentials>
</forms>
</authentication>

<authorization>

<deny users="?" />

</authorization>
</system.web>
<location path="start.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="Login.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>

If I use instead:
<authorization>
<allow users="*" />
</authorization>

everthing works fine.
If I do login correct I can't find a authentification
cookie in IE (in Netscape an authentification cookie can be
found).
After login the same page is shown with the following url:
http://localhost/..../Login.aspx?Ret...Selection.aspx

My forms-code is:

If (FormsAuthentication.Authenticate(TextBox_Name.Tex t,
TextBox_Password.Text)) Then
FormsAuthentication.SetAuthCookie(TextBox_Name.Tex t,False)
Response.Redirect("Selection.aspx", True)
....

Is there someting wrong?

Thanks a lot for help!

Jenny
Nov 17 '05 #1
1 1213
AW
Hi Jenny,

Try to these two changes together:

1. replace
<authorization>
<deny users="?" />
</authorization>

with
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>

2. replace
FormsAuthentication.SetAuthCookie(TextBox_Name.Tex t,False)
Response.Redirect("Selection.aspx", True)

with
FormsAuthentication.RedirectFromLoginPage(TextBox_ Name.Text,True)
--
To reply, remove a "l" before the @ sign.

Arnaud Weil - MCT, MCSD.Net, MCAD.Net
Nov 17 '05 #2

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

Similar topics

2
by: Vai2000 | last post by:
Hi All, I am calln WS via my aspx application. I am passing arguments an entire content of a file, sometimes the filesize i.e. the content size exceeds 4MB. In that case do I have to go and alter...
6
by: Buz Waitz | last post by:
I have prepared a site on one machine, but when I move the site to the machine I wish to use as a host, I have problems. If I use a default.htm file, I have no trouble accessing the site. However,...
2
by: Jim Heavey | last post by:
I am trying to figure out how to "deal" with placing the connection string into the webconfig file when the connection string contains " and '. Here is my connection string... //...
1
by: brian | last post by:
I have a webconfig file in my root directory in IIS with session state set for 100 minutes. All login information is stored in session variables for the site. I have a page that is used by our...
1
by: rapaka.srinivas | last post by:
Hi i am having a problem with dynamic webconfig.What i am doing exactly is i am calling a fucntion in app_start event that will fetch connection string from my system registry and updates my...
5
by: Paul W Smith | last post by:
My application uses two ways to connect to the Access db: Programtically: Dim sDBPath = "Data Source=D:\MCCL\AccessDB\NewMCCL.mdb;" Dim sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" &...
0
by: jambalapamba | last post by:
Hi I am trying to acess my webconfig file in aspx page .I know we can acess in code behind using ConfigurationManager.ConnectionStrings.ConnectionString; but i want to acess in aspx...
4
by: =?Utf-8?B?bWFkaHVzcnA=?= | last post by:
Hi, Could anyone suggest me an idea to encrypt the webconfig file's connection string in the framework 1.1. Thank you in Advance -- Lets Learn and Make All Learn
2
by: pavanip | last post by:
I placed my asp.net code in my server and i placed my database stuff in web hosting server.I created a virtual directory in web hosting server to access my files from my server.I have written the...
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
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?
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...
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.