473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Application Variable and Cookie Container

Does anyone know if you can store a Net.CookieContainer object in an
Application variable?
Nov 8 '07 #1
4 1099
LVP
An Object is an Object ( Until proven wrong) You can store any object in an
Application Variable

"Paul" <Pa**@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
Does anyone know if you can store a Net.CookieContainer object in an
Application variable?

Nov 8 '07 #2
Thank you for your assistance. That is what I thought.

But see the error message below when I try to init an application variable
as a cookiecontainer in global.asax.

Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a correct
format.

Source Error:
Line 5:
Line 6: Sub Application_Start(ByVal sender As Object, ByVal e As
EventArgs)
Line 7: Dim Application("partsbase_cookiecontainter") As
Net.CookieContainer
Line 8: End Sub


"LVP" wrote:
An Object is an Object ( Until proven wrong) You can store any object in an
Application Variable

"Paul" <Pa**@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
Does anyone know if you can store a Net.CookieContainer object in an
Application variable?


Nov 8 '07 #3
LVP
Paul that is wrong.

dim objectContainer as new cookieContainer() ' blah blah blah
Application.Add("partsbase_cookiecontainter", objectContainer)

"Paul" <Pa**@discussions.microsoft.comwrote in message
news:76**********************************@microsof t.com...
Thank you for your assistance. That is what I thought.

But see the error message below when I try to init an application variable
as a cookiecontainer in global.asax.

Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a
correct
format.

Source Error:
Line 5:
Line 6: Sub Application_Start(ByVal sender As Object, ByVal e As
EventArgs)
Line 7: Dim Application("partsbase_cookiecontainter") As
Net.CookieContainer
Line 8: End Sub


"LVP" wrote:
>An Object is an Object ( Until proven wrong) You can store any object in
an
Application Variable

"Paul" <Pa**@discussions.microsoft.comwrote in message
news:15**********************************@microso ft.com...
Does anyone know if you can store a Net.CookieContainer object in an
Application variable?



Nov 8 '07 #4
Thank you. This resolved the error.

"LVP" wrote:
Paul that is wrong.

dim objectContainer as new cookieContainer() ' blah blah blah
Application.Add("partsbase_cookiecontainter", objectContainer)

"Paul" <Pa**@discussions.microsoft.comwrote in message
news:76**********************************@microsof t.com...
Thank you for your assistance. That is what I thought.

But see the error message below when I try to init an application variable
as a cookiecontainer in global.asax.

Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about
the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a
correct
format.

Source Error:
Line 5:
Line 6: Sub Application_Start(ByVal sender As Object, ByVal e As
EventArgs)
Line 7: Dim Application("partsbase_cookiecontainter") As
Net.CookieContainer
Line 8: End Sub


"LVP" wrote:
An Object is an Object ( Until proven wrong) You can store any object in
an
Application Variable

"Paul" <Pa**@discussions.microsoft.comwrote in message
news:15**********************************@microsof t.com...
Does anyone know if you can store a Net.CookieContainer object in an
Application variable?


Nov 8 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Peter | last post by:
Hi I am trying to do very simple http client that requires a login, copy cookie snet by a server and does a request with the cookies. WebRequest->CookieContainer/WebResponse->Cookies does not...
3
by: Enoch Chan | last post by:
I would like to set a Session variable to a value. In Vbscript it should be Session("ZoomValue")=500 How can I set this session variable by using Javascript? Thanks
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
4
by: macro | last post by:
when I use HttpWebRequest with CookieContainer object that handles cookies, i make more than one request and needs to handle cookies being added and removed between requests, just like a regular...
7
by: Victor | last post by:
I've got two domain names sharing the same IP address that use ASP VBScript If I set a session variable with domain 1, it is only available for domain 1 - this is correct? If I set an...
5
by: Ruso | last post by:
I am using ASP to make an application. What I want right now - is to make the self updating list of the users online - based on thier cookies. In my opinion all seems to be writen well with it's...
5
by: mosscliffe | last post by:
I have the following code, which I thought would create a cookie, if one did not exist and on the html form being sent to the server, it would be availabe for interrogation, when the script is run...
8
by: YYZ | last post by:
I'm using asp, not asp.net. I've got some open ended questions that I was really hoping someone in here could answer, or direct me to some resources that will help me answer them on my own. ...
16
by: Stevo | last post by:
I'm guessing this is a laughably obvious answer to many here, but it's not to me (and I don't have a server or any knowledge of PHP to be able to try it). It's not strictly a PHP question, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.