problems with windows basic authentication

S

sefe dery

hi ng,

i try to create a asp.net 1.0 website on windows server 2003(Servername:
ServerX) with iis 6.0.

PROBLEM:
The user should login with his windows credentials in basic.aspx and
automatically redirect to his own files.

i have the following file-structure:
app/basic/basic.aspx
app/basic/web.config (w-b)

app/basic/user_1/index.aspx
app/basic/user_1/web.config (w-1)

app/basic/user_2/index.aspx
app/basic/user_2/web.config (w-2)

I have done the following steps:
1.)i created on the server the windows account for user_1 and user_2

2.)In IIS 6.0 i deactivated the anonymous login and activated only the
basic authentication

3.)In basic.aspx i wrote following to automate the redirect
------
Dim ToSite As String
Dim wp As IIdentity

wp = HttpContext.Current.User.Identity
ToSite = wp.Name.Substring(wp.Name.LastIndexOf("\") + 1) &
"/index.aspx"
Response.Redirect(ToSite , True)
------
THIS CODE WORKS
------
3.1) web.config (w-b) includes:
------
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
------
3.2)user_1 web.config (w-1) includes:
------
<authentication mode="Windows" />
<authorization>
<allow users="ServerX\user_1" />
<deny users="*" />
</authorization>
------
3.3)user_2 web.config (w-2) includes:
------
<authentication mode="Windows" />
<authorization>
<allow users="ServerX\user_2" />
<deny users="*" />
</authorization>

If the user_1 opens the site app/basic/basic.aspx a windows popup appears.
The user_1 uses his windows credentials and will redirected to his own
files app/basic/user_1/index.aspx, but this site doesnt work and i dont
know why?

The following failure message appears:[TRANSLATED AUTOMATIC FROM GERMAN]
"Run time error"
"description: On the server an application error arose. Due to the
current user-defined error attitudes for this application the details of
the application error cannot be indicated "
But this Message doesnt say antything worthfull.

How can i solve this problem?

thx
SEFER
 
P

Patrick.O.Ige

Hmmm. this error seems wierd!
Try locating exactly where the error is coming from ..is it from
web.config or you code?
Patrick
 
S

sefe dery

The problem have to be coming from "web.config", because there is no
code anywhere else.

For test purposes. i have removed the redirect code from basic.aspx and
put instead of a hyperlink to the sites
user_1/index.aspx and
user_2/index.aspx but it doesnt work, too!

I think i have a to change something in web.config (w-1) or (w-2)!
SEFER

Patrick.O.Ige said:
Hmmm. this error seems wierd!
Try locating exactly where the error is coming from ..is it from
web.config or you code?
Patrick

hi ng,

i try to create a asp.net 1.0 website on windows server 2003(Servername:
ServerX) with iis 6.0.

PROBLEM:
The user should login with his windows credentials in basic.aspx and
automatically redirect to his own files.

i have the following file-structure:
app/basic/basic.aspx
app/basic/web.config (w-b)

app/basic/user_1/index.aspx
app/basic/user_1/web.config (w-1)

app/basic/user_2/index.aspx
app/basic/user_2/web.config (w-2)

I have done the following steps:
1.)i created on the server the windows account for user_1 and user_2

2.)In IIS 6.0 i deactivated the anonymous login and activated only the
basic authentication

3.)In basic.aspx i wrote following to automate the redirect
------
Dim ToSite As String
Dim wp As IIdentity

wp = HttpContext.Current.User.Identity
ToSite = wp.Name.Substring(wp.Name.LastIndexOf("\") + 1) &
"/index.aspx"
Response.Redirect(ToSite , True)
------
THIS CODE WORKS
------
3.1) web.config (w-b) includes:
------
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
------
3.2)user_1 web.config (w-1) includes:
------
<authentication mode="Windows" />
<authorization>
<allow users="ServerX\user_1" />
<deny users="*" />
</authorization>
------
3.3)user_2 web.config (w-2) includes:
------
<authentication mode="Windows" />
<authorization>
<allow users="ServerX\user_2" />
<deny users="*" />
</authorization>

If the user_1 opens the site app/basic/basic.aspx a windows popup appears.
The user_1 uses his windows credentials and will redirected to his own
files app/basic/user_1/index.aspx, but this site doesnt work and i dont
know why?

The following failure message appears:[TRANSLATED AUTOMATIC FROM GERMAN]
"Run time error"
"description: On the server an application error arose. Due to the
current user-defined error attitudes for this application the details of
the application error cannot be indicated "
But this Message doesnt say antything worthfull.

How can i solve this problem?

thx
SEFER
 
P

Patrick.O.Ige

Then try seeing through your web.config...
Or create a new one and test it
Patrick


sefe dery said:
The problem have to be coming from "web.config", because there is no
code anywhere else.

For test purposes. i have removed the redirect code from basic.aspx and
put instead of a hyperlink to the sites
user_1/index.aspx and
user_2/index.aspx but it doesnt work, too!

I think i have a to change something in web.config (w-1) or (w-2)!
SEFER

Patrick.O.Ige said:
Hmmm. this error seems wierd!
Try locating exactly where the error is coming from ..is it from
web.config or you code?
Patrick

hi ng,

i try to create a asp.net 1.0 website on windows server 2003(Servername:
ServerX) with iis 6.0.

PROBLEM:
The user should login with his windows credentials in basic.aspx and
automatically redirect to his own files.

i have the following file-structure:
app/basic/basic.aspx
app/basic/web.config (w-b)

app/basic/user_1/index.aspx
app/basic/user_1/web.config (w-1)

app/basic/user_2/index.aspx
app/basic/user_2/web.config (w-2)

I have done the following steps:
1.)i created on the server the windows account for user_1 and user_2

2.)In IIS 6.0 i deactivated the anonymous login and activated only the
basic authentication

3.)In basic.aspx i wrote following to automate the redirect
------
Dim ToSite As String
Dim wp As IIdentity

wp = HttpContext.Current.User.Identity
ToSite = wp.Name.Substring(wp.Name.LastIndexOf("\") + 1) &
"/index.aspx"
Response.Redirect(ToSite , True)
------
THIS CODE WORKS
------
3.1) web.config (w-b) includes:
------
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
------
3.2)user_1 web.config (w-1) includes:
------
<authentication mode="Windows" />
<authorization>
<allow users="ServerX\user_1" />
<deny users="*" />
</authorization>
------
3.3)user_2 web.config (w-2) includes:
------
<authentication mode="Windows" />
<authorization>
<allow users="ServerX\user_2" />
<deny users="*" />
</authorization>

If the user_1 opens the site app/basic/basic.aspx a windows popup appears.
The user_1 uses his windows credentials and will redirected to his own
files app/basic/user_1/index.aspx, but this site doesnt work and i dont
know why?

The following failure message appears:[TRANSLATED AUTOMATIC FROM GERMAN]
"Run time error"
"description: On the server an application error arose. Due to the
current user-defined error attitudes for this application the details of
the application error cannot be indicated "
But this Message doesnt say antything worthfull.

How can i solve this problem?

thx
SEFER
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top