IIS 7.5 does not write NLog (maybe due to permissions)? - asp.net

I have my webserver (IIS 7.5) on windows server 2008 R2. The Nlog on my server does not write any log files. To resolve the issue I have tried
Full rights to the log directory for NLog
Switched off IE enhanced Security
I can see that my AppPool is started in task manager - processes with the DefaultAppPool user. I have tried everything I know and can't understand what could be wrong. Please help.

Have you tried the troubleshooting steps listed here:
https://github.com/nlog/nlog/wiki/Logging-troubleshooting
I have found that <nlog throwExceptions="true"> in particular usually provides quite a lot to work with.

My problem was entirely different. I found via dependency walker that some windows DLLs were missing from my machine

Related

Local Host redirected you too many times Issue with IIS

I am working on bringing a working web application onto a new computer running Visual Studio 2022 version 17.4.2 and .NET Framework 4.7.2. When running on local IIS (version 10.0) host there is a "local host redirected you too many times" issue. It suggests clearing cookies which has been done with no effect.
The same code works on other machines with no issues. Is there anything in IIS set up/configuration or that may be missing from Visual Studio or other installations? Thanks in advance.
So far we have tried debugging the code and including breakpoints for where the issue may be occurring, ensuring that the installations of windows feature and IIS management is the same as another where the program is working. Also created a .txt file that can be reached on local host and is in same location as the rest of the project.
Here are a few things you can try:
Try on another machine.
Try to remove as much rules as possible from web.config and keys and so on. Or if it's a single page you're having the error with try to remove as much code from it especially if there are redirect codes. And add breakpoints and debug.
Check the LOCAL application pool version if it's set same as the online .net framework version.

Debugging an ASP.NET application on Local IIS Server

I have setup a local IIS instance to run and development an older ASP.NET (CLR v4.0) application that I have inherited.
I am running it an a virtual directory, and I am able to attach to the IIS process and debug it (annoying). However, I am unable to "F5" in Visual Studio to start debugging. I get an error message saying "The web server could not find the requested resource."
I have went through all of the Microsoft advice on their help page without much luck. Am I naive in thinking that this will work, or am I missing something? I even installed the IIS 6 Metabase compatibility, but that did not seem to help either.
I realize that I probably need to give more information, but I don't know what other details I need to add.
This is running on Windows 8.1 Enterprise with IIS 8, and I am using Visual Studio Professional.
Thanks
MYSTERY SOLVED!!!!!!!!!
Apparently, Request filtering is installed by default. In order for debugging to work, you have to go the virtual directory -> Request filtering -> Http Verbs, and allow verb DEBUG.

can't find IIS 7.5 after resetting the user

This may be the dumbest question but I have a small problem I am using windows7 and recently I had an issue with my outlook as a result I had to recreate my profile on windows.
since that moment I can't see IIS7.5
I have also tried to use control pannel add windwos feature and I can only find IIS6
The strange thing about this is that I have files hosted in IIS7.5 and when I browse to the web Url(I use custom host) I can go there but creating a new website is impossible as I can't go to IIS 7.5
also browsing to Localhost gives me the indication that IIS7 is installed
What can I do?
I have tried also using the script from Microsoft site link but that wasn't successful and I am wondering what to do really.
also when I type Localhost on any browser I get the big image with IIS7 on it what suggest it is installed.
Just today using manage mycomputer(Win 7), service and application and restarted the IIS Admin service and now I can see the IIS7.5 as per the , but not sure why I can't see it in the accessories on when I do a search for IIS
Thanks
You could always download IIS 7.5 express from Microsoft
There is a similar post in super user forum discussing about the posted issue.
https://superuser.com/questions/752946/iis-manager-disappeared-from-start-menu-and-administrative-tools
Copied from there:
Your system is behaving in an abnormal manner, and it is hard to diagnose that error. It seems like it is caused by some system corruption.
The following tools can diagnose and fix errors in Windows :
sfc /scannow
Scans the integrity of all protected Windows 7 system files and replaces incorrect corrupted, changed/modified, or damaged versions with the correct versions if possible.
System Update Readiness Tool for Windows
Scans for Windows corruption errors that prevent Windows updates and service packs from installing.
Windows 7 Upgrade Advisor
Scans hardware, devices, and installed programs for known compatibility issues, giving guidance on how to resolve potential issues found, and recommends what to do.
Windows Update fixit or Reset Windows Update components
then try again to turn off the IIS Windows feature, reboot, reinstall, reboot.
Full antivirus scan by your current product and in addition at least Malwarebytes Anti-Malware.
If running these tools gives no hint as to the problem, the next step is a Repair Install to Fix Windows 7, which fixes the current installation of Windows while preserving user accounts, data, programs, and system drivers.
The last resort, to reinstall Windows from scratch, is not to be taken lightly unless really necessary.

LightSwitch and IIS 7 Windows Authentication

I ask this under the pretense of LightSwitch as that is what I am trying to deploy even though I have a sneaky suspicion that it has nothing to do with it.
If I have Authentication Enabled in any form on any App Type for LS I get the
"Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound."
I have the LS Pre-reqs installed on a clean ms08 Server. I used Web Platform to install almost everything. I have installed Fiddler2 and I am guessing I am not using it right as all it says is that GET /EpistemeAdmin/Web/Microsoft-LightSwitch-Security-ServerGenerated-Implementation-AuthenticationService.svc/binary/GetAuthenticationInfo HTTP/1.1
Is moved, renamed, or in-accessible.
I deployed the site through Web Deploy and it has it's own App Pool. Only Windows Authentication is enabled.
I understand this seems more like an IIS issue so maybe this should go to ServerFault but I thought I'd try LightSwitch angle first in case others had encountered the same thing.
Had the same issue on Windows 2012.
Had to enable http activation under WCF under the .NET 4.5 feature.
I found the answer on another thread --> http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/a2650616-1b68-4ae9-9ffd-f4f2a1211254
I simply repaired the .NET 4 Client (on the IIS Server), restarted and BAM!
Thanks
In case somebody having the same problem:
The first line in my web.config was
<add key="UserCodeAssemblies" value="Application.Common.dll;Application.Server.dll;Application.ServerGenerated.dll"/>
after switching to:
<add key="UserCodeAssemblies" value="Application.Common.dll;Application.Server.dll;"/>
the problem went away.
Way to debug this:
publish your lightswitch to a folder. Unzip and open the web site using visual studio.File->open->website

Unable to start debugging on the web server. The COM+ registry database detected a system error

I'm trying to debug an ASP.NET webapp that's configured to "Use Local IIS Web Server" on WinXP. When I start the debugger, the compile succeeds, and then the following error is displayed in a dialog:
Unable to start debugging on the web
server. The COM+ registry database
detected a system error
The webapp never launches in my browser. How can I get rid of this message and debug this webapp?
I tried the usual stuff, and my exact scenario ended up being described a post in the MSDN forums. Its answer worked for me, despite my environment (VS2008, .NET 3.5) being more modern:
Here are the steps I followed (basically a summary of the link above -- "ASPNET" being significant because that's the user running the IIS instance on my development box):
Close VS
Shutdown IIS
Add ASPNET to the local Administrators group
Start IIS
Start VS and successfully debug ASP.NET webapp
Close VS
Shutdown IIS
Remove ASPNET from the local Administrators group
Start IIS
Start VS and continue debugging ASP.NET webapp without error
My development workstation's security settings/situation is regularly managed by our security folks here, so something must have upset my ASP.NET/IIS/etc environment.
I am using the Visual Studio 2002 and I had the same problem, with tha same Error Message. To solve it, I did only the first 5 steps of the solution recommended before.
I am starting in VS 2002 because I use it in my work. I have the basic concepts, but I never develop in this program language, so I am a begginer.
The most important point in this solution I believe it is understand that ASPNET is a user in the development machine, as Administrator, as "Name.LastName" or any other user that access the machine. When I search for ASPNET to add in the Administrators Group and found it, made a lot more sense because I don't know exactly how the .NET architecture works.
So, if you have the same problem, I here confirm this solution solved my problem, even when I reboot my machine:
Close VS
Shutdown IIS
Add ASPNET user of the Machine to the local Administrators group
Start IIS
Start VS and successfully debug ASP.NET webapp
Thanks for the solution!!

Resources