Re: request, session and application 'not defined'?



You do have a reference to System.Web, right?


"James R. Davis" <Jim@xxxxxxxxxxx> wrote in message
news:%23p6hoohVIHA.6044@xxxxxxxxxxxxxxxxxxxxxxx
I did not have System.Web imported but when I added it there was no change
whatever in the VS diagnostic.

Further, when I tried changing the Request to HTTPRequest the diagnostic
changed to:
"Reference to a non-shared member requires an object reference"

All I am trying to do is convert some ASP code to ASP.NET as a learning
strategy. Your help is greatly appreciated.

"Scott M." <smar@xxxxxxxxxxxxx> wrote in message
news:udL0pVhVIHA.5360@xxxxxxxxxxxxxxxxxxxxxxx
The actual classes are: HTTPRequest, HTTPServer and HTTPSession. But,
you
can use Request, Server and Session if you have System.Web imported in
your
code. Do you?





"James R. Davis" <Jim@xxxxxxxxxxx> wrote in message
news:u0qfFThVIHA.5208@xxxxxxxxxxxxxxxxxxxxxxx
I am building a set of shared functions and subroutines in a vb file
located
in my App_Code section of my application. The first three functions
went
fine and work as expected. But I am now starting a subroutine that
must
work with certain server variables and I have been stopped cold.

This is the code that frustrates me:

Sub GetConfig()
Dim strPathURL as string
strPathURL = Left (Request.ServerVariables("Path_Info"),
InStrRev(Request.ServerVariables("Path_Info"), "/"))
...
end Sub

Visual Studio states that [Name 'Request' is not declared.]

Indeed, it does the same for any statement I try that uses 'Request',
'Server', 'Session' or 'Application'.

I started the VB page with:
Imports Microsoft.VisualBasic

Imports System.Data



What more do I need to do? Thanks!!








.



Relevant Pages

  • Re: Chat client/server print failed
    ... is the print statement in the send_msg_all sub. ... leave the server running for testing purposes. ... # This would be the end of file, so close the client ... # just read means there is a complete request waiting ...
    (comp.lang.perl.misc)
  • Chat client/server print failed
    ... This is a chat client wrote in perl Gtk2. ... is the print statement in the send_msg_all sub. ... leave the server running for testing purposes. ... # just read means there is a complete request waiting ...
    (comp.lang.perl.misc)
  • RE: Slow file opening after SBS migration
    ... My next guess is some registry entries might still be containing a reference ... I have disabled temporarily smb signing and AV (client and server) to no ... I joined my laptop to the domain to run ethereal and capture a few packets. ... The most interesting thing that this picked up was some netbios name request ...
    (microsoft.public.windows.server.sbs)
  • Re: Question regarding to ISA server and the WINHTTPREQUEST component (access denied reasons)
    ... The system is a windows 2003 server and running the latest version of isa ... In the winhttp request i set with setproxy, setcredentials ... sub INITIALIZE_WINHTTP_OBJECT{ ...
    (microsoft.public.isa)
  • Re: Chat client/server print failed
    ... also I can send a message to the server and it is received. ... sub dialog{ ... #establishes connection to the server ... # just read means there is a complete request waiting ...
    (comp.lang.perl.misc)

Loading