SwaggerUI doesn't work after I deploy to IIS - iis

I developed an .net framework WebApi and integrate the SwaggerUI. It works in my local IIS express.
Then I deploy my project into a local folder restapi and I copy this folder to my remote IIS server and configure it. The webpage is running well bet the SwaggerUI doesn't. Here is the screenshot:
The error message is:
500 : {"Message":"An error has occurred."} http://myserver:80/swagger/docs/v1
What could be the reason? Don't know where to start to fix the issue. Can anybody help? Thanks.
By the way, I'm using Swashbuckle 5.0.

Related

react native windows app not connecting to localhost

I have been working on react-native for windows app the thing is I created a localhost in node.js using express and made api calls from the windows app both the server and app were working fine on my device even after when i created appx bundle file and installed it on my computer then i shared the appx bundle file and my localserver file with my friend and it was causing problem there. Localhost was working fine i could make requests via postman but was not able to do so via the app it gives
Error : Network Error
. I am looking for some help if anyone have any idea about what could be going on.
Note that everything works fine on my development device

Blazor host on IIS shows blank page

I created a Blazor Server Project which runs well from Visual Studio, i tried hosting same app on IIS installed Runtime and Hosting Bundle to achieve this. Also, i created site and pointed to the published files. When i run the app on the browser, it shows me a blank page without any error.
Please what could i be doing wrong?
I had this issue today...
I accidentally deleted an import in _Host.cshtml. Unfortunately, this import was used in a string, so no error could be generated. After fixing this all worked fine again.
IIS requires a web.config that isn't created with a normal debug/release build, which is why you are just getting a white screen.
You can use this walkthrough to learn how to publish the website for IIS publish a blazor server application to iis
Alternatively, you could build your own web.config - but I wouldn't recommend it.

ASP.NET core 1.0 IIS 502.5 Error

I have a asp.net core website that runs fine on IIS express on my local PC, runs fine on a Development server IIS (2012R2) and also fine on a production server IIS (2012R2) but when I put it on the DMZ production server (2008R2) I get the following error (i am running the console application from the web app folder to see the error) -
as it says the issue happens in program.cs at line 21 which is -
As you can see this is the normal default code for starting the application.
When I try to view the webpage it give me a 502.5 error
Has anyone had the same issue? I have spent a while Googleing but nothing has helped so far :/
So after working out the differences between the servers it turns out that our infrastructure team have not updated the DMZ server to have latest .net framework. after updating all worked....
wish MS would give a little better error message.... o well all works now.

IIS does not start .net core 1.0 executable

so after .net core 1.0 got published I started a new console project and imported the code from a small prototype that is supposed to run without IIS. Besides having to use net46 in my project.json due the not-yet updated MongoDB.Driver, that worked fine. When I build the app in Visual Studio a small App.exe with a lot of dll is build and can be run fine locally without IIS.
I then noticed the option to build for IIS Express and thought that I can use the IIS on our server (IIS 6.2, Windows Server 2012 R2) too. It publishes fine with WebDeploy, but nothing happens after that. I was following this official guide. I installed the .NET core Windows Server Hosting bundle and everything appears to be in order, but when I browse to the url, I get a ERR_NAME_NOT_RESOLVED. Theapp.exedoes not appear in the Task Manager and I can't find any log file, although it is enabled in theweb.config. I can execute the app manually, but then it only listens on the defaultlocalhost:5000` address.
If I understood it correctly, the IIS is supposed to act as a reverse-proxy to the dotnet tool which starts a dll, but in my case it's already a compiled exe that works standalone. But I can't figure out how to build a dll from this app..
What am I doing wrong?
If you target full .NET Framework the application will be .exe and not .dll and it is fine. ERR_NAME_NOT_RESOLVED indicates that the url you provided in your browser could not be resolved and the request to the application was not made. AspNet Core Module starts the application on the first request and because the host could not be resolved the request was not made and the application was not started. Once you figure out why the name could not be resolved and you still have issues with making your application work with IIS take a look at my post which explains how things work and how to troubleshoot issues. This, however, only applies after the request can reach your application.

HTTP Error 500.23 - Internal Server Error Local IIS Web server

I am trying to create my async HTTP handler on Visual Studio 2012.
I have spent about 10 hours to find out why the server keeps giving me "HTTP Error 500.23 - Internal Server Error" response. Poor old me.
And finally I found out that if I switch my Web server to Visual Studio Development Server. Everything works fine. And When I switch back to IIS Web server, it doesn't work again.
I tried to do some configuration with IIS manager. I just have no idea what I should do and how the localhost is linked to my development folder. There is no information about the port it's using and the folder it's mapping.
Can someone offer some help? What should I do to make IIS Web server work for me?
Thank you
it is possible to fix this problem while keeping your app pool in integrated mode,
add the following markup to your application's web.config
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>

Resources