IIS Express Debugging No Longer Working - iis

I'm using IIS Express with Visual Studio 2013 on Windows 8.1 x64 for a WebAPI 2 application (all en-US here). This worked just fine roughly a month ago, but now I'm getting errors when attempting to debug the application.
If I do not run VS as admin (again, didn't need to do this before), I get:
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll
Additional information: Access to the path 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\~AspAccessCheck_c00414062044.tmp' is denied.
A second error occurs after this, or it will be the first error if I run VS as Administrator:
A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll
Additional information: Culture is not supported.
If I run the same WebAPI application from WebMatrix 3, it runs without errors (with or without running 'as Admin').
Project IIS config settings:
<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort>46435</IISExpressSSLPort>
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
<IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
I also have the application running on http://localhost:46436.
What I also find really strange is that the project properties show "IIS Express" and to use a URL of http://localhost:46436/, but in the project file I'm seeing:
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>46435</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:46436</IISUrl>
That may explain my access denied. Regardless if I unset, save, and re-set to use IIS Express (storing it for all users), the <UseIIS> property is set back to true.
EDIT: It looks like "Use IIS" is normal. I created a new WebAPI 2 project as a test. It ran fine under IIS Express OOTB.

I also had this issue. Ended up having to right click the folder in question and add access for the IIS_IUSR account.
If this isn't causing critical errors, you can also disable break mode for this sort of issue via Debug -> Options -> Debugging and check Enable Just My Code (Managed Only)

I updated all of the packages via the 'Manage NuGet Packages' console, and it started working.

Related

IIS App Pool stops when 32-bit is enabled

I have a brand new laptop with Windows 10 Professional. I have installed VS2019. I have also installed IIS. I have the default IIS setup, so just Default Web Site which when browsed goes to the default IIS page. I enable 32-bit mode on my DefaultAppPool. I then try to browse to the website again and I get a 503 error. The app pool has stopped.
I have seen numerous posts on the internet about attaching debuggers, writing log files, looking at the event viewer logs as well - but none of them are helping me. I have noticed that I can enable 32-bit and not assign any web application to it... then the app pool stays running. The second I assign a web application to the app pool it crashes (I set the Start Mode in the app pool advanced settings to Always Running in this instance)
I have created a new App Pool and tried the config again. If I look at event viewer logs, I get this:
I have also tried uninstalling IIS, deleting the inetsrv folder in system32, deleting inetpub and then reinstalling IIS.
I have also tried looking at the applicationHost.config file to try to pick up anything weird in there and everything looks good.
Any assistance would be greatly appreciated!
EDIT:
These are the Friendly views:
Error:
Warning:
I have downloaded the Microsoft Error Lookup tool (https://www.microsoft.com/en-us/download/details.aspx?id=100432)
According to this article I should take the value after the colon (:) and use it as a parameter on the Microsoft Error Tool (http://intelligentsystemsmonitoring.com/knowledgebase/internet-information-services/event-id-iis-worker-process-availability-21961/). I have done this for both values (70050780 and 80070570). Here are the outputs:
Is this anything to go on? If so what can I do to fix these errors? I don't know what file it's trying to access or which directory is corrupt. I have given Everyone and App Pool users access to inetpub to test it out but it doesn't work.

Writing first Liferay application: how to deploy module to server + error: A full JDK (not just JRE) is required

I'm following Liferay getting-started example to develop my first we app with Liferay IDE in which it is mentioned:
Even though all you’ve done is generate it, the guestbook-web project is ready to be built and deployed to Liferay DXP. Make sure that your server is running, and if it isn’t, select it in Developer Studio’s Servers pane and click the start button. After it starts, drag and drop the guestbook-web project from the Project Explorer to the server.
I started the server, however, I don't know how to deploy guestbook-web module to server. Drag and drop is not working for me:
When Opening the web page, this is shown which doesn't contain anything related to guestbook-web module:
Update
When I drag and drop my module on server, for some reason it is not allowed:
Update
Also, I'm receiving such errors on console:
22-Apr-2020 16:02:54.419 SEVERE [http-nio-8080-exec-6] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Module Framework Servlet] in context with path [] threw exception [PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required] with root cause
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
I have set both JDK and JRE path for IDE, not sure why it says A full JDK (not just JRE) is required.
Update
To fix A full JDK (not just JRE) is required error, inspired by this answer, I ran the IDE with this command:
C:\Program Files (x86)\LiferayWorkspacewithDevStudioCommunityEdition\liferay-developer-studio>DeveloperStudio.exe -vm "C:\Program Files\Java\jdk1.8.0_251\bin\javaw.exe"
The error is resolved and default widgets are fine now:
In the IDE: You'll drag the "guestbook-web" with the mouse and drop it right on the highlighted "Liferay 7.x at localhost" Server (Note: on, not below).
Outside of the IDE: Your project generates a jar, and you can copy that to Liferay's deploy directory.
Once the module is deployed, it won't magically show up on the page: Log in as Administrator, choose the "Add" button (a plus sign) and add a "widget" to the page: In the list of Widgets you'll find your new portlet/widget.
The screenshot of your installation looks weird though, as if something didn't go wrong and you'll likely need to look for signs of problems in the log file to see why Liferay ends up in the state that it's in, with a couple of default widgets being unavailable - however, that's unrelated to the question how to deploy new code to the runtime.
Edit: You've mentioned the required JDK from the log. That's good to be fixed.
With regards to the not-working drag&drop: It looks like you're using Liferay Workspace. From the icons in Project Explorer, it looks like your module isn't recognized as such: Try to "Gradle/Refresh Gradle Project" (right-click on "modules") to see if it needs some updates that are missing (and observe its log output). Icons on my IDE look like this:
Once you get those modules recognized, you should be able to drag&drop them to the server.
I realized to avoid A full JDK (not just JRE) is required error, it is needed to setup server correctly while creating it with GUI:

Klondike private NuGet repository api page responds with an HTTP 404.0 error

Using the instructions in this link and the "How to Deploy Klondike"
github instructions I have installed the Klondike release on my local IIS (Version 10.0.15063.0). At first it looked promising, but then I realized that the main page is showing "loading..." rather than the Klondike URL. See image:
Additionally the when I click the API page tab, the site navigates to http://localhost:8081/api which returns a 404.0 HTTP error. This error may not seem very surprising as the site's directory does not contain an api directory. However, I have reverse engineering a working server with Klondike configured on it and it also does not have the api directory. Here is an image of the 404.0 error:
Additionally, when I try to nuget pushto localhost:8081, it results with the error in the image here (note, the red blocked out text is the apikey).
Finally, I have left the handleLocalRequestsAsAdmin is set to true, but even though I am on localhost, it does not show me the "LocalAdministrator" link. I believe that all these symptoms are linked to the same issue.
I have tried the following with no affect on the behavior:
Putting this site in c:\inetpub\wwwroot and also in C:\Klondike;
Using different port numbers, such as 8081 and 80;
Putting a 127.0.0.1 alias in my hosts file and binding the value in IIS to the host name; and
Installed the Debugging tools for Windows install as was suggested on the github site and set the debuggingToolsPath to its path.
(at this point, I'm just guessing at the issue)
The settings I have changed in settings.config file are as follows:
packagesPath = C:\Klondike\App_Data\Packages
Left lucenePath = empty string (I also tried this with a value of C:\Klondike\App_Data\Lucene with no affect.
symbolsPath = C:\Klondike\App_Data\Symbols
debuggingToolsPath = C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
ignorePackageFiles = "true"
I have not changed any values in the web.config file from the default web.config release values.
Thank you for any help that you can provide.
I ran into the same problem, although I was installing Klondike on a remote server rather than locally, but still IIS 10. The problem might be you don't have all the IIS components installed or enabled. More specifically, .NET or one of its required components might not be installed or enabled. If you look at the error on the /api link - it has to do with the MapRequestHandler and Static file handler in IIS - this indicates IIS doesn't know how to handle the request, which is an indicator you might be missing the ExtensionlessUrlHandler in IIS, as well as other components. To solve the problem, go to Start -> Control Panel -> Turn Windows features on or off (varies per system, might be under "Programs and Features"), then find the IIS Application Development Features. These might be listed under Internet Information Services -> World Wide Web Services, or Web Server (IIS) -> Web Server, depending on your system. Once you find these Application Development Features, make sure you have an ASP.NET option checked - you might just want to check all the options. Below is screenshot of what it looks like on my system. You might want to reboot after adding those features - not sure if a reboot is required, but it doesn't hurt. After you enable those features, you might start to run into all kinds of file permission errors when running the Klondike app - you might want to just remove Klondike and reinstall it from the zip file. I have a feeling it Klondike doesn't run cleanly the first time it has problems, as it needs to create an App_Data folder with sub directories.

401.2 IIS Error using Anonymous Authentication

I have set-up my Windows 10 Home PC as a web server to do some development work. I need to use Anonymous Authentication but I'm having issues with 401.2 errors.
401.2 Error
The IIS log gives me:
2015-11-01 18:29:12 192.168.1.14 GET /temp/index.html - 80 - 192.168.1.14 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/46.0.2490.80+Safari/537.36 - 401 2 5 0"
It's a simple index.html page containing just "Hello World!
I've been through the MS troubleshooting article here but it doesn't help support.microsoft.com/en-us/kb/907273
I have posted the IIS set-up, folder set-up, Access control list on the folder and the AppPool Settings:
Link to settings
Thanks
Jeff
I had the same problem and struggled for couple of days. Finally figured it out that one of the reason to get the 401.2 error was because Authentication modules were not installed.
Make sure you have your desired Authentication modules(i.e. Anonymous Authentication) installed in IIS.
To verify go to IIS Manager -> Select root -> Select Authentication.
If it's not showing your Authentication type then go to control panel -> Add/Remove program or goto Run -> type "appwiz.cpl" -> enter to open the add remove program wizard.
Go to windows features -> IIS -> Authentication
Note: If you only want to fix this error in Visual studio for development purpose then you don't need to install those modules. In case you're using IIS express simply go to project properties by pressing "F4" and change the Authentication type from there.
So I gave up on trying to resolve this. I ended up uninstalling all IIS features and re-installing from scratch. After re-installing Anonymous Authentication now works!! :-) If turning it off and turning it back on again doesn't work then try uninstalling and reinstalling! IT support at its best!!

deploying a winform application using clickonce and iis fails

I'm trying to deploy a winform application with IIS and ClickOnce. I can access the publish.htm page and the install even starts when I click on the provided link.
However I get this error during the installation process:
Downloading http://MyWebSiteUrl/.../Interop.SHDocVw.dll did not succceed.
The remote server returned an error: (500) Internal Server Error.
Can anybody help me out on this ?
Thanks,
Bruno
I found out that I needed to check "use .deploy file extension" (under properties>Publish>Options>Deployment
[Answering this old question because it comes up as the best match in my case and the accepted answer was of no use to me].
Background, in an IIS hosted ClickOnce scenario, the downloadable components are itemized in a manifest file at the root of the deployment (that's how you can specify a single download link and deploy all the supporting components).
I was converting a tested application from a WiX installation to a lightweight version with ClickOnce and received the HTTP 500 error without anything else in the logs. Naturally, I failed to think it through and instead found myself getting dragged down the rabbit hole on the internets, with instructions for detailed logging, magic spells, etc.
Upon more sober reflection, the problem was simple and I should have been able to tell immediately from the IIS log: a 500 followed by a 0 is shorthand for 'you're an idiot, the content isn't where you said it was' and it had almost nothing to do with ClickOnce.
I had copy/paste/edited an existing download link template in MVC that was in use for simple apps and it happened to cater to only two levels of subfolders in the manifest. When I ported a more complex project structure, I ended up leaving items in a Resources sub-sub-subfolder that looked fine in the manifest but the path was being truncated in MVC so that the related item could not be found.
Moral of the story - if you get a 500 error always check first to make sure your non-functioning appliance is plugged into a working outlet...

Resources