how i can get number of user hits from IIS 7.0 - iis-7

I want to get number of user at time for my site in IIS 7.0. Is there any ways to find it?

If you're trying to figure out how many people have come to your site, you can enable logging in IIS and then parse the logs to get the number of unique visitors.
If you're asking how to get the number of current users (connected users) on your site at any given time...you're out of luck. IIS itself doesn't do it.
You could try something like IIS Reporter (quick Google search turned that one up) which looks like it can "poke" IIS and get the data you're looking for.

Related

HttpContext.Current.User.Identity.Name is incorrect but only for me

We have a number of webpages that employees can access. I have a table, in a database, which determines who can access the individual pieces.
I use HttpContext.Current.User.Identity.Name, to get the current username, and then determine whether they are allowed to access the page they are requesting. If not, they are redirected to an access denied page, which has contact details where they can request access.
This is been working for months and is still working for everybody, except me! As well as my usual active directory account, I have what we call a developer account to login to servers et cetera. When I run the webpages on my PC, either through visual studio or IIS, I have determined that it is working because it is using my standard active directory account.
I am not aware of making any changes. I was actually just going through the pages as part of a documentation exercise.
However, as soon as I try to browse the pages on the server, it appears to be using my developer account! How do I know this? Firstly, I have built a test page that displays the current username. Secondly, I have an audit table, which records who try to access what page, when and whether they were allowed access.
Yes I could add my developer account to the users table but that would obviously not be my preferred solution. I have been working on something else for the past few days (nothing to do with this) and based on the audit table, I think this problem started today.
Any ideas?

Getting an INET_E_DOWNLOAD_FAILURE Error and connection to website was reset

The connection to the website was reset.
Error Code: INET_E_DOWNLOAD_FAILURE
I have a C# web application running on our internal IIS 10 Server and the site uses Windows Authentication. Our networking team setup everything needed to get to the site from the Internet. I get the above error when connecting from the Internet and have the site listed in Local Sites.
I have users with laptops that sometimes work in the office and on the road. So, we've added the url to Security - Local Sites so they aren't required to enter a login an password each time they go to the site. This works fine until they hit the road where they get the above error.
If I remove the site from Local sites or added it to trusted sites, it works. It works if they use Chrome, but not IE or Edge. It also works if the VPN in, but they don't want to do that.
The message is very vague and I've tried a variety of things based on research I've been doing, but no luck. One suggestion was to setup the Developers tools and capture the error, but this also proved to be of no value, unless I'm doing something wrong.
The message returns quickly, so it's not timing out. I've also checked Event Logs and not finding any related messages.
I've tested this using different Custom Security Levels - Automatic Login with Current User, etc.
Please let me know if you have other suggestions or if I can supply additional information.
VS 2017, C#, IIS 10, .Net 4.6

Add environment variable to an IIS User account

I want to add a system variable in Windows specific to an IIS user account. Is this possible? I do not want to install anything to/modify my IIS installation.
I have tried searching for this over the internet but couldn't find a solution. Also, what I understood from this post is, that I would need to change the user under which the application pool runs. I do not want to do that either.

IIS logging feature

I have ASP.NET pages deployed and I was told that it appears to be logging quite a bit on the server (Ex. post and get). I am sure this is a feature on the IIS not with the pages.
The site interacts with other systems and use by a lot of users.
My questions are:
1. What does this mean?
2. Can I turn off this feature on the server?
Thanks.
1) Logging is a feature which you use to configure how IIS logs requests on the Web server.
2) Yes you can Disable logging from IIS by selecting Logging icon and disable from context menu.
I think it's frustrating that logging is turned on in IIS by default. If you don't know it's there, it's just filling up your web server with useless information.
However, the information in the log file is not useless if you know it is there.
If you have access to the web server, there are a couple of places that the log files might be saved in:
C:\WINNT\system32\LogFiles
C:\WINDOWS\system32\LogFiles\W3SVC1\exyymmdd.log
You can view the file contents in Notepad.
To get the exact log file name in IIS, right-click on the website, go to the Web Site tab, click on the Properties button, and go to the bottom of the pane. The filename is there.
There are choices of what kinds of data get logged. You may not need a lot of it. For example, the default log items like Date, Time and Client IP Address might be useful. Not so much Bytes Sent, Time Taken or Referrer, unless you are troubleshooting.

Classic ASP Error 405

I have several development sites on my wix XP laptop (all classic asp). Doe anyone know why i need to type localhost/site/default.asp (i keep getting a 405 error on iis 5.1) and not just localhost/site
You need to add "Default.asp" as a default document. From this page ...
With iis 4.0 and iis 5.0 the change is
performed as follows:
Start the Internet Service Manager (Start - Programs - Administrative
Tools - Internet Services Manager).
Expand the computer and select the web site.
Right click on it and select Properties.
Select the documents tab.
Check the Enable default document box and click Add to add a new default
name. The order of the search can be
changed by clicking the up and down
arrows.
Click Apply and then OK.
Per comment ... okay, check your script map settings, per this article.
Sounds like you need to configure your default document type in IIS to be default.asp.
First off we need to clear up the web site thing. You only have one web site, the default web site. (It is possible to munge the metabase on XP to create multiple web sites but IIS 5.1 will only serve one of them, the others will have to be stopped).
You have multiple applications which are virtual directories under a common default website.
Have you checked that Default.asp is in the list of default documents for the application not the website? In IIS manager open properties dialog on each applications virtual directory and check the config there.
If you have then you've got a strange one on your hands. At this point I would always advise checking permissions. Does the application allow anonymous access, if so does the anonymous user have access to the folder and files?
This might seem strange advice since accessing the default.asp directly works but in my experience when the configuration looks good and should work but isn't 90% of the time its the result of permissions not correctly set up.
A 405 http response status code means "Method Not Allowed". The Wikipedia article List of HTTP Status Codes has this definition for the error:
A request was made of a resource using
a request method not supported by that
resource; for example, using GET on
a form which requires data to be
presented via POST, or using PUT on a
read-only resource.
You can try the third XP PRO IIS Admin, which can add more than one site to the IIS 5.1, you can switch the site with no difficulty.

Resources