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.
Related
I created Virtual machine in Azure, i set up server, installed web deploy 3.6, management service
But if i want to publish my website to this server i am still getting this error
You could check this blog.
Please ensure web deploy service is listening. Also, you need open port 8172 on Windows Firewall and Azure NSG.
I have no prior experience working in the .NET stack. Not sure if this is a common requirement. I have developed a simple .NET web service which accesses the COM library provided by a label printer SDK to send print jobs to the printer connected to my machine.
I need to distribute the web service to clients so that it can be hosted on their machines locally. Set up should be minimum - something like an installer which will do the needful to deploy the web service locally.
I assume that any windows machine comes with .NET bundled.
I understand that IIS is the windows equivalent of apache-tomcat. Does is it come bundled with all windows machines? If it does, I figure I can write some scripts to deploy the web service to IIS using the ".deploy" file generated by Visual Studio.
Are there any betters way of doing this ?
So my question is :
How do I distribute a web service that should be be hosted and run locally on the client's machine without forcing the user to download and install a web server and deploy the package?
Edit:
So, I gather IIS is not supported by home editions.
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.
I'm developing a Windows Azure Web Role. Everything is fine, but in order to launch the site I need to run it from visual studio each and every time and let it start the emulator with the site.
What I would like to do is some how run it independently of visual studio, use visual studio to develop and compile and just refresh the site (as if I was building a regular web project and was hosting it on my local IIS).
Is this possible with the Azure emulator?
Thanks
Yes. There could be a couple of options here. If your web site doesn't need access to the Azure role environment at all (meaning you aren't using RoleEnvironment anywhere in your code and you don't have dependent start up tasks, etc.) you can set it as the start up project and it will run under IIS (or IIS Express if you have that set) outside of the emulator. This is just like what you are used to. There could be some issues here if you need the actual emulated environment for some reason. If you are connecting to the Development storage you should still be okay as long as you ensure the storage emulator is already running (which you can manually start outside of studio either with the command line, or hit the start button and start typing "Windows Azure Storage Emulator - v2.2" until you see it as a choice). The storage emulator runs separate from the compute one and will be listening on the ports it is configured for.
The issue with not running the emulator if it is required is that you need to have the application packaged and deployed. You can directly use the csrun command line tool to spin up a deployment in the emulator. Mike Barlow did a post on it a few months ago: "How-to deploy application to Windows Azure Compute Emulator with CSRUN" Note that the article has you spin up something without VS open, but it still needed to be "packaged" and put in the referenced csx directory.
You may also want to look at the new Express Emulator which is supposed to be a little more stream lined, at least permissions wise, but I can't say if it is any faster or not. I'd consider it beta currently.
I have a WinForms application that accesses about 80 WCF services. These services are hosted on a web server.
Now I have to change this application to run 100% locally on a computer.
What is the easiest way to do this without having to install IIS on a local computer?
Thanks!
there are 4 hosting options for WCF services:
Self hosting
Windows Service
IIS
WAS (Windows process activation service)
It's been my experience that self hosting is easy enough to set up quickly, and flexible enough to change later.