Task `IISWebAppManagementOnMachineGroup` encounter issue "The Parameter is incorrect .. exited with code '87'" - .net-core

hoping that someone can help me with my issue. I've been trying to solve this issue for a week now and still doesn't have a solution.
Here is my issue - I'm encountering the below issue when my pipeline is publishing my application in IIS (Local IIS)
Before, it's working fine and I don't know why this happen now after re-running a new pipeline. I tried to re-install my IIS and removed all MachineKeys. But still got the same error. Also, after re-installing everything, I changed the Owner of all MachineKeys installed on my machine to my account (which is an administrator).
Also, I tried to removed this in the applicationHost.config of the inetsrv as other solution I found on the internet suggestion but still got the same issue.
But then, after searching for other solution - I found out that the command that's running on my pipeline for publishing into IIS somehow causes this issue. The password parameter.
I tried the command below, on running cmd as Administrator and removing the password parameter and it works.
appcmd.exe set site /site.name:"RTP_LoginService" -applicationDefaults.applicationPool:"RTP_LoginServiceAppPool" -[path='/'].[path='/'].physicalPath:"%SystemDrive%\inetpub\wwwroot\RTP_LoginService" -[path='/'].[path='/'].userName: -[path='/'].[path='/'].password:
But still thinking why this become an issue right now as before it's working even though there's a password parameter and I don't have any changes on the Task for publishing in my local IIS as this is a default command by the Task.
Thanks you in advance to anyone who can help me and give light to my issue I'm experiencing.

Giving Credentials of Physical Path for Virtual Machine Directory can also be the trouble for this password excluding issue. Tried to reproduce the issue and got some solution for this as mentioned below.
This problem will also rise because of the corrupted IIS Configuration Key. We need to avoid the key to be corrupted by encrypting the key in applicationhost.config file.
Create another test machine and generate configuration key.
Use that key for checking.
Exporting the key
From the working IIS server we need to export the key.
aspnet_regiis -px "iisConfigurationKey" "Your path for file.xml" -pri
Import config file from created test server
aspnet_regiis -pi "iisConfigurationKey" "Your path for file.xml"
Implement AES encryption algorithm: Replace the AES Provider which is a default encryption method element from applicationHost.config and configProtectedData and restart the server.

I got this working now. So, I fixed this issue by re-installing IIS URL Rewrite as somehow it got uninstalled on my machine. After that, it now working as expected.

Related

IISRESET windows 10 (IIS 10) Access denied

I'm just wondering, why I get error during an iisreset in my development machine.
When I execute the command in a Command Prompt some times it wokrs,sometimes it throws an Access Denied Error, and sometimes it throws a file not found exception.
If anyone finds a solution to this anoying problem, I would appreciate a hint how to get rid of it.
In the IIS I'm just hosting an .NET 4.6.1 MVC site.
This stupid error happens randomly and was very annoying especially when you place iisreset inside a script and assume it will do its thing; took me a while to figure it out. It is not related to the service being stopped as can be seen in this picture:
The only thing I use now is:
net stop W3SVC
and
net start W3SVC
Haven't had a problem since then.
I got exactly the same error time ago. Running it in German too. Take a look at this article: https://techcommunity.microsoft.com/t5/iis-support-blog/iis-reset-issue-restart-attempt-failed/ba-p/1031976
Judging from #Giorgi Nakeuri's question about the event logs. The "World Wide Web Publishing" (called only "WWW-Publishingdienst" in German) is very likely not running. You need to start it. The "Windows activity process service" fails because of the first one failing.
I think it says that he was unable to start the service, mainly due to a Problem with authorization. The solution of the problem can be provided in several different ways
1- Configuration causing the authorization error can be corrected
applicationHost.config with XML
2- This authorization can be revoked through the Windows register. Example approach here:
https://stackoverflow.com/a/21036837/914284
3- Machine configuration can be changed in accordance with this
permission. Please continue with the option that suits you :)
https://knowledge.digicert.com/solution/SO1360
i hope it will resolve
Specifying the machine name also helps in some scenarios:
iisreset %ComputerName%

Cannot delete file in network share

The summarized problem is that I cannot delete specific files in a network share. The files seem to be locked on the server side and not by a windows service. The computers where this problem originated was under a domain and the documents and other windows libraries are on a network share. I have tried several solutions that will be described below.
Here is what happened:
While debugging a web application in Visual Studio, I got the infamous blue screen of death. After I restarted and wanted to resume debugging, the project did not compile. I got this error: "Unexpected error creating debug information file z:\MY_Proj_Dir\obj\Debug\My_Proj_Name.pdb Access is denied". Which I found weird, since I have debugged that project in that location many times before. The unexpected windows error while running the debug session in Visual Studio must have locked it somehow. This file is for debugging information and after looking in forums how to resolve the issue, they recommended to delete the Debug directory.
So here are the solutions I have tried:
- First, of course, I tried to clean and rebuild the project.
- Close visual studio and restart the computer and tried again.
- try to manually delete the obj\Debug directory: The files My_Proj_Name.dll and .pdb could not be deleted because apparently I need permission to perform this action from the administrator, which is myself.
- So I right click the directory, open properties -> Security -> Advanced-> ownership -> and the ownership is of my_user_name#the_domain. Which is the account I am logged in from. If I try to change ownership to the only option that gives me there, which is the same (my_user_name#the_domain) , ticking replace owner on subcontainers and objects, it gives me an error “Error applying Security: access denied”. The same if I try to do it on the individual .dll and .pdb files.
I have tried turning User Account Control off, restarting and trying to delete the file.
I have also tried using the command line with no luck.
I tried the tool "unlocker" to see if I can release the file from other windows services or write permissions, but I still cannot delete them.
To see if the problem was on the computer, I tried to log in using VPN from my home computer and accessing the network drive:
- If I delete the files from there, they immediately reappear, without any "cannot delete" dialog. It doesn’t let me change ownership of those files either.
I started up my Ubuntu VM and accessed the network share. and tried to delete the files from there. It gives me an even more weird error message: "File does not exist". But I can see it there!
I tried to log in to the network share from WinSCP and putty, but I cannot access the domain DNS with ssh or ftp. Probably the server only supports SMB (windows share)... I am not sure.
note: I only have problems with that specific folder and its files. I have no problems with any other folders in my network drive. One thing I have learned is not to debug projects located on a network share.
The problem was solved by working offline and debugging locally. Working offline Visual studio was able to rewrite the debug information files. From visual studio I clean the solution and the files were deleted. It seems that released the lock visual studio had on those files. Once it was working offline it was just a matter of turning the work online mode again. Then I was able to compile and debug normally.
I learned not to debug directly on the network share, but instead have my visual studio projects locally to avoid ownership and permission problems.

AspAllowOutOfProcComponents error: many solutions, one programmer and no fix

I have been trying to work on integrating a NewsLetter for a companies local intranet and I keep running into the same error that everyone seems to be getting. I am running this on IIS 5.1 and on error exists at Server.CreateObject(ADODB.Connection), also the purpose of the ASP code is to read an Excel file
Error Type:
Server object, ASP 0196 (0x80040154)
Only InProc server components should be used. If you want to use LocalServer components, you must set the AspAllowOutOfProcComponents metabase setting. Please consult the help file for important considerations.
I have tried the solution to locate to my AdminScripts directory and setting the boolean value to True with cscript adsutil.vbs set /w3svc/aspallowoutofproccomponents True and then verified by cscript adsutil.vbs enum /w3svc > verified.txt
Opening up the textfile, it does show that the value is set to true but I run into the same error again when trying to access the ASP page. I am at a loss, I figured after reading all those people post questions that I'd ask the question myself.
I cringe at the sight of that error messages, please make my nightmare end.
Its a bizare error to be getting in the first place. Why would the simple ADODB.Connection object be considered an out-of-process component?
The only thing I can think of that might cause this is if someone has accidently dragged the ADO dll into a COM+ Service. Check the set of COM+ Services anything unusual installed there?
In an attempt to repair you could download the latest MDAC from Microsoft's download area and re-install it on your machine.
Enabling out-of-proc components to is not the answer ADODB.Connection should not be out-of-proc.
Next Step
Fire up Regedit, find in Keys the key value of {00000514-0000-0010-8000-00AA006D2EA4} under
HKEY_CLASSES_ROOT
You should find an InprocServer32 key with a default value: C:\Program Files\Common Files\system\ado\msado15.dll
The ProgID should ADODB.Connection.2.8.
I had to use:
Regsvr32.exe "C:\Program Files\Common Files\system\ado\Msado15.dll"
in the command window to have the InProcServer32 key appear, thank you Anthony.
Everything is up and working now. My nightmares are over!

DotNetNuke 3.0.x on SQLServer 2005/Net 2.0.Win2003 - possible?

I've promised to take a look at an old DotNetNuke installation for a client with the intention of making a few, hopefully minor, changes. The installation is rather old - I believe version 3.0.013 - and the production copy is running against SQL Server 2000, Windows 2003 and .Net 1.1.
As the production server is live and significantly used we need a development installation first. I have attempted to install a copy on my local server - Windows 2003, SQL Server 2005, .Net 2.0, and although with a few tweaks I can successfully get it to display the site, I cannot login, or even access the login module (ie just putting in blank username and password attempting to generate a 'must enter username' type error) without getting the error 'Object reference not set to an instance of an object'
I've spent some time trying to get around this error, without success, although I am hampered by not having used this package before.
So my questions are
Has anyone managed to run DotNetNuke 3.0.x with this configuration (or do I need to setup a box with SQL 2000 and .Net 1.0 to get it to run)?
Any suggestions where I should start looking for this error, or has anyone come across anything similar before?
EDIT: Eventually chickened out and installed in on an old webserver with Win2003/SQL 2000/Net 1.1 and it went in fine on an identical install. So I guess the answer is no, it doesn't work straight out of the box.
My feeling is that you shouldn't have any trouble running in the above mentioned environment. But taking a closer look at the error itself will help us to prove that.
If the error is occurring only when you navigate to the Login module, it may be an issue loading the authentication provider. The best way to find out is to look in the DNN Event Log and take a look at the full error message.
Because you can't login to access the Event Log, you should probably just take a look at the row created in the database when you receive the error. The table is called EventLog and there may be a little bit of friction in parsing the error message out, as all of the details are stored in the database in an XML format.
In general, when moving a site from one environment to another there are only a couple of things that you'd need to do:
make sure you can connect to the database
set the file system permissions
It sounds like you already have database connectivity because you can load the site.
However, you may want to double check (just re-apply) the file system permissions for the root of the website on the machine in question. Make sure the identity of the website (typically ASP.NET Machine Account or Network Service) has 'Modify' permissions on the root website directory. Perhaps the web site can't load a particular assembly due to lack of permissions.

Replicate IIS setup from one machine to another

Looked for an answer to this and didn't see it.
This is for IIS 6.0 / Windows Server 2003.
I'm working with an extremely large ASP/ASP.NET application and I'm trying to get my development environment to match my team members environment. This process is basically trial and error: get an error, go into IIS, make a change, hope the error is fixed. Ugh. I'm hoping to find a way to replicate a set of IIS directories and their configurations on one machine onto my machine.
I did find a script that will iterate through and give me a list of all virtual directories on a machine. It helped, but not a lot since I still have to go in and set up all those virtual directories (I think there are like 20 of them ballpark). The whole process is complicated by the fact that we're mixing ASP and ASP.NET applications in the same application which spans many solutions and projects. Getting the whole thing up and going seems like way too much work but I've never heard of a real solution to this.
Would Powershell be helpful here?
You should export and import IIS metabase.
These might help:
IIS Settings Replication
IIS Metabase Backup and Restore
Fortunately, in IIS7, ASP.NET config is integrated with IIS config so the job is done by copying Web.config.
Here's Microsofts' documentation for iiscnfg. iiscnfg documentation
When I ran it the first time, I got an error that said "This script does not work with WScript." If that happens to you:
1. Click OK.
2. At the "Would you like to register Cscript as your default host for VBscript?" click Yes.
3. At "Successfully registered Cscript" click OK.
4. Run the command again

Resources