I have Asp.Net MVC web application. It works fine when I run it on Local IIS or IIS Express.
I deployed it as Azure Web Site. It works fine.
Now I want to deploy application as Azure Cloud Service. I add Azure Cloud Service project to my solution. Then I add Web Role from existing web project.
When I run my solution under Azure Emulator it does not work. I have an error "IIS Express Worker Process has stopped working". In Windows event viewer I have only IIS Crashed error, without any details.
In task manager I have Windows Azure Emulator, but I have no IIS express with my web role.
But when I deploy my solution to azure cloud service, it works like a charm. I'm confused what is wrong. One more point. If I create new web-application in my solution and create web role for new project, then it works fine!
I'm confused what is wrong. Any ideas?
I found the problem. I have this block in my web.config file
<applicationInitialization doAppInitAfterRestart="true">
<add initializationPage="/" />
</applicationInitialization>
This cause the IIS Express crashing when web role started.
Hope this helps anybody else.
Related
I am trying to deploy a .net core c# app to an IIS running on Windows Server 2016. I created a publish profile. I click on Validate Connection button and get the following error, that I need to install Web Deploy and that Web Management Service should be started:
I did install Web Deploy 3.6 and the Web Management Service is definitely running.
Here is my profile. The Site Name is AppPool\WebSiteName. User name is the same as I logged in on the server with.
What am I missing?
Figured out the problem. The Server entry needs to have the protocol. So http://winserver instead of just the name of the box.
I have published both my WCF service and ASP.NET Web application in IIS but i seem to have a problem connecting to the database after publishing. Its like the two cannot see each other. I have tested both and saw that they have been successfully published.
the service reference is referenced in the web application and works as normal when i run the web application locally but not working after publishing.
Is there a setting that i am missing. Both are hosted on IIS.
There is possibility that you are using
Windows authentication, I mean if Integrated Security = true in your connection string than make sure your Windows authentication enabled in your IIS.
Do this if this is the case.
IIS7: Setup Integrated Windows Authentication like in IIS6
if this is not the case than this answer is helpful for you
Change connection string from development to production when publishing
I looked into Azure cloud solutions and came up with below question regarding developing web app locally.
It seems like, if you develop Cloud Service, you can run locally with Azure emulator, if you develop Azure Fabric Cluster, you can run your cluster locally.
However, if you develop Wep app (part of App service) and you want to debug your app locally, you can either connect remotely your debugger to running web app or run the web app on your local iis.
Issue is, debug on azure emulator or running on local cluster seems to illustrate running the app on cloud better than develop on your local iis.
Am i missing something, or the development experience on App service lacks the option to run locally on "cloud like" environment(excluding the option of remote debug)?
Thanks a lot!
There is no emulator for App Service because at its core it is just an IIS farm (the Windows App Service at least).
We run apps locally on IIS Express + SQL Server 2016 Developer edition, and that corresponds quite well. Of course if we wanted we could set up an IIS farm locally and use that, but I think that's unnecessary.
You can get a bit closer to actual environment if you use the App Service Linux offering, as there you will run everything on Docker containers. So you debug on local Docker and then run it in prod on Docker.
I would also recommend you to check out deployment slots on App Service, as a staging deployment slot can help you find problems that occur in the cloud environment before you swap it into production.
In my personal experience developing apps for App Service, problems in the production environment were not caused because the environment was very different, but because we overlooked something with the database, made a mistake in a Web.config transform etc.
I am attempting to publish our web api to IIS 7.5. I have it deployed as an application "api". I am able to successfully deploy the application and it runs. I can access it at /api/api/. I believe this was due to having "api" in the routing config of the api controllers as well as having it hosted in the "api" application in IIS. I have removed the "api" portion of the route path in web api and it works correctly if I launch it from visual studio. I would like to access it from /api instead of /api/api but IIS doesn't recognize this change. What could be causing this in IIS? I am fairly new to IIS and I have googled around but I have not found anything useful.
TL;DR
I updated routes in my web api application but IIS is not recognizing those changes.How can I force IIS to update?
After playing with this for some time I found that the problem was that I pointing the physical directory of IIS to the deployment package from VS and because I was building the project directly on the machine. This caused VS to quietly fail when it couldn't update the files because they were locked by IIS. After deploying to a new path and then replacing the contents of the application the new routing works as expected.
After update for the latest AzureMobile.Services.Backend.Tables package, when i try to run my application at IISExpress or LocalIIS appears this error:
Web server is not configured to list the contents of this directory.
Im aware that azure mobile service which is an asp.net web api does not have an home page which is generate on runtime.I tried to create a new azure mobile services and it works fine as well.
Am I missing something on my webconfig?
Solved by creating another project of Mobile Services with an default template.