dot net core app 3.1 - Error 500 when IIS - iis

Here again because I need some help again and again….
Let me explain you, I have developed an .net core 3.1 API, and everything works well on my environment and in another computer when (in this computer) deployed in IIS.
However, when I deploy on Azure or in Another IIS in a different environment, I’m able to navigate over my API on localhost, but, when I’m try to do the same using the dns I got a 500 http error.
I have done other tests and when my ASPNETCORE_ENVIRONMENT = Development (on web.config) everything works well from nowhere, however when this value is ASPNETCORE_ENVIRONMENT = Release I got again the 500. And the following message on my logs: “[Debug] The request path "" does not match the path filter”. And I did not get no other errors, in logs or in events nothing only this message.
I’ve spent a lot of time with this issue without finding a solution, someone could help me on that please?
Thanks a lot
Best regards
Joao Fernandes

Related

The DefaultHttpHandler.BeginProcessRequest method is not supported by IIS integrated pipeline mode

We are having issues in hosting Webforms apps in one of the windows 2012 servers and IIS8.5. The server causes "DefaultHttpHandler.BeginProcessRequest method is not supported by IIS integrated pipeline mode" exception.
Attaching a screen shot for your reference
However when I tested in another server it works all fine. To isolate issues I have even tried to deploy a sample webforms app and try out.
I need integrated mode pipe line as I have a requirement around it.
I have verified the servers and there is no difference in iis configurations. What could be the possible reasons for this? Any guidance to narrow down the issue will really help.
Attaching the server comparison report. The image shows the differences in two servers. in the right side server the application does not work and in the left side server it works. If you see the diff there is not a lot of changes and btw the changes are because I added them as part of trouble shooting.
We compared every possible stuff on the servers and finally decided to take up the server in which it is working. The server in which it didnot work might have some issues with they way IIS was deployed.
So in a way there was no way out for this problem for me.

Database Functions Working Until Deployed on Azure

I have an MVC application that I've deployed to Azure. Offline it works with no issue with the code first development. However when deployed to Azure it just gives me a non-de-script Error advising me that there's been an error.
I have a look on the management console for further information but was only able to find an error telling me a fatal error had occurred causing a 500 error. Everything else works on the site with no issue it's just when I'm trying to do anything with the database attached to it.
To publish the app I used the downloaded publish settings from the server so I know connection string and what not are all fine. I've also set up code migrations to fill in gaps in the code first dev work so I can see what I'm missing and I don't know where to go now without a more detailed error message?
Any ideas on where I can possibly look next to try and solve this?

How to further debug a 500 Internal Server Error after upgrade to ASP.NET 5 beta5

I had a site running asp.net 5 beta4, and decided to upgrade to beta5. The site runs locally fine. I pushed the changes to master and it was picked up from bitbucket and deployed successfully.
When I try to hit the site in azure, I get a 500 Internal Server Error. I've tried a number of things, but can't seem to track down the root cause of the failure. I'm looking for suggestions as I'm hitting a wall. From what I've tried below it seems like some fundamental initialization is failing.
Here's what I've tried:
Enabling customerrors="off". I added a web.config to the wwwroot folder with system.web/customErrors mode="Off". I've verified that the web.config is populated correctly in the deployed wwwroot and had the appsettings containing the dnxversion etc merged correctly.
Customizing the custom error page, adding runtimeinfo. I have the following set in my Startup.cs:
app.UseErrorHandler("/Home/Error");. I also have set the error page to display the exception. This doesn't seem to be hit.
Attached to the remote process to debug. Visual studio eventually freezes, so haven't gotten anywhere with this.
Enabled application insights. This registers events when I debug locally, but doesn't capture anything from the azure instance.
Enabled application logs and request failure tracing. The detailed errors show a 500.0, without much detailed information.
Imgur
Imgur
I've also verified through the console that the runtime is set correctly to beta5.
Update:
I set the ASPNET_ENV to Development and it loaded with appsettings loaded via the azure portal. Setting ASPNET_ENV to something else isn't working. I also removed any custom code from startup.cs pertaining to the non-development environments, with no help. I'm still looking for a means of capturing the original error.
Assuming you are targeting DNX451 and not dnxcore50, there is a good chance Azure it still trying to run it against the beta4 runtime instead of beta5. If that's the case, you won't get a decent error message.
Try adding an environment variable in Azure "SCM_DNX_VERSION" and set it to 1.0.0-beta5. It looks like kudu was recently upgraded to support beta5 https://github.com/projectkudu/kudu/commit/55175a017779bf493ff8e6ce87b96dd1451f7d7b, so you might want to try to redeploy from bitbucket in the case that the Kudu team has already deployed this change.
For a little more detail, you can check out my previous answer (although it is very dated and references the old "K" names) here:
Deploying ASP.NET vNext beta 2 on Azure with Kudu
Every time you update to a new beta, you will have to update your SCM_DNX_VERSION environment variable.

Azure Mobile Services on Local IIS rather than IIS Express

OK, I've created an Azure Mobile Services project in Visual Studio 2013.
I run it up as-is, then in the browser I test it by adding a todo item via the simple browser app that seems to get baked into these service projects. It gives me a '201 success' message - brilliant.
I then convert the project from IIS Express to Local IIS as the web host, recompile and try again, and although I get the same smiley face app telling me that everything is OK, when I try and add a todo item I get a 404 error. This is contrary to the Microsoft article that gives these instructions, which clearly says I am able to choose either IIS Express or Local IIS when setting up the project.
My guess is that web.config is missing something when this project runs on the local IIS server.
I'm hoping someone already has a solution before I spend hours trying to work out how to configure IIS for this type of project.
I've already wasted a load of time working through loads of bugs and gotchas with Azure Mobile, and I'm starting to run out of steam - so I'm hoping someone can help me before I go and grab an account at Parse.com
Many thanks in anticipation.
Dean
The easiest approach for your situation might be to just deploy to the cloud, and use that service for your testing. Visual Studio 2013 Update 2 makes it easy to deploy your app and connect to it for remote debugging. It is a little slower than using a local instance, but you are also assured that there will be no surprises when you eventually go live (since you are live the whole time).
That said, we will investigate the issue you are seeing with using IIS directly. Some things you might want to try on your own:
Verify that you can view the web side from your Mac's browser, to make sure that the firewall is letting the requests through.
Try using the "Getting Starting" link from the smiley-face page, to see if the REST endpoints are behaving correctly.

Loading profiler failed during CoCreateinstance - error, but I'm not using a profiler

Recently I published to my Azure Staging server (Asp.Net MVC App) and my app wouldn't come up. I checked the Event logs on the machine, and this was the error:
.NET Runtime version 4.0.30319.18033 - Loading profiler failed during
CoCreateInstance. Profiler CLSID:
'{F1260058-1A1F-4738-8BE2-0BF9D3A64219}'. HRESULT: 0x8007007e. Process
ID (decimal): 1872. Message ID: [0x2504].
The thing is that I am not using a profiler, everything worked fine yesterday (day old publish) - any ideas what could be causing this, and how I could fix it? Thank you.
Not to say there is not a better fix (I tried all I could find elsewhere, nothing seemed to relate to my specific problem) but here is what I ended up doing. Simply delete your deployment, and re-publish. This must re-set whatever turning on your profiler sets.
Remember that if this is a non domain dns instance, your address will be changed. Hope this can save someone a few hours.
Blog Post Here

Resources