Under server running IIS 6.0 and Windows Server 2003, I've start to having problems using typical IIS command line configuration commands, for example:
> c:\windows\system32\cscript.exe c:\Windows\system32\iisext.vbs /ListExt
or
> iisweb /create C:\Rome "My Vacations" /d www.reskit.com /dontstart
Reply with:
The IIS Admin scripts only support IIS 6.0
Error &H80070002: The system cannot find the file specified.
The problem start after install antivirus, now uninstalled, so may be antivirus changed or deleted any relevant file, so I've tried:
sfc /scannow , for recover files to it's original state.
Reinstall (by uninstalling / installing) IIS.
Reinstall Cscript.
Reinstall all Framework.NET versions.
But no luck.
The below add will solve your issue
How to add ASP.NET 4.0 as Application Pool on IIS 7, Windows 7
Thanks to:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -ir
Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Start installing ASP.NET (4.0.30319.17929) without changing existing web applica
tions to use this version of ASP.Net.
...
Finished installing ASP.NET (4.0.30319.17929) without changing existing web appl
ications to use this version of ASP.Net.
Related
I do not know whether SO is the best place for this problem, so if you know a better location, let me know, than I will move it there.
We had a properly running Azure Devops deployment pool running with an agent on our VPS. But my PAT expired so I installed a new agent (yes I know, I could have just extended the expire date of my PAT, but I failed to realize that at the time).
But when I install the agent through the script that DevOps provides I get the following error message:
System.IO.FileNotFoundException: Could not load file or assembly 'DotNetAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87b69d96e75fbfca'. The system cannot find the file specified.
File name: 'DotNetAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87b69d96e75fbfca'
I have already tried:
to update the MSBuild tool on the VPS.
remove all agents from VPS
remove all my PATs from DevOps and generate a new one while copying the script in DevOps
Edit 1
added system information
Windows Server 2012 R2 64-bit
Powershell engine version 4 0 -1 -1 (used this)
This version detection tool detects I have these versions of asp.net framework installed
.NET FW 2.0 SP 2 (CLR:2.0)
.NET FW 3.0 SP 2 (CLR:2.0)
.NET FW 3.5 SP 1 (CLR:2.0)
.NET FW 4.6.2 General release (CLR:4.0)
.NET FW 4.7 General release (CLR:4.0)
.NET FW 4.7.1 General release (CLR:4.0)
.NET FW 4.7.2 General release (CLR:4.0)
.NET FW 4.8 General release (CLR:4.0)
Edit 2 added bounty for whichever answer is correct or leads me to the correct solution
It is said in Microsoft site that Starting December 2019, the minimum required .NET version for build agents is 4.6.2 or higher.
You can check if .NET Framework 4.6.2 or higher is installed on your machine.
See below prerequisites to install on-premise agent:
Windows 7, 8.1, or 10 (if using a client OS)
Windows 2008 R2 SP1 or higher (if using a server OS)
PowerShell 3.0 or higher
.NET Framework 4.6.2 or higher
Check the document here for more information.
The PAT token is only used during the installation of the agent. You donot need to install a new agent when the PAT is expired. See below note from microsoft document here.
Note:
when using PAT as the authentication method, the PAT token is only used during the initial configuration of the agent. Later, if the PAT expires or needs to be renewed, no further changes are required by the agent.
Update:
You can check out this link and try downloading a different version(eg. an older version) of the deployment agent package.
After the deployment agent package is downloaded, create a new folder (eg. c:/mydeployagent), unzip the package to this folder, then run below command from the powershell;
.\config.cmd --deploymentgroup --deploymentgroupname "your deployment group name" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://dev.azure.com/yourOrganization/' --projectname 'Your project Name'
In the end we were not able to fix it, also not with the help of Microsoft devs. They did offer to look into it in more detail, but only at a very costly fee and without guarantees for success.
So we ended up setting up a new VPS and migrating all our applications to the new VPS and now everything is working again. This was cheaper in terms of spent hours by us and the IT support agency we use, compared to what Microsoft wanted as payment for just looking into it.
We have a need in our project to automate the process of creating AppPools and Websites in IIS . We would like to write some batch script to get this done. From my research I found that PowerShell has commands that can be used. However when I tried to run IIS module commands in PowerShell on Windows Server 2012 , it does not recognize the commands. Is it correct that this feature was only available for Windows 7 / IIS 7 ? Is it also available now on Windows 2012 R2 / IIS 8. If so where can I find proper documentation and help ?
This feature is of course available in Windows 8/8.1 and Windows Server 2012/2012 R2.
You probably forgot to run Add-PSSnapin WebAdministration before executing other IIS cmdlets.
You can find the full documentation on the Microsoft Technet.
If you run Windows 8.1 or Windows Server 2012 R2 (i.e. you have Windows PowerShell 4.0) you can also use the new PowerShell Desired State Configuration feature with the xWebAdministration Module to create WebAppPools and Websites.
The OS that I am using is Windows 7, and the PowerShell version that is installed here is 2.0. Is it possible for me to upgrade it to version 3.0 or 4.0?
Because there are cmdlets that version 2.0 can't recognize.
Download and install from http://www.microsoft.com/en-us/download/details.aspx?id=34595. You need Windows 7 SP1 though.
It's worth keeping in mind that PowerShell 3 on Windows 7 does not have all the cmdlets as PowerShell 3 on Windows 8. So you may still encounter cmdlets that are not present on your system.
The latest PowerShell version as of Sept 2015 is PowerShell 4.0. It's bundled with Windows Management Framework 4.0.
Here's the download page for PowerShelll 4.0 for all versions of Windows.
For Windows 7, there are 2 links on that page, 1 for x64 and 1 for x86.
Just run this in a console.
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
cinst powershell
It installs the latest version using a Chocolatey repository.
Originally I was using command cinst powershell 3.0.20121027, but it looks like it later stopped working. Since this question is related to PowerShell 3.0 this was the right way. At this moment (June 26, 2014) cinst powershell refers to version 3.0 of PowerShell, and that may change in future.
See the Chocolatey PowerShell package page for details on what version will be installed.
Install Chocolatey
Run the following commands in CMD
choco install powershell
choco upgrade powershell
As of today, Windows PowerShell 5.1 is the latest version. It can be installed as part of Windows Management Framework 5.1. It was released in January 2017.
Quoting from the official Microsoft download page here.
Some of the new and updated features in this release include:
Constrained file copying to/from JEA endpoints
JEA support for Group Managed Service Accounts and Conditional Access Policies
PowerShell console support for VT100 and redirecting stdin with interactive input
Support for catalog signed modules in PowerShell Get
Specifying which module version to load in a script
Package Management cmdlet support for proxy servers
PowerShellGet cmdlet support for proxy servers
Improvements in PowerShell Script Debugging
Improvements in Desired State Configuration (DSC)
Improved PowerShell usage auditing using Transcription and Logging
New and updated cmdlets based on community feedback
The latest PowerShell version as of Aug 2016 is PowerShell 5.1. It's bundled with Windows Management Framework 5.1.
Here's the download page for PowerShell 5.1 for all versions of Windows, including Windows 7 x64 and x86.
It is worth noting that PowerShell 5.1 is the first version available in two editions of "Desktop" and "Core". Powershell Core 6.x is cross-platform, its latest version for Jan 2019 is 6.1.2. It also works on Windows 7 SP1.
do use the links above. If you run into error "This update is not applicable to your computer. " then make sure you are in fact using the right file for your os. for example i tried running windows 2012 server from that link on windows 7 service pack 1 and I got the above error so be sure to use the right zip. If you don't know which os you have then go to start and system and it should pop right up This should be self explanatory but
I am creating msi file using visual studio. But i need to know how to test .Net Framework and SQL server are installed before doing installation of msi.
Is there any settings (Or) any windows installer are available.
Windows Installer proposes use the Bootstrapping for these purposes. You pack your MSI to Setup.exe and set needed prerequisites, in your case .NET FW 4 and SQL. When user starts Setup.exe, it checks if .NET and SQL are installed, if not installs them and then run the your MSI. You could include the installation files of .NET or SQL in your setup.exe or set link from where installation downloads it.
There is more information about Windows Installer Bootstrapping.
IIS 5.1 shipped with windows xp has 10 connection limit. Singll ASP .NET MVC application can use more connections even if HTTP 1.1 is disabled.
To fix this, Microsoft recommends to use IIS 7 Express in XP.
I tried
iisexpress /path:c:\myapp /port:80 /clr:v2.0
and it works in local computer.
This XP computer has number of users. User can log off antytime.
How to run iisexpress automatically if computer is turned on ? I googled but havent found a way like to run it as XP service ?
How to run IIS Express as a process started via a Windows Service describes how to run it from application. However I'm looking a way to use Windows XP as http server without application. Maybe srvany can help ?