Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object variable or With block variable not set

Status
Not open for further replies.

ofsouto

Programmer
Apr 29, 2000
185
0
0
BR
Dear sir

I'm getting this error while trying to access an ASP.NET system on a Server.
An user log on windows and can access the main page on ASP.NET system.
Another user lon on windows and can't access the main page on ASP.NET System.
Both are using the same machine.
I tried again on another machine and I got error, that is: an user get access and another user
doesn't get.

Code (Error occurs on code bellow)

txtReferencia.Attributes.Add("onkeyup", "ConvertToUpperCase(this)") 'text box

If sErro.Equals(String.Empty) Then
If Not IsPostBack Then
filCNPJ.Visible = False '<INPUT>
lstCNPJ.Rows = 7 'listbox
txtReferencia.Attributes.Add("onblur", "this.value = this.value.toUpperCase();")
lblUsuario.Text = CType(Session("config")(5), String).Trim 'label
lblDate.Text = Now.ToString("dd/MM/yyyy HH:mm:ss") 'label
lblData.Text = Today.AddDays(90).ToString("dd/MM/yyyy") 'label

Why an user access the system and another use get error (Object variable or With block variable not set)
while trying to access the same system?
What's wrong?
Can somebody help me?

Thank you very much.

Obede
 
Where are you setting the following?

Code:
CType(Session("config")(5), String).

If you take that line out does it work?

Hope everyone is having a great day!

Thanks - Jennifer
 
I had solved the problem.
I created an object as an arraylist and I set it = session("config").

Dim arrConfig As ArrayList = Session("config")

lblUsuario.Text = CType(arrConfig.Item(5), String).Trim

Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top