ASP - Reading Environment Variable
I would like to read a client environment variable... How can i do this ?
I can read server environment variable using
<%=request.servervariables("LOGON_USER")%>
but concerning client environment ?
I would like to read a client environment variable... How can i do this ?
I can read server environment variable using
<%=request.servervariables("LOGON_USER")%>
but concerning client environment ?
My goal is to retrieve my local machine's %USERNAME% environment variable
from ASP page.
When I enter http://RemoteServerName/testusername.asp?id=%USERNAME% directly
into the IE Browser URL box, %USERNAME% is repalced with the local machine
ID. However <a href="http://RemoteServerName/testusername.asp?id=%USERNAME%"> get mahcine id</a> in an html file and use Request.Querystring("id") to retrieve it in testusername.asp page, it returns "%USERNAME%". I guess IE browser is smart enough to replace %USERNAME% with the local environment variable value before sending URL string to the web server when you type directly into the Browser URL box.My question is , is there any way to retrieve local machine's environment variable, %USERNAME% from ASP page?
I have a variable in an INI file (fileLocation) which will point to the location where i can store some temporay files.
This fileLocation variable has a value "%USERPROFILE%Local SettingsTemp" >Now, how do i get the actual expansion of this variable (for ex:i.e : C:Documents and Settings<username>Local SettingsTemp).
How can this be achieved through ASP?
How do you read a variable that you've declared on one page
For example
I've declared
dim x
x=23
then i goto the next page. I can't seem to access it.
How do I get access to that variable that has been defined in the previous page.
What's the code for reading a TXT file and assigning it's contents to an ASP variable?
create variable
open a text file... read it's contents into the variable
.... perform string manip. on the variable... etc etc...
Does anyone have any suggestions what software would be best used for an ASP development environment with several programmers working on the same project? It would have to have source control and version control etc.
View Replies View RelatedI am about to dive in to the world of ASP. I have done HTML sites before using Dreamweaver MX.My question is: What is the best development application for me to use to create ASP web apps/sites?should I go with ASP or ASP.net?
View Replies View RelatedA week or so ago, I needed to find the HTTP_REFERER environment variable to check and see if a user is coming from a certain website:
If Request.ServerVariables("HTTP_REFERER")_
= "http://localhost/mydir/page1.aspx" then
response.write "Click on a menu choice"
else
response.write "check back later
end if
I have a page nested in an IFRAME (for example framepage1.aspx or ..asp), and I need to check to see if a user is coming to (not coming from ) a certain page where the framepage1.aspx is (the framepage1.aspx could appear in not only page1.aspx, but page2.aspx ,or page3). I'm not sure how to accomplish this given that the
HTTP_REFERER checks on address only incoming.
I have an asp pages which uses ActibeX dll and Exe written in in VB and VC++. I want to debug the components from asp page. When the asp page is run I should be able to get the breakpoint in my VB & VC++ dll and exe.
what could be the setting to do that. I can debug those componnets from another VB/VC++ applications but I want to debug from asp page.
can't seem to find how accesss the standard cgi environment variables in vbscipt/asp, remote_addr, server_port, etc they are accessible right? or a similar vbs set?
View Replies View RelatedWhat is the best way to allow a second developer access to existing html and
asp files in the office from a development point of view. At the moment, I
have been developing locally and then uploading my files to my web host but
I now need to create a usuable office environment which allows a second
developer to work my folder structures and files.
We do not have a big budget.
I am thinking of asking the company to buy a second hard drive loaded with
Office XP professional and use this to server files locally in a staging
environment before pushing the files to the remote web host.
Am I on the right track?
how to set up ASP development environment in windows XP (or i have to have windows 2000/2003)? Any good tutorial out there? By the way, I already have Visual Studio .net installed in my computer.
I am a PHP developer and want to learn ASP for my new project. How long u think it will take for me to catch up?
Users in our load-balanced environment get to our home page via web.vzcorp.com where a persistent cookie gets set. bedineta is 1 of the machines in this setup. You can unofficially get to our home page that way too. Question I have is if the user comes in thru bedineta how can I get their machine to recognize the cookie I set when they came thru web.vzcorp.com? They come thru the same block of asp. I've played around with the cookies.Domain and Cookies.Path setting with no luck.
View Replies View RelatedThe goal is to retreive the network login in order to validate users. Right now when I try to get Request.ServerVariables("LOGON_USER"), it returns a null value. Currenly in IIS, anonlymous access is checked. Is there any way for me to get the LOGON USER?
View Replies View RelatedBefore I was able to use Microsoft Devleopment Environment to debug my asp code. I did that by going to Microsoft Development Environment 6.0, go to Debug menu -> Processes, and will see inetinfo.exe and then I can attach it. But lately, (and I don't know if it's got anything to do with the fact that I have recently installed Norton Internet Security and Norton Anti Virus) when I opened the Processes window, the list is blank, and the Machine drop down is also empty.
If I hit Properties or Refresh, I'll get the "Development Environment has encountered a problem and needs to close. We are sorry for the inconvenience" error, and the app will close. If I hit the Machine button, even if I find the machine, it'll say "Unable to connect to the machine". Has anyone had similar problems before?
I have a problem with dialog boxes. When in Windows XP, the dialog boxes are too small, but when in other environments it is ok. What should I do to accomodate all environments?
View Replies View RelatedI am trying to find out how to access %APPDATA% environment variable on the client side of an ASP Intranet application. I need this so that I can perform some cleanup function. So far everything I read points to using Environment.GetEnvironmentVariables("APPDATA"); I can't seem to get this to work. Error message says Environment not defined.
View Replies View Relatedcan anyone tell me difference between environment variables and server variables.
View Replies View RelatedI'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:
"Object variable or With block variable not set"
My vb code look like this.....
is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
How do I convert an ASP variable to a Javascript variable?
View Replies View RelatedCould somebody please help me out with this? I have been researching it all day and can't figure it out.
All I want to do is put some info from this XML file (staff.xml):
<staff>
<employee id="1">
<name>John</name>
<job>Janitor</job>
</employee>
<employee id="2">
<name>Mary</name>
<job>Accountant</job>
</employee>
</staff>
into an ASP page. I already started an ASP page:
<html>
<head></head>
<body>
<%
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("staff.xml")
response.write("<p>")
'I NEED TO INSERT THE FIRST PERSON'S NAME HERE
response.write("<br>")
'I NEED TO INSERT THE FIRST PERSON'S JOB HERE
response.write("</p>")
response.write("<p>")
'I NEED TO INSERT THE SECOND PERSON'S NAME HERE
response.write("<br>")
'I NEED TO INSERT THE SECOND PERSON'S JOB HERE
response.write("</p>")
%>
</body>
</html>
That's all I have in the ASP page because I am having trouble with it. Could somebody please help with it real quick? I'm sure it's very simple, but I am having trouble learning the XMLDOM thingy.
anyone know a simple to use RSS/XML feed getter so i can add external news
to my site?
I got a little piece of ASP code to read from a remote url, which is expected to be an xml, like a RSS feed, and echo the content out to be processed by downstream xml processor. The code is like this:
<%response.ContentType="text/xml"%><%
Response.Buffer = false
Dim objXMLHTTP, xml, url, text
Set xml = Server.CreateObject ("Microsoft.XMLHTTP")
url = Request.QueryString("url")
xml.Open "GET", url, false
xml.Send
text = xml.ResponseText
Response.write(text)
Set xml = Nothing
%>
Using firefox, I get the request.responseXML object back from the code above, works fine. But in IE, the request.responseXML is returned null, but request.responseText did show the entire xml file.
My question is how should I make change to the above code to let IE honor the request.responseXML object? I gues the xml is somewhat ill formatted and IE can not recognize it as an xml.
I have an ASP classic site that needs to add the option of reading an XML file send back from another web site and parsing it into a multi-column HTML table. The server is Windows Server 2003. Can anyone direct me to where I might find more info on this?
View Replies View RelatedI have just created a cd based demo web with FP2000 under XP pro. The disc plays back fine on the XP machine, but when tried on a WIN 98 machine it doesnt play, and I get " G: is not accessible Device not ready" when I try to read it in Win Explorer. The disc is a 48x speed 700mb CD-R. Is it too fast for the older machine?
View Replies View Relatedam trying to create a login page for the first time, I have a login page, validate login page and if the password is correct it takes me to the first page.
I have customized this code someone else created,but what I have a problem with now is I need to log who submitted that data and that is why I am trying to read UserName cookie so I can later match that data.
This is the error I get which is telling me that it is reading the cookie since this is the UserName I am logging in with
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'boxhill'.
but I can't see what is wrong, and there is not much out there for this kind of error.
So I can login successfully but now i need to read and dispaly that cookie and then insert the value of the cookie but,but don't worry about that now, just trying to give you the full picture.
So this is the code for reading the cookie ...
i was wondering if any one could give me some info on how to get mp3 ID3 tags in ASP?
I've seen it done, but don't really have any idea how,
just looking for info like song lenth, bitrate, and so on.
I have a function in ASP and I want to read a DIV tag. Any ideas? I know
the syntax but when I apply it, doesn't work.
What is a good method to read a file that is hosted on another server. I really want to echo the code found between a "<PRE>" and "</PRE>" tag found in the source of an externally hosted file. How should I go about this? I am somewhat new to ASP, but am confident there is a way.
View Replies View RelatedI have a routine I'm writing to read the contents of a file and modify it. However the file will not parse properly into an array, so I strongly suspect I'm using the wrong character to parse the file. The line of code that is supposed to parse the file is:
arrLines = Split(sFileContent, vbCRLF)
When I view the array, it appears as one continuous line, but when I open the file in a file editor it's very clear there are 15 lines.
I've got a league standings file that gets uploaded as an xls file. To display the contents, I'm not sure what the most efficient way is:
1.) Import the xls file into a database every time the file is updated
2.) Read the contents of the xls file using OpenDataSource or OpenRow Set
3.) Something I haven't thought of yet!
I've to got a login script, but in the middle of the verification script, I'd like once the vify has been ok'd to look for a sql file, that has insertion data in it, once the file has been found the asp code must read and carry out the sql command (insert the data in the access db), once done the sql file gets deleted. Code:
View Replies View Related