| | |
Updated : Simple ASP.Net Login Page
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2005
Posts: 18
Reputation:
Solved Threads: 2
LOL but what cracks me up about this error tho is that when I try to login with just garbage as the username and password 3 times in a row until I get directed to denied.aspx then hit the back button and put in a correct username and pass it works and the Session("Logged_IN") variable is set to "Yes" on my default page. I am like you I am lost here. LOL
Miller
Miller
I ran your code...and it works.
So something is messed up with either your settings in the browser or IIS?
Hehe..... sorry I dont have a more definite asnwer.
So something is messed up with either your settings in the browser or IIS?
Hehe..... sorry I dont have a more definite asnwer.
•
•
Join Date: Apr 2005
Posts: 18
Reputation:
Solved Threads: 2
I have tried IE and Mozilla to run the application and from different computers. I started a completely new project with basic controls with the code and I still get the same thing. It redirects me back to login unless I type incorrect username and pass 3 times then try again it finally redirects me and then all the other forms work correctly and the session variable holds throughout. I'm going to give you my IIS setup and maybe u might see something I have wrong.
IIS 5.1 XP Pro
Virtual Directory tab
Read - checked
Log visits - checked
Index this resource - checked
Execute Permissions - Scripts only
Application Protection - Medium
Configuration button
- Option
- Enable session state - 20 min
- Enable buffering - checked
- Enable parent paths - checked
- Default ASP Language - VBScript
- ASP Script timeout - 90 seconds
- Debugging
- Enable ASP server-side script debugging
Directory Security tab
Anonymous access - checked
Allow IIS to control pass - checked
Basic authentication - checked
Integrated Windows authentication - checked
Miller
IIS 5.1 XP Pro
Virtual Directory tab
Read - checked
Log visits - checked
Index this resource - checked
Execute Permissions - Scripts only
Application Protection - Medium
Configuration button
- Option
- Enable session state - 20 min
- Enable buffering - checked
- Enable parent paths - checked
- Default ASP Language - VBScript
- ASP Script timeout - 90 seconds
- Debugging
- Enable ASP server-side script debugging
Directory Security tab
Anonymous access - checked
Allow IIS to control pass - checked
Basic authentication - checked
Integrated Windows authentication - checked
Miller
•
•
Join Date: Apr 2005
Posts: 1
Reputation:
Solved Threads: 0
For the login.aspx it works properly. It's great. How about odbc? I had tried to use DSN by using ODBC. This is the error "Operator is not defined for type 'DBNull' and type 'Integer'". My e-m: aromsayc@hotmail.com
Aromsay
Aromsay
•
•
•
•
Originally Posted by aromsayc
For the login.aspx it works properly. It's great. How about odbc? I had tried to use DSN by using ODBC. This is the error "Operator is not defined for type 'DBNull' and type 'Integer'". My e-m: aromsayc@hotmail.com
Aromsay
Did you use something like this for creating a DSN connection?
Dim conn As New OdbcConnection("DSN=TestDSN")
Oh, I should mention this now. I do not reply directly to emails, and rarely directly to private messages here (some exceptions). If it is something that I can answer here that will help everyone I would rather do that. So please do not request me to send you an email to answer your specific problem. Fact is, if you have an issue, others may as well.
•
•
Join Date: Apr 2005
Posts: 5
Reputation:
Solved Threads: 0
i have the same problem as millers_35 i do the authorization and if it returns true i redirect to the default.aspx and create the session (ok other way round first session then the redirect) as put in the tutorial so it can only redirect if i am logged in and it has to create a session otherwhyse it msu give an error. ok so i am on default then and the session is disapeared :-( ... i am geting realy frustrated about this. do you have any idea on what is going wrong ...btw i get the same problem on my real webserver hosted by easycgi so it cant be a settingsproblem of my iis
Ok, I am sorry to say I do not follow what you are saying.
You get an error when you try to login ? How do you mean it has to create a session otherwise (correct spelling) it gives an error?
Here is what I would do:
1. I would Recreate a new project, new directory, and build it in stages. i.e. Paste in the HTML code, and compile the code. Paste in the VB.Net code, complie, etc... that way you will see any errors that come up in the code.
2. Provide the error message you are getting and I may be able to give more details.
As I told millers_35, I am really stumped. I have done this same application about 20 times on numerous machines to boot with no issues like this.
Sorry I couldn't provide more help.
On that note, have you tried doing a simple ASP.Net page, like retrieving data from the db? i.e. Create a simple datagrid populating with a simple select statement?
You get an error when you try to login ? How do you mean it has to create a session otherwise (correct spelling) it gives an error?
Here is what I would do:
1. I would Recreate a new project, new directory, and build it in stages. i.e. Paste in the HTML code, and compile the code. Paste in the VB.Net code, complie, etc... that way you will see any errors that come up in the code.
2. Provide the error message you are getting and I may be able to give more details.
As I told millers_35, I am really stumped. I have done this same application about 20 times on numerous machines to boot with no issues like this.
Sorry I couldn't provide more help.
On that note, have you tried doing a simple ASP.Net page, like retrieving data from the db? i.e. Create a simple datagrid populating with a simple select statement?
•
•
•
•
Originally Posted by blacknight
i have the same problem as millers_35 i do the authorization and if it returns true i redirect to the default.aspx and create the session (ok other way round first session then the redirect) as put in the tutorial so it can only redirect if i am logged in and it has to create a session otherwhyse it msu give an error. ok so i am on default then and the session is disapeared :-( ... i am geting realy frustrated about this. do you have any idea on what is going wrong ...btw i get the same problem on my real webserver hosted by easycgi so it cant be a settingsproblem of my iis
•
•
Join Date: Apr 2005
Posts: 18
Reputation:
Solved Threads: 2
Sup guys, I finished the project I was working on. I appreciate the help I got from Paladine. His tutorial helped be quite a bit on getting started. I ended up using cookies instead of session variables. I think the problem I was having with the session variables dropping was because of where the variables were getting stored. Paladine do the variables get stored in server memory or on the local machine memory? That being asked I think the problem lies within this from the web.config file
the sessionState mode will take on different settings "SQLServer, InProc, and StateServer. Could it be that he doesnt have his set to the correct value. Again I am still learning as well and do not have a definite answer and hoping someone could correct me on this if I am wrong.
Miller
ASP.NET Syntax (Toggle Plain Text)
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
the sessionState mode will take on different settings "SQLServer, InProc, and StateServer. Could it be that he doesnt have his set to the correct value. Again I am still learning as well and do not have a definite answer and hoping someone could correct me on this if I am wrong.
Miller
FYI
Registration Page completed : ASP.Net Registration Page
And miller_35, as far as I know (no resources at my work to verify), but session variables are on the User Side (i.e. When the application is closed, or you close your browser, the session is ended.)
Thanks for the compliments. Folks let me know if there is anything else anyone wants to have a tutorial on for ASP.Net.
Registration Page completed : ASP.Net Registration Page
And miller_35, as far as I know (no resources at my work to verify), but session variables are on the User Side (i.e. When the application is closed, or you close your browser, the session is ended.)
Thanks for the compliments. Folks let me know if there is anything else anyone wants to have a tutorial on for ASP.Net.
![]() |
Similar Threads
Other Threads in the ASP.NET Forum
- Previous Thread: Parent and Child Classes
- Next Thread: Creating waiting page in ASP.net
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net beginner bottomasp.net box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form forms gridview gudi homeedition hosting iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings redirect registration relationaldatabases rotatepage search security select serializesmo.table sessionvariables silverlight smartcard sql ssl tracking treeview typeof validatedate validation vb.net virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopment wizard xml xsl





