IIS error 0x80005006 (2147463162) - c#

I was told that we had an old virtual machine that had the same problem and it was fixed by downloading and installing an "iis develepor toolset". Any idea what that "IIS developer toolset" might actually be?
IIS 7.0
This is on a windows 7 box trying to remote to a webserver and setup IIS.
DirectoryEntry rvd = forms_website.Children.Cast<DirectoryEntry>().First();
rvd.Properties["AFName"].Value = "Default Application";

0x80005006 (2174763162) is a generic IIS property error that is thrown for a LOT of reasons. The installation of a toolkit may easily have corrected a permission setting on an extension, updated a property in the metabase, etc. This would not be a directed fix so much as a lucky one as it is possible that the error being thrown was completely unrelated to the tool set, but the update corrected an ancillary issue.

Related

Access Denied when running Windows Service

I have created a Windows Service using ASP.Net Core 3.x and C#. I started with the new Windows Service template when I built the project. When I run it from my development environment or from a console window it runs fine. When I install it as a Windows Service and attempt to start the service I get an
"Error 5: Access is denied." error.
I tried numerous things which I will outline below to eliminate the error but nothing seemed to work so I downloaded the sample app provided by Microsoft, at sample
Same result...when I run the sample app from within Visual Studio it runs fine, when running as a service I get the Access Denied error.
I am running all of this on my local machine, which I am an admin on.
I originally tried to run it using the default Local System account; got the Access Denied error.
I changed the Log On As to my domain account, the same one I use to log into my local machine which is an admin on this machine; got the same Access Denied error.
My account has the privilege set to run as a service.
The Event Viewer just shows the one message which says "Access Denied", no other messages are created.
I believe the Access Denied error is occurring before the C# code is even executed. What makes me believe this is that I added one line to the very top of the Program.Main.... File.WriteAllText("C:\\temp\\ws.log", $"Test of Worker Service # {DateTime.Now}. Content Root Path: {AppContext.BaseDirectory}");. My account has full access to the temp folder. This file gets created when I run the app from Visual Studio but it does not get created when I run the app as a service.
I have read numerous web sites, include this one and this one. No luck, everything I tried from these sites still produce the Access Denied error.
I have run out of ideas and am hoping someone here can provide me the answer. Thanks!
I found the solution and believe me I feel really stupid!!!
When I installed it as a service I only put the path in "binPath".
sc create WindowsService1 binPath="C:\temp".
Once I actually added the executable to the binPath parameter everything worked.
Changed it to sc create WindowsService1 binPath="C:\temp\WindowsService.exe" and it worked.
I know it is an Id10t error but Microsoft should really provide better messaging for the "sc" command. A message like "Cannot find file specified in the binPath parameter" would have been really helpful. Would have saved me about 6 hours of work.
Thanks everyone for reviewing and replying to this question.

IISExpress crash upon debug start

When i try to start my ASP.NET application from VS (2015 or 2017) it just crash with no error in output window.
The program '[8464] iisexpress.exe' has exited with code 0 (0x0).
But Windows Event log says this:
The Module name ManagedEngineV4.0_32bit path C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\webengine4.dll returned an error from registration. The data is the error.
I have no more ideas about how to fix this.
I've tried to reinstall VS, IIS, even tried to remove .net framework, change IIS settings from 32 to 64bit but no luck so far.
Any chance someone experienced similar error and found the solution? :)
P.S.
Extended error log:
System
Provider
[ Name] IIS Express
EventID 2293
[ Qualifiers] 49152
Level 2
Task 0
Keywords 0x80000000000000
TimeCreated
[ SystemTime] 2017-06-06T20:47:56.693031400Z
EventRecordID 7271
Channel Application
Computer PC
Security
EventData
ManagedEngineV4.0_32bit
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\webengine4.dll
2BEE0CC0
Binary data:
In Words
0000: C00CEE2B
In Bytes
0000: 2B EE 0C C0 +î.À
I know this is an old thread, but this has been killing me today. And since this is pretty much teh top thread on any search for the error, i decided to add this.
taken from here
"Unable to launch the IIS Express Web server" error
Delete folder IISExpress from "My Documents"
Load your project again, it will create IISExpress folder again with updated configuration
Check IISExpress folder has sufficient permissions to read-write the configuration file
Load project again and Run IISExpress. It should work.
I didn't need to check any permissions or anything, just deleting and reloading the project was enough for IIS to behave itself and i could get back to some debugging fun.
Cheers
After couple of days spent trying to solve the problem, i didn't succeed, so here is quick workaround:
Uninstall of IISExpress v10
Install IISExpress v8
And everything works just fine
We encountered this same problem and event viewer error using IIS. For us the problem was we were modifying C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet.config to apply some garbage collection improvements, and ended up with a typo in the XML.
So not related to IIS Express, but thought I'd mention it for others who find this post when searching for the error message:
The Module name ManagedEngineV4.0_64bit path
C:\windows\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll
returned an error from registration. The data is the error.

PrivateFontCollection.AddFontFile() throws generic GDI+ error exception

Adding a private Font works fine on my local dev machine with Windows 10 Pro. However on Windows Server 2012 R2 the very same code results in the following error:
System.Runtime.InteropServices.ExternalException: A generic error
occurred in GDI+. at
System.Drawing.Text.PrivateFontCollection.AddFontFile(String filename)
var privateFontCollection = new PrivateFontCollection();
privateFontCollection.AddFontFile("Roboto-Regular.ttf");
When I delete the file it results in a NotFoundException, so the file path has to be right. I ensured that every user has every possible permission on the file. (I found out that if I deny every permission on my local win 10 machine the same "generic error" occurs - so it might be a permission problem)
Has anybody a solution for this problem?
Could it be possible that the service user on the productive machine lacks some other rights that are necessary for "installing" private fonts? Maybe the font gets installed to a specific directory which is not allowed - but I could not find out where this would be.
Please help me with this very self explaining "generic error".
It seems to have been a problem with not using an absolute path. Didn't think of it at first, because deleting the file resulted in an explicit FileNotFound.
Using an absolute path did the trick.

error of updating an C# web service application by accessing a URL from MS installer command "msiexec" in C# VS 2010

This question is related to my previous question.
I need to publish a C# application (that has been set up in IIS 6.0 and built in VS2010) to a desktop with win7.
I have set up IIS on my desktop well. Now I can install the application on my laptop by accessing the URL
http://myDesktopName.domain.com/MyApp
pointing to a physical location in desktop
e:\myPath\myApp\myAppService.svc
When I publish a new version of the web service, the application should get updated when I open it.
But, it gave me an error:
**the filename,directory name, or volume label syntax is incorrect**
After searching online, I found this error is normally caused by some unacccepted chars in the link. Here is the code that the msi (MS installer) needs to access and get the new version of the application.
System.Diagnostics.Process.Start("msiexec", "/favmuso \"" + myurl + "\"");
here,
myurl is http://myDesktopName.domain.com/MyApp/MyAppSetup.msi
Here, http://myDesktopName/MyApp/ is the virtual directory set in IIS 6.0 on my desktop. I can access and download it from IE in my laptop without any problems.
But, when the application notified me that a new version is available for updating the old one, I clicked the pop-up ballon on the application icon and then I got the error:
Error 123. The filename, directory name, or volume label syntax is incorrect.
If I try to access it from the C# code, I got the same error.
Then, I did a test by running
msiexec **/favmuso** http://myDesktopName.domain.com/MyApp/MyAppSetup.msi /Lv mapp_msi.log
In the log file, i found :
MSI (s) (80:DC) [18:04:33:089]: SECREPAIR: Failed to open the
file:http://myDesktopName.domain.com/mypath/\myAppSdetup (10).msi for computing its hash. Error:123
Error 123. The filename, directory name, or volume label syntax is incorrect.
Why my applcation setup file name was changed to
\myAppSdetup (10).msi
The "/favmuso" options can be found at
https://technet.microsoft.com/en-gb/library/cc759262%28v=ws.10%29.aspx#BKMK_Install
Any help would be appreciated.
thanks
So I noticed that you've asked this question elsewhere, and everyone was focused on the /favmuso piece of it.
I've been recently exeriencing this issue when trying to repair MSIs with a URL source when the original application was installed by SCCM 2012.
The workaround I found was to add a registry value at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer. The value below causes the MSI to skip the problematic portion of the repair and move on.
Name: SecureRepairPolicy
Type: REG_DWORD
Value: 1
To be a bit safer, you look into setting the registry value to 2 and using a whitelist as described in this Microsoft article: https://support.microsoft.com/en-us/kb/2918614. (Ctrl+F "Steps to opt-out the affected programs".)

Getting error '80070002' from COM .dll

I am moving a Classic ASP site from a Windows 2000 server to a Windows 2008 (both dev and prod). I have a .dll that was created in .NET 1.1. The error is occurring when function created in JScript located in this securityUtility.asp creates an ActiveXobject using the dll. The line looks as follows:
function getProfileFromLdap(user, pw){
var aClass, aProfile
aClass = new ActiveXObject("com.co.comp.security.ldap.LDAPLogin");
...
}
The error that is occurring is:
error '80070002'
E:\SITES\WWW-COMPANYSITE-COM\SITE\BINS../../siteInc/securityUtility.asp, line 850
I had run the following command to register the dll in the registry:
"C:\Windows\Microsoft.NET\Framework\v1.1.4322\RegAsm" coSecurity.dll /tlb:coSecurity.tlb
I don't know if it's worth mentioning but at one point the site worked perfectly in dev and erring when I attempted to move the site to production. I had moved the site to the new dev server (Windows 2008) so long ago. I had made notes so when I moved it up to production I knew what steps I had taken. I thought perhaps I forgot to record a step so in attempt to retrace what I did, I uninstalled the .dll and went through the steps I had recorded. It is now broken in dev but at one point it was working.
Another thing I'm not sure is worth mentioning is this site was the first site on the new dev server. .NET 1.1 was installed prior to any other framework. 4.0 and 2.0 were installed after the fact. On the prod server 4.0 was installed first and then 1.1. Not sure if that's signficant or not.
When the dev site was working I had confirmed the items were in the
registry comparing them to the old production and the new dev
servers and the new production
On the old production server there was nothing in the GAC
The coSecurity.dll is in the same file as the securityUtility.asp
(the page that the code belongs to).
The Application pool for the has "enable 32-bit applications" as true
for both of the new environments
"Everyone" is granted full rights on the .dll
I'm not sure what I'm missing!
This is what I ended up doing for those that have been beating their heads against the wall like I was:
opened a command prompt as administrator
navigated to where the dll was stored
unregistered the dll using
"C:\Windows\Microsoft.NET\Framework\v1.1.4322\RegAsm" /u
coSecurity.dll
re-registered the dll by using
"C:\Windows\Microsoft.NET\Framework\v1.1.4322\RegAsm" coSecurity.dll
/codebase
you'll get a regasm warning but should also get the message "Types
registered successfully"
After that I no longer recieved the error!
In general HRESULT 80070002 means "File Not Found".
My guess is you are missing a dependency. Try using Dependency Walker to see if there are any dependencies which should be included.
Also see this thread for some tips about registering COM servers manually.

Categories

Resources