problems with windows basic authentication

Discussion in 'ASP .Net' started by sefe dery, Oct 7, 2005.

  1. sefe dery

    sefe dery Guest

    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
     
    sefe dery, Oct 7, 2005
    #1
    1. Advertising

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

    "sefe dery" <> wrote in message
    news:#...
    > 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
     
    Patrick.O.Ige, Oct 8, 2005
    #2
    1. Advertising

  3. sefe dery

    sefe dery Guest

    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 schrieb:
    > Hmmm. this error seems wierd!
    > Try locating exactly where the error is coming from ..is it from
    > web.config or you code?
    > Patrick
    >
    > "sefe dery" <> wrote in message
    > news:#...
    >
    >>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

    >
    >
    >
     
    sefe dery, Oct 9, 2005
    #3
  4. Then try seeing through your web.config...
    Or create a new one and test it
    Patrick


    "sefe dery" <> wrote in message
    news:...
    > 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 schrieb:
    > > Hmmm. this error seems wierd!
    > > Try locating exactly where the error is coming from ..is it from
    > > web.config or you code?
    > > Patrick
    > >
    > > "sefe dery" <> wrote in message
    > > news:#...
    > >
    > >>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

    > >
    > >
    > >
     
    Patrick.O.Ige, Oct 10, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brett Porter
    Replies:
    2
    Views:
    781
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  2. Mark
    Replies:
    0
    Views:
    684
  3. Brett Porter
    Replies:
    5
    Views:
    592
    Brett Porter
    Feb 3, 2004
  4. Dom
    Replies:
    0
    Views:
    473
  5. Dom
    Replies:
    0
    Views:
    518
Loading...

Share This Page