Visual Studio 2015 Preview - Full IIS - iis

Any idea how to run ASP.NET 5 project in full IIS (not express) from within Visual Studio 2015 (via start debugging with F5 key)?
Atm I'm getting:
Couldn't determine an appropriate version of KRE to run.
I know it's not officially supported yet, but since IIS Express can do it, so should full IIS?!?

Let's say you created an ASP.NET 5 web application out of the template provided in VS 2015 Preview, then you can follow either of the approaches below:
Run the kpm pack command to create the deployable package with the appropriate options.
Example:
kpm pack --runtime KRE-CLR-x86.1.0.0-beta2-10690 --out "C:\MyWebApps\WebApplication1" --wwwroot-out wwwroot --configuration Release
Right click on the web application project and do a Publish to local file system directory.
Once the above step is done, in IIS, you can create a virtual directory application (or Website if you wish) to this deployable package's wwwroot folder. Example: "C:\MyWebApps\WebApplication1\wwwroot"

I just had a similar issue with beta4.
Note that the names have changed now so instead of a KRE it's now a DNX, although IIS was still showing the error calling it KRE despite this.
Anyway the solution for me was to:
right click the project in question in Solution Explorer
select "project name" Properties
tick Use Specific DNX version
tell it exactly which one you want to use, for me that was 1.0.0-beta4, .NET Core, x64
The project then ran in the browser for me.

Related

What I should select to start for developing angular 2 web application from Visual Studio?

I am going to develop the web application from Angular 2. I have completed till step 1 as it mentioned in angular 2 document https://angular.io/guide/quickstart. Now What should be the next step to create the web application using Visual Studio 2015.
There is also special chapter for Visual Studio 2015 QuickStart
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
See also
http://www.codeproject.com/search.aspx?q=angular2&doctypeid=1%3b2%3b3%3b13%3b14&sort=createddesc
https://blog.sstorie.com/0-60-with-angular-2-and-visual-studio-part-2/
http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/
If you are also planning on using IIS, IIS Express or Kestrel to serve your files. I would recommend checking out this article:
http://www.mithunvp.com/using-angular-2-asp-net-mvc-5-visual-studio/
By doing this you can run C# code before serving your static files. You could also have an API running in C# etc.
If you are planning on running node's lite-server like angular2 tutorials I would follow:
https://angular.io/docs/ts/latest/cookbook/visual-studio-2015.html
as #yurzui mentioned.
You can also work on rubymines for angular
we can do the following step:-
Go to create new project
Select c# => Asp.net Web application=> Empty Website
Now Add the package.json,system.config.js,tsconfig.json,typings.json files as it it is given in angular officail website https://angular.io/guide/quickstart
Now go to your command prompt and change the path to your project location that we can get by simply right click to our project file and select open folder in file explorer
After changing the location now write npm install, this command will install all the packages of angular 2 in node_modules files which is hidden file, we can see this folder by clicking show all file icon present in top of our project menu.
6.One more folder typings should also be added as hidden file,if it is not added then write the command npm run typings install
By above steps our angular environment is setup, now we can enjoy developing our Angular 2 project.

IIS Web Deploy's "Import/Export Application" Action Missing?

I had a working IIS 7.5 with Web Deploy 3.5 configuration such that the "Import/Export Application" feature in the right hand action pane showed up and functioned properly. Unfortunately I had to remove and reinstall IIS, and now the Import/Export functionality does not show up in the Actions pane, as if Web Deploy was not installed.
I tried to reinstall using the automated installer at http://www.iis.net/downloads/microsoft/web-deploy, but when I run it, the installer seems to think that Web Deploy is already installed and does not offer me any reinstall/uninstall option.
How can I force a reinstall of WebDeploy or force IIS to recognize that Web Deploy is still installed?
Go to http://www.iis.net/downloads/microsoft/web-deploy
Scroll to the bottom of the page to the "Download Web Deploy" header
Click the x86 or x64 link next to your language of choice. Do not click the WebPI link.
Once downloaded, click on the installer to open it.
Click Next
Click the Remove button
Now you can reinstall it using the Web Platform Installer, or just use the standalone.
On a side note...
If you don't see the Deploy options in IIS once you've reinstalled Web Deploy, try running IIS as Administrator. Hope this helps.
I am running IIS on my development machine on Windows 7. Web Deploy 3.6 seem to break something as the Import / Export Application options are not available. Had to uninstall 3.6 via control panel add/remove programs and then install 3.5 via Web PI.
I've installed Web Deployment Tool 2.1 then restart IIS Manager and the Import/Export Application appeared.
I was running a 'gallery template' Windows Server 2012 VM on Azure. Web Platform Installer said Web Deploy 3.5 was already installed. At first I thought this neat feature had been removed/moved.
In Add/Remove Programs, saw that Web Deploy 3.6 Beta was installed. Removed it and reinstalled 3.5 (without SQL stuff) via Web PI.
Ran IIS Manager as admin and all works fine.
Update - A new Azure VM also had this problem, but had 3.6 Beta3 installed. Again, removed and reinstalled 3.5 via WebPI.
None of the other answers here fixed this for me with Visual Studio 17 on Windows 10. The fix was here: https://developercommunity.visualstudio.com/content/problem/230372/web-deply-40-msi-location.html
Web Deploy 4 has moved to be distributed with Visual Studio 2017. This is nuts because the Web Deploy service and the Import/Export tools are for server administrators and not devs. The discussion in the link says they are working on adding Web Deploy 4 to the Web Platform Installer, but have encountered a few issues (read: we didn't create a proper deployment for it the first place.)
The fix for me was to uninstall Web Deploy 4 from Control Panel-Apps & features, then reinstall from the MSI provided with Studio. Look in C:\ProgramData\Microsoft\VisualStudio\Packages for a folder like Microsoft.VisualStudio.WebDeploy.Msi,version=...,chip=x64. The MSI file is within that. More detail in the link I mentioned.
My guess is if the IIS Manager is not turned on at the time Studio (and therefore Web Deploy) is installed, the hook for Import/Export can't be created.
My situation is slightly different as I never had the import/export menus. For what it's worth:
I tried to install the Web Deploy installer. It said that a newer version was installed. I tried repairing Web Platform Installer. Nothing changed. I tried changing but was told there were individual components. I tried uninstall/reinstalling WebPlatformInstaller.
After that, the IIS Manager showed a Web Platform Installer icon under the Management section after restarting, but still no Deploy menu on the right click.
Double-clicking that icon started the installer where I could then search for web deploy. There was a Web Deployment Tool 2.1 that was not installed. Clicking Add then Install and restarting IIS Manager (not run As Administrator) was all that was needed to get the Deploy menu:
According to this Microsoft document, the Web Platform Installer should have started automatically. Never did. But it is in the start menu. The steps are the same weather you start it from IIS Manager or standalone.

How do I create an InstallShield LE project to install a windows service?

I downloaded Visual Studio 2012 yesterday when it was released on MSDN. I have noticed that a few of the project types that we had in 2010 are gone or different. The biggest difference for me right now is the removal of the Windows Installer project. Now we are being forced to use the InstallShield LE (Limited Edition). The problem here is that I write a ton of Windows Services and I can't see how to setup InstallShield LE. It appears that we (my company) will have to invest in licenses for the professional edition.
Has anyone found a way to install services in InstallShield LE? When using the Windows Installer project, you just set the custom actions.
For Visual Studio 2012 & InstallShield LE, do the following:
Run through the InstallShield project assistant and add the primary output of your service to the Application files section.
After you are done with the project assistant, double click the "Files" item under step two of the setup project.
Right click on the primary output of your service, and go to properties.
Click the "COM and .NET Settings" tab, and place a check in the "Installer Class" checkbox.
Click Ok
Now, once you build and run your install, your service will show up in the Windows Services snap in.
Note that this assumes you added a "Project Installer" to your service project (Right click on the service design sheet and click "add installer"). I can confirm this work on Windows 8 with Visual Studio 2012 / InstallShield LE.
I've recently installed VS 2012 with Install Shield LE. At first I kept getting a ISEXP -5036 internal server error after a build (this was after setting up a ISLE project and running through the Install Shield Project Assistant). Eventually I found out that it was trying to create the MSI in the DVD-5 media type which is where it was failing. For some reason, creating the solution again from scratch somehow recognizes to only build to the CD_ROM and SingleImage media types which works.
Anyway to rectify the 5036 error, click the Build tab in VS 2012 (top menu), select configuration manager and you should see that your IS setup file is selected on the DVD-5 configuration. Change this to CD_ROM and click close. Once you build/rebuild it will complete with no IS 5036 error.
While using the installer class checkbox may work for some instances, you may experience the following error:
Error 1001.The specified service already exists
Here is an excerpt from this link on how to resolve this issue:
For Error: Error 1001.The specified service already exists
This error will occur if the component installing a .NET Service is
incorrectly configured with ".NET Installer Class" set to Yes. The
method to install a .NET Service is to use Component\Advanced
Settings\Services view, not the ".NET Installer Class" setting.
Making definitions in the Component\Advanced Settings\Services view
creates entries in the Windows Installer ServiceControl and
ServiceInstall Tables. These entries are used by the Windows
Installer "InstallServices" action to install the Service.
If your project is .NET, then try then you can use the ServiceProcessInstaller class with InstallShield LE.
To get it to work with InstallShield, you have to go into the InstallShield "files" tree and right click on your file. Then check the checkbox for "Installer class" on the "COM and .NET settings" tab.
I have gotten it to work, but I've had problems on some OS's like Windows 2008R2. Your mileage may vary.
Here is an example: http://www.codeproject.com/Articles/14353/Creating-a-Basic-Windows-Service-in-C
I had all sorts of problems with this.
As follows.
InstallShield takes ages to download
the registration process is a pain.
the configuration options are confusing and overly complex.
the accepted solution on this thread is a hack and it doesn't always work - see 1001 in the documentation - essentially you need to get through the paywall to get the right configuration options to install a windows service.
Solution for me as mentioned elsewhere - was to abandon InstallShield
Very easy from that point.
Edit: Update - install the latest version from here https://wix.codeplex.com/releases/view/115492 for vs 2013 / 2015
Visual Studio setup projects are back in VS 2013 as a visual studio extension.
https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d
Please update your solution and projects to VS 2013. If you are still in VS 2010, you are probably better off by upgrading directly to VS 2013.
My experience with Installsheild LE is that it is very quirky but once you figure out the tricks, it is easier to use. However, I think that the limited edition is a way by Microsoft and Flexera to sell the fully featured edition. In other words, first we pay Microsoft a lot of money for Visual Studio and then their partner (in crime) more for Installsheild. Bad strategy which did not work out since they had to bring back the setup projects in VS 2013.
I've written about this subject:
Augmenting InstallShield using Windows Installer XML - Windows Services
Basically you create a merge module using WiX to encapsulate the service and then add it to your installshield project. ( Be sure to associate to the INSTALLDIR directory to make sure your file goes where you expect ). Build and test on a VM. Piece of cake.
I'm using VS2012 and Installshield LE Spring Edition. I did not have to use Wix.
If you encounter the error "Could not create _isconfig.xml for use with InstallUtilLib.dll", please create a folder with the same name as your setup project and inside the setup project folder.
Credits to http://community.flexerasoftware.com/showthread.php?165929-Could-not-create-_isconfig-xml-for-use-with-InstallUtilLib-dll
I just got some problems finding where to add installer as referred in the answer. So here it is how.
Double click on your service class within your Windows service Project
A blank screen with the text "To add components to your class, drag them from the Toolbox and use the Properties window to set their properties..."
Right click anywhere but on the links and select "Add Installer"
see ya
Bear in mind that all the above explanation will not help you if you plan to create later an upgrade of that setup. InstallShiled LE can't stop the running service when you upgrade. You can't do it either from Window Service Installer -> BeforeInstall event.
Wanted to put this here;
On VS 2015, when doing this, I ran into the 1001 error upon installation repeatedly.
Answer on this page explained that on the newer versions (anything past 2012), apparently you need to explicitly leave the installer class option unchecked, and then add your windows service under the Services section under Step 3 of the installer project:
Error 1001 when installing custom Windows Service

Debugger can't connect when starting local azure project

Ok, first of; here's what I did:
Install AZURE tools
Reboot
Start Visual Studio - new Azure project
Add web role (asp.net MVC 4 beta web role)
Hit F5 (debug)
It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.
Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:
So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.
How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.
I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).
Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.
Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.
I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.
I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
file for the error messages. Mode details at
https://stackoverflow.com/a/8432621/182371
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0', right
click --> Explore.... Make sure that this folder is not empty and
contains all the files required to start a web project successfully.
As for the Access Denied error:
it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.
Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx
Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.
I've met the same issue. In the end, I had to reinstall IIS 7.
I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.
Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk when upgraded from 2011.

Debugging Azure: Error attaching the debugger to the IIS worker process

I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010:
"There was an error attaching the debugger to the IIS worker process
for URL 'http://127.255.0.0:82/' for role instance
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0'.
Unable to start debugging on the web server ......."
I've search so hard to find the solution for this problem but there's nothing seems work for me. I'm a newbie in Windows Azure, it's really a big trouble with me.
I had similar problem with Windows 8, debuging a cloud application with Visual Studio 2012 RTM and Azure SDK 1.71, when trying to launch the application into the compute emulator. It was a very simple app, but I used Azure diagnostics. At the end these are two things I have changed that have work for me, both turning on Windows 8 features (so go to Win8 and open 'Turn Windows Features On/Off'.
Activate the checkboxes for:
Internet Information Services Hostable Web Core
Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET 4.5
Internet Information Services > World Wide Web Services > Health and Diagnostics > Tracing
Internet Information Services > Web Management Tools > IIS Management Scripts and Tools
That worked for me, it makes sense, as I'm using Visual Studio 2012 and trying to get some trace information using diagnostics in Azure.
I hope this will work for you or give some tip about the problem. In the case of being useful information, remember to vote as response or as value tip.
Thanks,
Mike
This usually happens when there's a problem with the project to be deployed to the emulator (WindowsAzureProject2 in your case).
Try the following:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log file for the error messages. See more details in this answer.
Make sure your project can be started without the emulator. It's a web project, so just try to start it as a regular web project. Or publish it to the separate folder and try to create a website in IIS of it.
Check your *.csdef and *.cscfg files to make sure all the configuration is correct.
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to deployment16(6).WindowsAzureProject2.WebApplication3_IN_0, right click --> Explore.... Make sure that this folder is not empty and contains all the files required to start a web project successfully.
BTW, there's a similar question: Debugger can't connect when starting local azure project
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk
I just have today the same problem trying to Debug locally with Azure Storage Emulator in Windows 7. So in the Azure project properties, in Web tab, I checked the radio button 'Use IIS Express' and it debugged without problem. I hope this helps someone.
I encountered this exact same problem when I upgraded an existing Azure solution to the Azure SDK 2.1. After some hunting around I uncovered that the upgrade had automatically set the "Local Development Server" setting to "Use IIS Web Server".
Changing the "Local Development Server" setting to "Use IIS Express" fixed the problem immediately.
To access this setting right-click the Azure cloud project file in your solution, select the "Properties" option, tab down to "Web" and you'll see the following setup.
Also, make sure you run Visual Studio as administrator
Please check the version of emulator you have installed. If your code is created in older sdk and you have a new emulator installed it will give you this error.
Check the version of Azure APIs in your project, go to Project > references and right click on Azure dlls to check the version, same sdk version must be installed on the system, higher are optional as azure 2.x are not backward compatible.

Resources