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



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: Automating dialog with web server from VB.NET
    ... of the problem was learning how to handle the firewall proxy server. ... > Since I have no Lotus Notes web application at hand, I test on an aspx page. ... > Imports System.Collections.Specialized ... > Sub Main ...
    (microsoft.public.dotnet.languages.vb)
  • 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)