47 questions
0
votes
2
answers
64
views
Request.ServerVariables["remote_addr"] is not workin in Edge
I'm using ASP.NET 4.8.
Request.ServerVariables["remote_addr"] is not working in Chromium-based browsers like Edge and Chrome. However, the same code is working absolutely fine in Firefox.
...
0
votes
0
answers
690
views
Blazor Server App - How to loop through request server variables
In classic ASP, the way to loop through all request's server variables was like this:
for each x in Request.ServerVariables
response.write(x & " = " & Request.ServerVariables(x) &...
0
votes
1
answer
280
views
When I use Request.ServerVariables("CERT_SUBJECT"), what does the value C=US mean?
When I use Request.ServerVariables("CERT_SUBJECT") I end up getting something like this as a string:
C=US, O=XXX, OU=XXX, OU=XXX, OU=XXX, CN=DOE.JOHN.JACOB.9999999
what does the value C=US ...
0
votes
1
answer
177
views
Forward slashes being stripped from Request.ServerVariables("HTTP_X_ORIGINAL_URL")
I'm having an issue with the following ASP Server Variable:
Request.ServerVariables("HTTP_X_ORIGINAL_URL")
It is removing instances of multiple forward slashes, so the following URI:
/here/is//my/...
0
votes
1
answer
223
views
ASP Compare server variable with DB recordset
I'm new to this old scripting language but it's all we have right now. I'm trying to get this code work.
I would like to compare USERID servervariable with the same USERID from a recordset, then if ...
2
votes
1
answer
912
views
How can I populate/imitate server variables in PHPUnit Test cases using Symfony3?
How can I populate/imitate server variables in PHPUnit Test cases using Symfony3?
I try to create functional tests for my symfony3 application.
I use LiipFunctionalTestBundle.
I have a special $...
-1
votes
1
answer
89
views
Intranet NT logged user
I have a welcome head
<h2>welcome</h2>
But I pretend get welcome to the NT logged user
this
<h2>Welcome <%response.write request.servervariables("LOGON_USER")%></h2>
...
-1
votes
1
answer
747
views
Getting "HTTP_USER_AGENT:UserAgent" from server variables
Sometimes my application is getting UserAgent in the server variable HTTP_USER_AGENT. What does it mean and why it could not get my users browser information ?
0
votes
1
answer
2k
views
Populationg LOGON_USER servervariable
I have a classic ASP Web application that's been running on a Windows Server 2003 server with IIS 6.0 for several years. I have to move it to a Windows Server 2008 server with IIS 7.0. I've got it ...
0
votes
1
answer
4k
views
Getting the value of Request.ServerVariables(“LOGON_USER”)
I'm trying to get authenticated username in my ASP.NET page using Request.ServerVariables(“LOGON_USER”) variable. It gives me an empty string. There are a lot of topics about this variable. The common ...
0
votes
1
answer
667
views
Custom ServerVariable IIS
i am trying to create a custom servervariable with url rewrite.
Url Rewrite for IIS generates the following config entry
<rewrite>
<rules>
<rule name="CName to ...
1
vote
1
answer
123
views
Javascript to preserve \f in returned value
I have the following javascript which works fine for the most part. It gets the user that has logged in to the site and returns their DOMAIN\username info. The problem arises when the username starts ...
0
votes
2
answers
1k
views
ASP.Net System.ArgumentOutOfRangeException
So I have some code running an IP check to ensure an ADMIN account cannot have access from outside my network.
string strIP = Request.ServerVariables["REMOTE_ADDR"];
if (
(strIP.Substring(0, 9) !=...
1
vote
0
answers
7k
views
HttpContext.Current.Request.ServerVariables["HTTP_HOST"] returns internal address?
I have an ascx control which contains in markup:
<a href="<%# GetName() %>">
In the ascx.cs codebehind file I have the following:
protected string GetName() {
return HttpContext....
2
votes
1
answer
8k
views
Setting HTTP_X_FORWARDED_FOR server variable in classic ASP
I need to set the HTTP_X_FORWARDED_FOR value in the Request.ServerVariables collection. I'm trying with Fiddler (see this article).
So I set up a custom HTTP request:
GET http://myhost/ HTTP/1.1 ...
2
votes
1
answer
1k
views
Access Mocked Request.ServerVariables in classes
I have mocked Server Variables which are used in Controller.
request.SetupGet(x => x.ServerVariables)
.Returns(new System.Collections.Specialized.NameValueCollection
{
{"...
2
votes
3
answers
2k
views
How do I get server variables (or at least client IP address) in C# in Elmah's ErrorMail_Mailing event when HttpContext.Current is null?
I am working on some error handling code and I want to determine if its a local connection (developer) or not. Typically I look at HttpContext.Current.Request.ServerVariables however in the error ...
4
votes
3
answers
3k
views
What is the form collection in asp.net/html?
Simple question but one i need to clarify for myself. In terms of collections that can be accessed in the request object there is:
Cookies: (whats in a text file in the browser)
Querystring: (...
0
votes
2
answers
1k
views
comparing http_referer against http_host
Hi
I need to check whether the http_referer is the same site as the current site.
I have the following code
Dim strReferer As String
strReferer = Request.ServerVariables("HTTP_REFERER")
If ...
0
votes
1
answer
1k
views
Request.ServerVariables("REMOTE_ADDR") retrieving the same IP for multiple logins inside and outside my company
I've been asked to write code to track IP addresses of visitors to one of my company's online applications in .NET. This is actually the second one I've done, having done another site late last year. ...
0
votes
1
answer
794
views
xsl server variable returns null
xsl server variable URL returns null. I tried all the other server variable and they all returns nulls.
Is there anything I need to do (like in IIS or web.config) in order for xsl to show server ...
0
votes
1
answer
1k
views
ServerVariables and POST Data
I've got a piece of tracking code which is capturing REMOTE_HOST, SERVER, REQUEST_METHOD, SCRIPT_NAME and QUERY_STRING. It grabs these from ServerVariables and sticks them in a database by user and IP....
1
vote
2
answers
12k
views
asp.net mvc when should i read servervariables?
When is the apropriate time (part of code) that i can gather information from servervariables? I mean, i have tried calling this
string temp = Request.ServerVariables.Get("HTTP_REMOTE_USER");
in the ...
2
votes
2
answers
1k
views
Sharepoint stripping HTTP Headers
I have a custom sharepoint app whose security model depends on an HTTP header.
When a request is made from the mobile device, an http header called HTTP_RIM_DEVICE_EMAIL is added to each request.
I ...