I am trying to deploy a WCF service to AppFabric however there is no Deploy option when I right click on the default web site in IIS manager.
Yes this is a new install.
Anybody got any ideas on how to activate this
Actually I just found that I had to reinstall (did a complete install) MSDeploy and it worked fine.
Windows Server AppFabric requires .NET/CLR 4.0 - my guess is that the default website has a CLR 2.0/.NET 3.5 application pool backing it up (which is the default.) Rather than use the default web site, you'd be better of to create a new web site with its own application pool, set to use v4.0. This should enable the import/export application contenxt menus.
Related
I'm attempting to get IIS to serve our ASP.NET 6 web application, but every time it complains of needing a default document. If I run the exe (kestrel) one it will serve it, but we want it to be hosted by IIS with the other components of the site.
I installed the 6.0.10 runtime w/ hosting package and these are the results when listing runtimes:
When looking at the site modules, I think it should have what is needed (think the AspNetCoreModuleV2 one handles the compiled routing scenario?):
Have rebooted the server and the app pool specifically, set to No Managed Code, and whenever I attempt to load the page at the localhost level, I get:
The views are compiled so I don't think I even need IIS to open views locally in any capacity.
Everything you've posted ticks off the major deployment steps for hosting a .NET 6 project on IIS:
Installed the .NET Core 6.0 Runtime Windows Hosting Bundle
Set up the IIS app pool with "No Managed Code"
Rebooted the server: "Have you turned it off and on again?"
After our exchange in the comments, the only thing that appeared to be missing is to use the .NET publish command; not the build command.
When deploying to IIS, you'll want to run the dotnet publish command and then deploy those artifacts to your IIS server. From the docs:
The dotnet publish command's output is ready for deployment to a hosting system (for example, a server, PC, Mac, laptop) for execution. It's the only officially supported way to prepare the application for deployment. Depending on the type of deployment that the project specifies, the hosting system may or may not have the .NET shared runtime installed on it.
You also may want to review: Publish .NET apps with the .NET CLI.
I am developing using VS Code on Windows.
The application is ASP.NET Core 2 or 3.
The enterprise domain is setup to use Windows Authentication.
Kestrel requires admin privilege for setspn.
I cannot figure out a way to run IIS Express from VS Code or command line.
And even if I did, I am wondering how I will be able to debug using OmniSharp?
What is your VS Code workflow to run and debug your ASP.NET Core applications against Windows Authentication?
I know the MS Visual Studio might be easier but it is not an option for me.
Please help.
Update
Unable to use Kesterel:
According to MS Docs, Kesterel only uses Negotiate for Windows Authentication and this requires setspn with admin privilege because it uses User Mode. Is there a way to go around that?
Cannot figure out how to use IIS Express:
What is the -clr version option of ASP.NET Core 2/3? The default value is v4 which seems to be for ASP.NET (i.e. Framework).
Also, even when I specify the -path option, I notice that IIS Express gives the info that it copied and used the default configuration file. By default, Windows Authentication is disabled there. Do I need to edit or create my own configuration file? What options do I need to change or make sure that I have?
Wondering how to debug in VS Code:
I know how to attach to Chrome and Node. Would you please direct me to a documentation on how to attach to IIS Express?
When we publish our ASP.NET Core application and upload to the server, we get an error:
The process cannot access the file because it is being used by another process.
And when stop iis not error. How to upload without stopping IIS?
If you use web deploy to push to an IIS you own (a machine located in your datacenter) you can try to recycle the AppPool used by the web application you are trying to redeploy.
Go to your IIS Management Console
Right click the AppPool in question
Choose the recycle option
Be aware that this would also 'restart' all other apps which are associated to this AppPool.
This 'should' work in most cases.
If you deploy to Azure you might consider using either a Linux App Service or some Docker deployment mechanism altogether. You cannot use the In-Process IIS ASP.NET Core modules in these cases as far as I am aware of but at least deployments don't randomly fail.
We are trying to configure continuous integration with TFS 2012. While queuing a new build, the publish fails with the error:
Build FAILED.
"C:\src\ProjectName.sln" (default target) (1) ->
"C:\src\Website\ProjectName.csproj" (default target) (2) ->
(MSDeployPublish target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): msdeploy error ERROR_COULD_NOT_CONNECT_TO_REMOTESVC: Web deployment task failed. (Could not connect to the remote computer ("ServerName") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC)**
I checked all the points mentioned in the IIS.NET documentation for this error. Both services mentioned, Web Management Service and Web Deployment Agent Service, are running fine. A restart of those services has no change in behavior.
Windows Server 2008 R2 with IIS 7.
Web Deployment Agent Service is running on port 8172.
Web Deploy 3.0
Windows Firewall is not blocking any port on the server.
How can this be fixed?
If you install Web Deploy 3.x BEFORE Web Management Tools are installed, you'll have to re-install Web Deploy. I beat my head against the wall for hours on this.
Install the Web Management Services ("Turn Windows Features On/Off"/Roles -> Web Server -> Management Tools -> Management Service)
Then uninstall Web Deploy (repair didn't work) via the usual Add/Remove Programs control panel
Install Web Deploy 3.x again using Web Platform Installer.
Fixed. /Sigh
Double check in your Web Deploy settings that the name of the website is exactly that of what's in IIS.
Ben Day blogged more about it.
Fix that i saw on another website:
Fix it by adding “http://” to server.
In other words, when server is www.xxxx.com would get the 403 error, but when server is http://www.xxxx.com, then it works.
You need also to indicate the app name e.g 'Default Web Site/MyApp'
That was my error. Once I added /MyApp, it worked.
I got this error when using msdeploy, not TFS. In my case I needed to make sure the user msdeploy is using had permission to deploy to the website.
Find the website in IIS manager, right click and go to Deploy, then Configure Web Deploy Publishing. Find the user used by Web Deploy and setup for this website.
In my case the Internet proxy was enabled on source - which made msdeploy to reach out to internet instead of local ICN.
You should check the logs on your IIS first - see that you actually get to the server, and then you can locate the exact error here - https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0
Uninstalling and re-installing (not repairing!) after setting up IIS did most of the magic for me.
There is another possible cause of the error. IIS Managemente Service have its own configuration for IP Address Restrictions, which default value is Deny Access for unspecified clients (Windows Server 2012 R2 with IIS 8.5).
You must set this value to Allow or add access to your specific IP address/IP address range using the Allow... button.
Remember, you must Stop the Management Service previously to change this configuration.
When trying to launch solution, I receive the following error:
error : The Web Application Project MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found.
How do I resolve this issue?
I opened IIS and set the TCP port on the Default Web Site to 64646 and the project loaded without error.
You need to install IIS on your development machine.
Using IIS you'll also need to run Visual Studio in Admin Mode as well.
It is recommended that you use IIS Express since it will allow you to run VS without Admin privileges.
You have to install IIS and create the web site in IIS with the matching port number. Someone else created the visual studio web project to use IIS and configured it on their computer. Each person who opens the solution has to have all the websites configured in IIS manually.
You might consider creating a script that auto-creates them in the source repository. You can do it using AppCmd.exe (ADD SITE, ADD APPPOOL, LIST APPPOOL, LIST SITE) (%windir%\system32\inetsrv\AppCmd.exe).