Access is denied error

Discussion in 'ASP.NET / ASP.NET Core' started by danhoe, Jan 27, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    I have created a web application named "app2". When I tried to access the aplication using http://www.myweb.com/app2/default.aspx, it should redirect me to the login page.

    But, insted it prompts out asking for ID and Password (like windows Authentication).
    "The server myweb.com at myweb.com requires a username and password.

    Warning: This server is requesting that your username and password be sent in an insecure manner (basic authentication without a secure connection)."

    When I click on Cancel, it shows error "Access is denied".

    Access is denied.
    Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

    Error message 401.2.: You do not have permission to view this directory or page using the credentials you supplied. Contact the Web server's administrator for help.

    I had checked through the KB & also ASP.Net forum. I had checked that the permission setting is allow for read/write for anonymous users.
    I am using authentication mode = "Form". Webconfig file as below:

    <authentication mode="Forms">
    <forms name="MyWebAuth" path="/" loginUrl="Login.aspx" protection="All" timeout="30">
    <credential infor goes here...> </forms>
    </authentication>

    <authorization>
    <deny users="?"/>
    </authorization>

    Please advice. Is that any setting that I am not doing right?
     
  2. Additional info

    1. Users need only to log in to access app2. Others pages are uncontrolled.
    2. I tried to change the webconfig to
    <authentication mode="Forms">
    <forms name="myWebAuth" path="/" loginUrl="http://myweb.com/Login.aspx" protection="All" timeout="30">
    <credentials goes here...>
    </credentials>
    </forms>
    </authentication>

    I created a new login.aspx at root level, instead of sub-folder (/app2/login.aspx). It did not prompt for ID & password. But, I still cannot redirect user to the /app2. Looks like I have to change the codes in /app2 to accept the user as logged in user...

    Is that a website can only have one login page? How can I do if I want only the user to be vlidated in /app2, using the login page in the app2 itself, without prompting me for ID & password?

    Please help... Thank you
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page