Visual Studio Team Services error: "The target of the specified cmdlet cannot be a Windows client-based operating system." - tfs

When I try to deploy my artifact on IIS, I am getting the error as shown in the below screenshot. Any help will be greatly appreciated.
The "IIS Web App Management" screenshot is shown below:

The error message is pretty clear: You can't use it to install IIS on a client OS (such as Windows 10). You have to use a server OS (such as Windows Server).
There's nothing you can do about it other than to use a server OS or use an alternate tool to deploy.

Using Windows Remote Management (WinRM), connect to the host
machine(s) where IIS or SQL Server is installed, and manage the Web
application or deploy the SQL Server Database as described below:
Create a new website or update an existing website using AppCmd.exe.
Create a new application pool or update an existing application pool using AppCmd.exe.
Deploy a Web Application to the IIS Server using Web Deploy.
Deploy a SQL Server Database using DACPAC and SqlPackage.exe.
Your log mentioned the task was installing IIS, and it seemed the tasking was installing IIS on a windows client OS. You need to check your target machine to see whether it has IIS installed.

Related

Deploying MVC file system publish on IIS7

I have created an MVC application in Visual Studio 2013 and I now wish to deploy this on the IIS of the server so that all employees from within the company will be able to access it via their windows login credentials.
When I run this in localhost via Visual Studio debug it works as expected but I have been trying unsuccessfully to deploy this to a network server and I am unsure of the process and would be grateful for some clarification.
I chose a file system publish from the publish options but I am unsure as to how to get this accessible as an application. I have tried adding the files via the new website wizard and tried the url of 'holidays/' which I had entered but without success. I then tried to add the same virtual directory location as an application from within this website but again this was unsuccessful.
I use Web Deploy with VS. Your target server needs to also have Web Deploy:
Installing and Configuring Web Deploy on IIS 7
Once your target server is ready, you can deploy from VS. Here's a guide on doing that (you can jump right to "Publish to IIS" section if you like):
ASP.NET Web Deployment using Visual Studio
With Web Deploy, you can choose to publish directly or use a deployment package. Once you are happy the publishing works locally, you have a level of confidence your publishing will work in your Live environment.
I would suggest that before you publish direct to a live environment, that you test publish it to your local machine or a test environment that has the same IIS version, and .NET Framework installed.

MobileFirst Server 7.0.0 as service on Windows Server 2012 not recognizing runtime environments

We are encountering a problem running the MobileFirst Enterprise Server on Windows Server 2012 R2. When we start using a batch file as Administrator, as long as we stay remote connected the server is working OK, we see the Runtime Environments. But when we log out, server is unreachable. We created a Windows Service that starts the server with same command:
*sc create WASLibertyV85 binPath= "C:\Program Files\IBM\WebSphere\Liberty\bin\server.bat start worklight" DisplayName="IBM WebSphere Liberty V8.5 Worklight" start=auto*
But the Runtime is not displayed, we only see:
No runtime environment deployed in this server.
Is there a way to enable MobileFirst Server seeing the Runtime Environments when was started as service?
Here's our complete solution:
1. Start CMD as administrator and run this:
sc create WASLibertyV85 binPath= "C:\Program Files\IBM\WebSphere\Liberty\bin\server.bat start worklight" DisplayName="IBM WebSphere Liberty V8.5 Worklight" start=delayed-auto
2. under Services.msc open the properties of the „IBM WebSphere Liberty V8.5 Worklight“ service and set this (if not already):
Tab GENERAL -> Startup type: Automatic (Delayed Start)
Tab LOG ON -> Log on as: Local System account + Allow service to interact with desktop
++ When the server restarts, it can take up to 2 minutes, until the runtimes are displayed in the Worklight Console!++
MFP is not being run as a service. MFP is simply a web app (a .war file, a .jar file and some artifacts) running on-top of WebSphere Liberty, in your case. So all of this is related only to Liberty and not to MFP.
As long as the Liberty instance is launched correctly, it should handle everything on its own, including the web apps that are deployed to it, MFP being one of them.
You could perhaps follow the instructions provided in this forum topic explaining how to use Apache Commons Daemon to run Liberty as a Windows service. There are other tools that can do this as well.
The problem was cause by starting the service with a log on account set as current windows user. When we've chaged to Local System Account and enabled Allow system to interact with desktop, the Runtime became visible on MobileFirst Server.

Publishing my asp.net mvc to IIS production server. should i have Visual Studio to do this

I have moved my asp.net mvc web application to our staging server and I have deploy it to IIS using visual Studio, as our staging server already contain Visual Studio .i did this bu right-click on my project and click on Publish. currently I need to move the asp.net mvc web application to production server and deploy it on IIS, but I have a couple of questions:-
Should I install visual studio inside my production server. Or it is better to avoid doing so ?
Is there a way to deploy my asp.net mvc directly to IIS , without uisng visual Studio ?
Thanks
Should I install visual studio inside my production server. Or it is better to avoid doing so ?
While you technically could, you shouldn't. There's no reason why you'd like to install visual studio on your production server since you'd only use VS to debug existing projects, however, your website should not be running in Debug Mode and it is a waste of resources to run a production website in Debug Mode. You should have your website pre-compiled and deployed in Release Mode. That said, an installation of VS will serve no purpose on a production server
Is there a way to deploy my asp.net mvc directly to IIS , without uisng visual Studio ?
Definitely, you can publish your pre-compiled website to a location in your hard-drive or even to a remote location and then manually copy the website files to your production server. That is the hard way. But, if you have Build management tool such as TeamCity integrated with source control system...then this task becomes even simpler since you can even publish projects automatically
1.bad idea. production server should have only your app code + advanced log system(nlog, etc) . nothing else.
2.
options:
xcopy deployment Compile your asp.net application and copy all the files to your server. You can do this by using FTP or shared directories. (Or anything else to transfer files.)
WebDeploy You have the possibility to deploy your asp.net webpage directly form your Visual Studio. If you go to "Build" and you choose "Publish Web". To be able to to do this you have to configure your server before. But this works automatically after you have set up everything. It's very handy since your deployment becomes easy to rebuild. http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx
Web Setup - Installer Visual Studio provide also the option to build an installer. This works like installing usual software on your windows computer with the installer wizard. (See the link) http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx
Manage multiple server There is also a way of managing the deployment of multiple servers. It seems to be a bit more complicated but could be interesting for professionals. (Check out on Google Microsoft Web Farm Framework 2.0
from here : Types of deployment in asp.net
Should I install visual studio inside my production server. Or it is
better to avoid doing so ?
Do not install VS on production servers. It is a bad practise.
Is there a way to deploy my asp.net mvc directly to IIS , without
uisng visual Studio ?
You can use your local Visual Studio to publish bits to remote IIS -
Automated Web Deploy using Visual Studio
Alternatively you can have new deployment strategies like let Team Foundation Server (TFS) deploy to IIS
One more option to is to FTP into Remote Web Server and push the latest bits from client side itself. I mean to ay, publish your site locally onto your file system. Then FTP into remote site using any FTP client like FileZilla. Then push the bits. For this to work, you need to configure remote server for FTP.

MSDeploy WMSVC is not working in .net environment

I have a build/test server which is currently running Jenkins for my continuous integration and it also is acting as my test server where code will be deployed to once built (i hope to rectify this and seperate these at a later date when budget allows)
I have a .NET web solution (nothing complex just Umbraco essentially) that i have in SVN and Jenkins is now building correctly. I now want to deploy it onto the same server using MSDeploy. After the build completes the package is generated but the deploy fails with the error
ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started
Here is my msbuild parameters that Jenkins uses
/P:Configuration=Release
/P:DeployOnBuild=True
/P:MSDeployPublishMethod=WMSVC
/P:DeployTarget=MSDeployPublish
/P:PublishProfile=GetSomePixels
/P:MsDeployServiceUrl=https://build.########
/P:AllowUntrustedCertificate=True
/P:CreatePackageOnPublish=True
/P:UserName=#######
/P:Password=########
I've checked the server and the Web Management Service is running and is starting up manually
I've also gone into IIS 8 manager (server 2012) and checked the "Allow Remote Connections" box under "Management Service". Restarted IIS and the WMSVC and still not working.
If i go to https://myserver.co.uk:8172/MsDeploy.axd in a browser it resolves (gives you the warning about an untrusted cert) and then displays a blank page.
Anyone got any ideas as to what i can do? I thought that it may be firewall related and even though it had added an exception to windows firewall for 8172 i have turned the entire firewall off to completely rulle that out and still no luck.
Have run this on the server to check its listening on the correct port
C:\Users\Administrator>netstat -a | findstr 8172
TCP 0.0.0.0:8172 GSP-BUILD:0 LISTENING
TCP [::]:8172 GSP-BUILD:0 LISTENING
Ok i've resolved this. It appears you have to activate the web management service first and then install web deploy and i'd done it the other way round. I uninstalled WebDeploy and re-installed it, restarted the server and its working
Agree with comment.
We had a similar issue. Initial installation even post Web Management Service activation appeared to be incomplete. In our case, even though the service said it was started we couldn't achieve the "green tick" when testing the connection from the Publish dialog when defining a profile.
Reinstalling WebDeploy 3.6 made it function properly.

Azure Compute Emulator can't connect to database after Upgrading to SQL Server 2008 R2

Until last week, I developed with SQL Server 2008 non-R2 and my ASP.NET MVC web application worked fine in the Azure Compute Emulator. It establishes a database connection while running.
After switching to SQL Server 2008 R2 (deinstalled the non-R2 verson before), my web application can't connect to the database anymore when running in the Compute Emulator.
Interesting: When I start my application outside of the Azure Compute Emulator, it works!
The exception:
System.Data.SqlClient.SqlException was unhandled by user code
Message=Cannot open database "X" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
Any ideas? Thanks!
I guess your connection string is with "Integrated Security=True" (or SSPI). Your old server was configured to grand access to the target DataBase for user "Netword Service", while your new R2 installation isn't.
Moreover, when you run your app under Compute Emulator, it uses IIS to run your web role, thus, the default app pool identity (Network Service). However when you run your application without the Cloud Project (Compute Emulator) it uses the Casini (AKA Web Development Server), which runs under the account used for Visual Studio (guess elevated version of your user account). And because your user account does have access to the dabase, your application also has.
I highly suggest drop off any "integrated security" connection strings, and use against SQL Server users when developing Windows Azure applications, that target cloud deployment. SQL Azure only supports SQL Server Authenticatin/Authorization.
I had the same problem, but after removing "Integrated Security=True" from my connection string in web.config the mvc-app could not connect either, this time because of an Entity-Framework error.
But fortunately this workaround finally solved my problem!

Resources