Slade 66 Practically a Master Poster

only to find

Slade 66 Practically a Master Poster

SO you can boot of the 98 disk, but not the xp disk?

Slade 66 Practically a Master Poster

Hmm, I've had this problem before. The only thing is... I solved it by booting off the winxp then doing a repair, typing:

chkdsk /r

(I think)

Let me sleep on it... I'll get back to you asap.

p.s. try using other bootable cds such as norton av 2003 to see if it is your win xp cd or otherwise.

I will try and help you further with this, but I offer no guarantees.

Slade 66 Practically a Master Poster

Thankyou very much, your help will not go unrewarded.

Slade 66 Practically a Master Poster

Yeah lately I've been pretty flat out with the job, this week especially. It's only a short week here in Australia, we had Monday off, and we have to go down to some awards thing in a town about 4hours away from here on Friday and I have to deploy my asp .net application so employees can update the vacancies page of our website instead of me doing manual data entry :P. Then on top of that I have to train all receptionists across the branches over the phone to use it. THEN on top of that, I have to create a powerpoint presentation for this awards thingy coming up. THEN on top of that, I am working on my personal website every spare moment I get. On top of that I am stressing out about some computer parts I've ordered from Brisbane that I ordered AGES ago and they still aren't in stock :(. You can imagine how stressed I am, I am fresh out of year 12, the only thing I had to worry about during school was missing the bus. Now it's bloody everything, phone bill, electricity bill etc etc. But everyone else has made it so I'm not going to let anything phase me :D I'm just staying happy. It's hard to be angry or upset having friends such as mine. Anyways that was one HUGE rant.

Slade 66 Practically a Master Poster

This article will inform you more about forms Authentication using ASP .NET and Visual Basic .net (VB .NET). Before I continue I must stress that the web.config is xml and must be used with extreme sensitivity in mind. All tags must be closed etc. or else you will end up with endless problems trying to figure out what you've done wrong. I should also stress that no code should be copied from this article as invisible characters such as spaces may be carried with it and your code wont work. The best thing to do is just to type it from scratch.

When using forms Authentication you must first declare it in the web.config. If you are using vb .net as your language then the web.config will allready have been auto-generated for you. The default is:

<authentication mode="Windows" />

Authentication modes that can be used are: "Windows", "Passport" and of course "Forms". Since this post is about Forms authentication we will be using "Forms" and perhaps I will go more indepth about the others in a later post. Now that we have chosen forms authentication, we have to remove the '/' at the end as this is closing the tag and we have yet to enter more information in so we do this:

<authentication mode="Forms">
More to go here
</authentication>

The Forms authentication has the following properties:

Name: The name of the HTTP cookie where authentication information is stored

loginUrl: The name says it all :) what …

Slade 66 Practically a Master Poster

have you tried actually storing it in a session?

Session("ws") = ws.authenticateuser

Sorry, I'm not sure if I'm going to be very helpful with this one :S

p.s. this should be posted in the asp .net forum :)

Slade 66 Practically a Master Poster

lol soz for not replying. Yeah I'm kinda in a band at the moment.... kinda... and the guitar is a fully sic black Ibanez rg170, I love it man. I'm written a few riffs and songs, most are depressing since I used to be all morbid and stuff but yeah, things have gotten alot better since then, I just haven't written any songs because I'm waaaay to busy lately :).

Slade 66 Practically a Master Poster

For some reason, when I am in the password text box, when I press enter, it simply clears both fields. Doesn't validate, doesn't login, just clears the fields. What is going on here?

Codebehind:

PrivateSub cmdLogin_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.ServerClick
If FormsAuthentication.Authenticate(txtUser.Text, txtPass.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtUser.Text, chkPersist.Checked)
Else
lblStatus.Text = "Not Authenticated"
IfCInt(ViewState("Tries")) > 1 Then
Response.Redirect("Denied.aspx")
Else
' Otherwise, increment number of tries.
ViewState("Tries") = CInt(ViewState("Tries")) + 1
EndIf
EndIf
EndSub

And the aspx page is attached. Please help.

Slade

Slade 66 Practically a Master Poster

I need to create a date updated field for ms sql 2000. The current trigger I have only works for the insertion of data and it is "(getdate())" is there one that I can use for insertion and update of fields?

Ta,

Slade

Slade 66 Practically a Master Poster

I just researched a little. It's not possible :).

Slade 66 Practically a Master Poster

Is there any possible way to remove a query string without redirecting to another page? You see, my problem is I am using panels, when the create new button is clicked, it gives the querystring of "?JobID=New" now when I click on another button (which simply hides the current panel and makes another visible), the query string is still there. I have tried Request.QueryString.Remove and Request.QueryString.Clear but it says it is read only, is there any possible way to remove it?

Slade 66 Practically a Master Poster

Visual Studio .NET was developed by microsoft, so the learning curve for the GUI is easy if you have used other microsoft programs before. Also, I have been learning asp .net, vb .net and c# .net for the past 4-5 months and I must say that I allready have a reasonable knowledge of each language. The only language I have programmed in before these was vb6 and a little c/c++ so, I haven't had much experience. The learning is quick and fun. What languages are you using at the moment? Some good books are:

SAMS teach yourself vb .net in 24 days
SAMS teach yourself asp .net in 24 days

I have both books (I think it's 24 days lol, I forget) but yeah. Basically I read a little of those as well as do some research on the web. It seems hard starting off but it doesn't take long for you to get used to it.

Hope I helped,

Slade

Slade 66 Practically a Master Poster

I'm not sure if it's fixable at all.

Slade 66 Practically a Master Poster

cookie -> kickarsesig!

Slade 66 Practically a Master Poster

haha, I payed around 1600 AU for my setup, probably about 2000 now.

Slade 66 Practically a Master Poster

inside a compactor

Slade 66 Practically a Master Poster

lol yep, and I do it when people are around too. I usually rip out my guitar for my fav songs and try to learn them.

Slade 66 Practically a Master Poster

I have been working with this code for a while now... after a few builds there is an error. What actually happens is in the aspx code, the "runat = server" disappears. This is more than likely because it isn't included in the <forms>tag</forms>


Anyways, just a little bit of extra info.

Slade

Slade 66 Practically a Master Poster

haha good reminder :)

Slade 66 Practically a Master Poster

I have an alternative to this, will show you once I do it :P

Thanks heaps Paladine, you shed some light on a few things.

Slade 66 Practically a Master Poster

Fiero ->Mozilla

Slade 66 Practically a Master Poster

Well firefox 0.8 is my fav... haven't had troubles with it. I would try netscape if I were you, they use some mozilla source code but you should give it a go and see what happens. Opera is very bad, I highly dislike it. Otherwise it's IE for you buddy!

Slade 66 Practically a Master Poster

Slade kills him.

Slade 66 Practically a Master Poster

Suddenly, Incissor died.
(look it's become 3 word sentences!)

Slade 66 Practically a Master Poster

that Slade stole.

Slade 66 Practically a Master Poster

chiquita -> Liero

Slade 66 Practically a Master Poster

lol well I copied and pasted it from vs .net, but I've done it before using this rich text editor :D

Slade 66 Practically a Master Poster

OK I would still like to get the windows encryption working (above) but I have finished a web application one for now:

Imports System.Web.Security

PrivateSub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click
Dim encpass AsString = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "sha1")
lblResult.Text = encpass.ToString()
EndSub
Slade 66 Practically a Master Poster

I can't understand why my code wont work. Check it out.

Imports SHA1_Encryption 
Imports System.Security.Cryptography
 
PublicClass Form1 
Inherits System.Windows.Forms.Form
 
(Windows for designer generated code)
 
PublicFunction ComputeHashValue(ByVal data() AsByte) AsByte() 
Dim hashAlg As SHA1 = SHA1.Create() 
Dim hashvalue() AsByte = hashAlg.ComputeHash(data) 
Return hashvalue 
EndFunction
 
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 
Dim test AsByte() 
test = ComputeHashValue(Encoding.ASCII.Text(TextBox1.Text)) 
EndSub 
EndClass

The encoding part wont work and when I hover over it it says. "Name 'Encoding' is not declared." any ideas? Maybe I'm missing a library reference?

Slade 66 Practically a Master Poster

Yeah man, maybe that's it, I dunno, but I really really like the whole yelling/screaming thing, it does relieve a bit of stress I guess. I still have no idea of my fav. heavy metal song, it is leaning more toward a7x again, I guess it just changes with what I currently listen to *shrug*.

Slade 66 Practically a Master Poster

Ok, here I have my hit counter as a text file.

PrivateSub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
 
IfNot Page.IsPostBack Then
Dim nCount As Int32 = 108
nCount = GetCounterValue()
lblTest.Text = nCount.ToString()
EndIf
EndSub


PrivateFunction GetCounterValue() As Int32
Dim ctrFile As StreamReader
Dim ctrFileW As FileStream
Dim sw As StreamWriter
Dim strPath AsString = Server.MapPath("indexcount.txt")
Dim strCounterContents AsString
Dim nCounter As Int32
If (File.Exists(strPath)) Then
	 ctrFile = File.OpenText(strPath)
	 strCounterContents = ctrFile.ReadLine().ToString()
	 ctrFile.Close()
	 nCounter = Convert.ToInt32(strCounterContents)
Else

nCounter = 0
EndIf
 
nCounter += 1
ctrFileW = New FileStream(strPath, FileMode.OpenOrCreate, FileAccess.Write)
sw = New StreamWriter(ctrFileW)
sw.WriteLine(Convert.ToString(nCounter))
sw.Close()
ctrFileW.Close()
Return nCounter
EndFunction

My question is, is there any simple way to modify this to have the number of hits stored in a database?

Slade 66 Practically a Master Poster

If you can get a copy of the windows 98 cd, Dell should have the drivers for your system on their site.

Slade 66 Practically a Master Poster

illusion -> effects

Slade 66 Practically a Master Poster

I realized this

Slade 66 Practically a Master Poster

When I awoke
(lol this is starting to get like IM)

Slade 66 Practically a Master Poster

mouse -> optical

Slade 66 Practically a Master Poster

ninja -> scroll

Slade 66 Practically a Master Poster

I promptly fainted.

Slade 66 Practically a Master Poster

yoga -> ninjitsu

Slade 66 Practically a Master Poster

little -> brother

Slade 66 Practically a Master Poster

, which wasn't cool.

Slade 66 Practically a Master Poster

:D thanks Paladine, glad I could help!

Paladine commented: Sweet code to note! +36
Slade 66 Practically a Master Poster

Hey, this could go one of two ways. I want a rich text editor for my website, the information typed into the text editor will be saved to an sql server database under either char or varchar format that supports up to 8000 characters per field. I want it to save as html code. This content will then be pulled from the database to be displayed in a label. Now my question is, what is a good vb .net html rich text editor (must be free) OR how can I make one for vb .net (preferred).

Thanks guys, Slade.

Slade 66 Practically a Master Poster

Well I worked it out, here is how it's done.


The following is the html code.

<TITLE [b]ID=pageTitle RUNAT=server[/b]> </TITLE>

Then the vb .net code:

Public Class MyPage 
Inherits System.Web.UI.Page 
[b]Protected pageTitle As System.Web.UI.HtmlControls.HtmlGenericControl[/b]
Private Sub Page_Load(ByVal sender As System.Object, _ByVal e As System.EventArgs) Handles MyBase.Load 
[b]pageTitle.InnerText = "Dynamic page Title"[/b] 
End Sub
End Class

Anyways, just thought I'd share my findings with you guys.

Slade

Slade 66 Practically a Master Poster

A friend told me that it is possible to change the header of a html web page using the vb .net code. Is this true? If so how do you do it?

Slade 66 Practically a Master Poster

ok, I've heard of this mod_rewrite. Is it possible to do this in asp .net using vb .net? It basically just renames a page with a query string such as newthread.php?do=newthread&f=18 to newthread.html, so that search engines have fun and you get ranked high!

Thanks In advance.

Slade

Slade 66 Practically a Master Poster

lol cool. I read somewhere it can be done in asp .net so hopefully... anyways, I'm heading over to the asp forums to post my question on how to do it. Thanks for the help! If anyone has anymore suggestions please post thanks.


Slade

Slade 66 Practically a Master Poster

use static links that end in .htm or .html.
use mod_rewrite to "cover-up" your dynamic pages.

mod_rewrite... how do I do that? Also, I am designing my site in asp .net, I notice on these forums you've used php, is it possible for me to make "Test.aspx" appear as "Test.Html" but still remain an aspx page? Or is that the function of mod_rewrite?

Slade 66 Practically a Master Poster

hill -> freelancer