IIS 6 is throwing a "500 - Internal Server Error" for some users but not others - iis

I had written a mini App in asp classic this week. It worked perfectly on the test server connecting to the test data base. Then yesterday evening I moved it from the test server to the live server updating the connection strings to the live db.
I published it as an application to the default website in the default app pool. Then I tested it and it worked perfectly.
This morning however both myself and another user receive a 500 -internal Server error when we try and save changes to the database(there appears to be no issue reading from the db) yet my two other collogues have no issue at all.
Even more odd is that the same thing is happening on the test server where the code hasn't been changed in weeks. But this morning I cannot commit to the db from there either.
I have attempt to enable more detailed error tracking and logging but the property options for the server are seem unavailable when i tried to set up custom Active Server Pages (ASP) error pages off online tutorials.
The server is used by a lot of people so I was wondering is their a permission issue depending on the user that restricts writting to the database. Or something else that may have changed to allow some users to write data and others to receive the error.
Im very knew to IIS so it may be something glaringly obvious that I haven't considered.
Thanks

This article should help you:
In earlier versions of IIS, error messages from classic ASP scripts
were sent to a Web browser, by default. Because these error messages
might reveal sensitive information to malicious users, IIS 7 and above
disables this feature by default. When your classic ASP scripts
encounter an error in IIS, you receive the following error message by
default:
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.

Related

ASP.NET Core 5 MVC web app returning bad request errors in some pages after deployment to IIS

I have tried everything. I configured Windows Server 2019 according to Microsoft documentation and I successfully deployed a .NET 5 web application to the IIS.
I can get to the login page. I can even get to the forgot password page and they show themselves fine. However when I try to do any action (send the forgot password link or login to the page) I get a "Bad Request" from the server. I haven't found a way to explain why.
I have tried several, and I mean several things found Googling around but nothing helps. This include disabling https within the .NET Core application, trying to get a detailed error page using the app.UseDeveloperExceptionPage(); instruction inside Startup, etc etc but nothing works. I always receive this page trying to execute any action:
If someone could help or point me into the right direction, I will really, REALLY appreciate it.
Thank you
PD: In case it has anything to do with the problem, the error, at least the two that I can reproduce (because I can't even log in), happens, I think (maybe don't) when redirecting to another page in Microsoft Identity.
EDIT: code was asked by one of you. Thank you.
As you see, there's nothing specific in the forgot password screen for my application. This is scaffold code from Microsoft Identity. I even edited it and just let one line of code inside it, which is the default return code anyway as follow:
public async Task<IActionResult> OnPostAsync()
{
return RedirectToPage("./ForgotPasswordConfirmation");
}
As you can see, there's nothing special with that code. Here's the html that calls it, again, is a scaffold of Microsoft Identity with little to no changes (by little, I mean, maybe some CSS and a new value of view data):
But then again, forgot password page actually shows and seems well in the front end, but immediately I try to enter my email and click enter in this page, (also, just a scaffold of Microsoft Identity):
Nothing happens. I receive the bad request. There's NO magic nor custom code here. Something silly is going on.
EDIT II: YES, locally it works perfectly. The strange behavior happens only when deployed to IIS.
EDIT III: I coded and enabled logging in my .NET Core APP and wrote that to a file, and I think I finally got, at least the error (not the reason yet):
But why?? Cookies are enabled in the server browser without avail, same issue. Someone has a better idea than disabling anti forgery rules to login and forgot password pages?
Thank you
For some reason, when I deployed the first version of my app into IIS, I thought it was a good idea to just browse it from the IIS link. Of course, in a new mounted Windows Server 2019, IE is still the default browser. I connected directly to the IP of my web app via VPN, but used Chrome this time. Guess what? All problems disappeared. Yes, it's a bad idea to try to use a modern framework like .NET Core Identity with IE.

Azure Bot Service not working in Web Chat behind proxy

I have created a basic C# bot in Azure and have been doing some tests with it. I am able to debug locally and test that the bot works and responds normally, However, Web Chat does not seem to work (either the "test in web chat" within Azure or the embed code provided under "Channels" menu. The bot does not respond and the following can be seen in the browser's console:
botchat.js:20 WebSocket connection to 'wss://webchat.botframework.com/v3/directline/conversations/b00803da186843c08e057a03f1af26d3/stream?watermark=5&t=PdrKaTBDGps.dAA.YgAwADAAOAAwADMAZABhADEAOAA2ADgANAAzAGMAMAA4AGUAMAA1ADcAYQAwADMAZgAxAGEAZgAyADYAZAAzAA.PWqO6rz50wE.O0xFG-RkTZ0.306EPN7-0X_MGGfBUujpWoKN8Xm942hqpn_BVxbRe_M'
failed: Error during WebSocket handshake: Unexpected response code: 400
(anonymous) # botchat.js:20
This happens with any chat bot created in Azure even without any code changes but only when in my company environment, which is behind a proxy. I am almost certain that this is somehow the cause of the problem, but I have no clue why nor how I might approach the proxy team to report the problem nor what I may need to ask them to unblock.
The Question: Am I right to assume that this is a proxy problem or should I investigate something else and, if this is indeed a proxy issue, what do I need to do/ask to unblock to solve it?
Any help is highly appreciated!
This is definitely a Proxy issue, You can talk to your admin team and get these links removed from their firewall settings so you can get access. We do get this issue's in our company we do the same as i have suggested.\
Happy coding!!!

error 500 http web server: command not handled exception

I think this topic a lot of ppl post it already. I also look for lot of thread in stack overflow and some ibm page. They do give some comment of how to solve this problem. But i still facing the same problem, it still give this error.
Case start :
Actually one of my customer, they have facing this error during running on webpages and also notes ~
error 500 http web server: command not handled exception
Action taken but not solve:
The user id signing/creating the XPages allowed to run XPages in the
server document?
Do project clean, build automatically on designer
Do testing on creating new xpages page with simple lable " hello world" , this one can run successfully only.
Try to reload the http server by
tell http quit
load http
After do this the problem still same give the same error. May i know got any other way to solve it?
"Unresolved compilation errors: java.lang.String" points to a failed install as here. A class in java.lang or java.util should always be resolved. Ensure all services and any processes for Notes / Domino are stopped before the relevant install, jar files can get locked once used. Xpages can't load, Error 500; java.util cannot be resolved
Switch on "Display XPage runtime error page" in application's XSP Properties then you'll see a detailed error message which probably will lead you to the issue:
I frequently get this error when there is a mismatch/problem with access rights or the user login has expired and the app/database doesn't redirect to the login page. I suggest you double check the security basics first. (Might also explain why the app works locally, but not on the server).

Coldfusion 2016 - 403 forbidden error for schedule tasks

I have two schedule task which is running in coldfusion administrator. They are giving 403 forbidden error when run through coldfusion administrator. Here is the log which i get.
"Information","DefaultQuartzScheduler_Worker-8","02/22/17","10:11:00","","Task default.example - Get detail Dev triggered."
"Information","DefaultQuartzScheduler_Worker-4","02/22/17","10:11:00","","Task default.example - Get detail Live triggered."
"Error","DefaultQuartzScheduler_Worker-8","02/22/17","10:11:00","","403 Forbidden "
"Error","DefaultQuartzScheduler_Worker-4","02/22/17","10:11:00","","403 Forbidden "
The task url is running good through browser. It seems that it is something related to permission problem. I have checked the permission of coldfusion Application 'log on as' user on the CFIDE directory and task url directory. It has full control.
Can anyone guide me to solve this problem.
This post is a little old but I've happened across the same problem and I thought I'd share our solution here.
We're running ColdFusion 2016 on a dedicated Windows 2012R2 box. We have several client sites on our box and we're completely locked down using Peter Freitag's lockdown guide.
This is was a new server migration from a CF10 server on another box. Once I set up the scheduled task exactly as we had done before, I received several "403 Forbidden" responses.
The only real way to troubleshoot this is to activate the "Save output to a file" option on the scheduled task itself and save the file to a directory where your CFUser has write access to. "CFUser" of course is the Windows user your CF service uses.
My first test of the URL was through Chrome on the server and it worked just fine so my URL was valid and of public access.
When I fired the scheduled task, it said "The scheduled task ran successfully" however the results of the output file showed it didn't. In our case, an outside service called "Cloudflare" was blocking our request. The error from Cloudflare asked us to enable cookies which we can't do in a scheduled task request. In our case, our hosting provider must provide an exception for requests made from our server's dedicated IP.
Most of the time, these error are generated because of file permission issues on Windows. If you're sure that your CFUser has read & execute permission to the requested template, then you need to output the scheduled task result to fully understand the error.

Detailed errors in IIS 7

I'm trying to figure out why I'm getting 500 errors in setting up a website in IIS.
So far I've tried the following steps:
Enabled Failed Request Tracing (Doesn't write logs for this site, but
works for other sites)
Enabled detailed error messages. Still Getting the default 500 page
with no additional information.
Give app pool full permission to the project directory.
Made sure app pool was running on classic .NET 2 (old app)
Running the site under a permutation of (Classic/Integrated, .NET
2/4)
Enabled anonymous authentication
So my thinking is, somehow, the site fails before the logging modules are ran.
I suspect this is the case because I see no new entities in Event Viewer, IIS Advanced Logs folder, Or in Failed Request Tracing folder. My only source of information (besides 500 error) is a new entry in the IIS log:
2012-12-04 13:06:05 127.0.0.7 GET / - 80 - 127.0.0.1 Mozilla/5.0+(compatible;.....)
To verify this, is there a way to check which stage of the pipeline a request failed? Is it possible to run the logging modules before the failure occurs?
There is a trace event logger for HTTP.sys. With this you can determine if the request is even making it to the right app pool in IIS. Direction on usage
As a last resort, Microsoft offers a tool called Debug Diagnostic. When you have no other option, use this. It will produce a crash dump of the app pool of your choice. Not easy to go through, but it’s a lead. Direction on usage

Resources