Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Server Application Error

natxnatx Posts: 3Member
Server Application Error
I am a newbie using asp, however what i am trying to do is quite basic and i believe all is correct. am i forgetting to do something with the server?

any ideas? pls help

Many thanks in advance
Natalia


Error:

"Server Application Error
The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance
"

My Web Form:


Username
Password


My Response Page:

<%@ LANGUAGE="VBSCRIPT" %>
<% p_username = Request.form("p_username")
p_password = Request.form("p_password")


set cn = Server.CreateObject("ADODB.Connection")
cn.Open "Nataliaz_web"

sqlText="select * from Members where username='"&p_username&"'"
set userSet = cn.Execute(sqlText)
if userSet.EOF then
'No such username, so the recordSet is empty
Response.Redirect "loginati.asp?retry=username"
else
'The username is good, now let's check the password
real_password = trim(userSet("password"))

if p_password = real_password then
'Password is good, too
Response.Redirect "album.htm"
%>

<%
else
'Username is good, but password is wrong
Response.Redirect "loginati.asp?retry=password
end if
end if
%>

<%

userSet.Close
set userSet = Nothing

cn.Close
set cn = Nothing
%>

Comments

  • iwilld0itiwilld0it Posts: 1,134Member
    : Server Application Error
    : I am a newbie using asp, however what i am trying to do is quite basic and i believe all is correct. am i forgetting to do something with the server?
    :
    : any ideas? pls help
    :
    : Many thanks in advance
    : Natalia
    :
    :
    : Error:
    :
    : "Server Application Error
    : The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance
    : "
    :
    : My Web Form:
    :
    :
    : Username
    : Password
    :
    :
    : My Response Page:
    :
    : <%@ LANGUAGE="VBSCRIPT" %>
    : <% p_username = Request.form("p_username")
    : p_password = Request.form("p_password")
    :
    :
    : set cn = Server.CreateObject("ADODB.Connection")
    : cn.Open "Nataliaz_web"
    :
    : sqlText="select * from Members where username='"&p_username&"'"
    : set userSet = cn.Execute(sqlText)
    : if userSet.EOF then
    : 'No such username, so the recordSet is empty
    : Response.Redirect "loginati.asp?retry=username"
    : else
    : 'The username is good, now let's check the password
    : real_password = trim(userSet("password"))
    :
    : if p_password = real_password then
    : 'Password is good, too
    : Response.Redirect "album.htm"
    : %>
    :
    : <%
    : else
    : 'Username is good, but password is wrong
    : Response.Redirect "loginati.asp?retry=password
    : end if
    : end if
    : %>
    :
    : <%
    :
    : userSet.Close
    : set userSet = Nothing
    :
    : cn.Close
    : set cn = Nothing
    : %>
    :

    Make sure .NET is installed properly. Make sure all your web files have ASP.NET permissions set as well.

  • natxnatx Posts: 3Member
    How can i check if the web files have ASP.NET permissions set.

    My manager has installed the ASP.NET, but where can i find information about how to check if it has been installed properly?

    Thanks so much for your help, u cannot imagine how much i need it.

    Natalie



  • iwilld0itiwilld0it Posts: 1,134Member
    : How can i check if the web files have ASP.NET permissions set.
    :
    : My manager has installed the ASP.NET, but where can i find information about how to check if it has been installed properly?
    :
    : Thanks so much for your help, u cannot imagine how much i need it.
    :
    : Natalie
    :
    :
    :
    :

    On the webserver go to the web root directory where the actual website resides. Usaully its under "C:InetpubWWWRoot" .

    So for instance, if ur website is a virtual website called "MyWebSite" then u would go to "C:InetpubWWWRootMyWebSite".

    Now right click on the folder that contains the website and select properties then the Security tab.

    Make sure the "aspnet_wp" user is on the list. If not click "ADD" and select and add it to the list.

    Once aspnet_wp is on the list highlight it and then set its permessions at the bottom. I usually give it full control. Read and write permissions need to be set if you need to perform operations like opening a textfile from a webpage and so forth.

    If you want finer tune security then u can set permissions differently for the aspnet_wp user on each folder within your website. For instance you may want to only allow read/write operations on text files in a certain folder but nowhere else.

    Hopefully this helps you.

    NOTE: The webroot may be different depending on how IIS was installed.
Sign In or Register to comment.