An error occurred attempting to determine the process id of dotnet.exe which is hosting your application.A task was canceled - asp.net-core-2.0

When I try to startup my project w/ IIS Express I get the error:
enter image description here

VS 2017
Project Properties
Debug
Launch Browser //http://localhost:5000 or whatever
Uncheck Enable SSL
App Url //http://localhost:5000 or whatever. make sure same with Launch Browser url
Save and Close
Open launchsettings.Json under Properties (Solution Explorer)
Make sure old settings is deleted. If not delete it.
Save and Close.
Hope it helps

I encountered this error when trying to launch a downloaded project in which the target framework version was different from the version installed in my environment. I opened the “.csproj” file in a text editor, corrected the version in the “TargetFramework” node and saved the modified file. In order to be sure to make the changes take effect, I closed and reopened the Visual Studio solution containing the project. Then the project started correctly.

Related

Android Studio - No SDK Found - Setup wizard fails - Firewall Proxy

So getting right to the point, I am behind a corporate firewall. I had to manually download the zip file for Android Studio which I extracted to program files (windows 10) on my machine. When I launch studio I'm dialogue'd studio needs to retrieve sdk's which I try to do but it fails on these 3 zips.
build-tools_r29.0.1-windows.zip
platform-29_r01.zip
sdk-tools-windows-4333796.zip
Mostly I see
java.net.SocketTimeoutException: Read timed out Warning: An error
occurred while preparing SDK package Android SDK Build-Tools 29.0.1:
Read timed out.
I'm assuming my firewall proxy is preventing this type of setup install since the links to these zips point outside our network but I am able to download the zips individually through a browser session one by one and save them here
c:\Users\myPin\AppData\Android\Sdk
I extracted each zip file and then reran Android Studio but it doesn't seem to have made any difference. It still goes out trying to download the same packages which I already extracted to the SDK folder. Shouldnt studio see the zips I've extracted in the SDK folder location? How can I get this working?
So we have work around I think others might find useful. If your having problems with the Gui SDK manager, then definitely use the cmd based sdk manager. This did not time out for us.
So for example where in the Gui I would get something like
java.net.SocketTimeoutException: Read timed out
When tryin got get platform-29_r01.zip
But if I try to perform the same operation using C:\Users\PIN\AppData\Local\Android\Sdk\Tools\bin\sdkmanager.bat using whatever cmd tool you like (I like cmder).
.\sdkmanager.bat --proxy=http --proxy_host=access.lb.ssa.gov --proxy_port=80 "platforms;android-28" --verbose
The above cmd will dl's and configure the sdk correctly.
You may have to do this for any of the sdk's you require. I think in our Firewall proxy scenario there's a user-agent setting or something that is not set for the Gui which is causing the timeouts but not with the cmd tools so this is a legitimate work around I think.
First things first. You have to check your Computer time, it must be accurate. If still error appeared, try this.
On you PC search Powershell and type code below. See image below for reference.
Path reference
Powershell Image
Failed version code
Click Retry
.\sdkmanager.bat --proxy=http --proxy_host=access.lb.ssa.gov --proxy_port=80 "platforms;android-29" --verbose
Run powershell > type cd> path of files
Check what SDK number version is getting error
From the android studio ERROR, click Retry while powershell is running.
If the said SDK version number is fixed, go to the next version number, by pressing control+C to powershell to stop the command.
Then type the same code with different number..
Note: If you do not have bin folder. You can create a folder named bin and create sdkmanager.bat file, inside sdkmanager.bat file, type this code >> sdkmanager.bat and save.

Error when using development time IIS support

Update: this bug has been fixed for a while now
I installed Visual Studio 2017.3 yesterday and was trying to used the new Development time IIS Support feature. I think I encountered a bug, and I was wondering if anyone knows a workaround this bug. When I used it with a new project it works fine most of the time. By most of the time, is that I think it is broken sometimes depending on the where the project is located/state of cached data, etc.
Sometimes I get an error "Value cannot be null. Parameter name: name". That's the entire error. No log files, no extra information.
I tried to enable the feature for an existing project I am working
on, it got that error.
I tried adding a new web project in a new solution it worked fine. I tried adding a new web project in the same solution as my project, it didn't work.
I deleted all temp files, all bin obj and .vs folders and .user files in the
solution. Same problem.
I deleted temp folder, visual studio user profile data, and restarted the PC same problem.
I tried again in the same solution with the project not having '.' in the name, it worked.
I did some modification to the project that was working and tried to launch again I got same error.
I reverted all changes so that the project was back to the "empty project" state, still same error.
I removed the project. Exited visual studio, deleted all temp/.vs/.use/bin/obj files. Then restarted and added the project again, it worked.
I restarted VS and tried to relaunch it didn't work.
The aspnet core version seems to be not related to the bug. I had the problem with projects targeting 1.1 and 2.0 and also had the feature working for both versions.
So obviously this is a bug in VS2017.3. Since even if I am doing something wrong I should at least get an error explaining what I do wrong not an ArgumentNullException message. I already made a bug report. I am wondering if someone knows a workaround thing bug.
Thanks a lot in advance.
Update: This bug has been fixed for a while now.
After some investigation and with help from a helpful member of Microsoft's Visual Studio Team, I found that Visual Studio was failing at the point where it grants folder read access to the IIS App Pool account. The method that gets the App Pool account name was returning null, and when that null value was passed to the System.Security.Principal.NTAccount class constructor, the ArgumentNullException is thrown.
A workaround that fixed the problem for me, was changing the App Pool to any other App Pool, trying to launch, then changing it back to the original/desired App Pool.
First You Must Update Visual studio with visual studio Installer and Launch the Visual Studio installer.
And Select the Development time IIS support component and Modify.
Wait For Download is Processing
The component is listed as optional in the Summary panel for the ASP.NET and web development workload.
Then you Create New Project Again
Problem Solved.

Error loading Visual Studio 2012 and 2015 projects

I have been with VS2012 for a few years now. I developed my first asp.net/angularjs project under VS2012.
Secondly, I recently checked out a VS2013 project (written by a 3rd party) which ran just fine under 2012.
Then it was suggested that I install VS2015 on my laptop. This is when things went wrong.
Problems:
I attempted to load the new VS2013 project in VS2015, but it immediately failed to load.
VS2015 error:
Creation of the virtual directory http://localhost:32999/
failed with the error: Filename: redirection.config
Error: Cannot read configuration file
Now when I go back to VS2012 and load my original asp.net/angular project, I get this error:
So in the end, I can't load any projects at all ! Neither 2012 nor 2015.
My local IIS websites are still running fine, by the way, but not the local dev environments.
How can I fix these virtual directories ?
Thanks in advance,
Bob
As per some guidance from this post - IISExpress 8 Cannot read configuration file redirection.config, here's how I got my VS2015 to load up successfully:
Close VS2015
Go into folder %userprofile%\Documents\IISExpress\config
Rename applicationhost.config
Restart VS and load the solution/project
VS should have recreated applicationhost.config, and project should load
Of course, I now have a different error, which I will post anew:
[BadImageFormatException: Could not load file or assembly 'MyWebApp.DAL'
or one of its dependencies. An attempt was made
to load a program with an incorrect format.]
I resolved the same problem by starting visual studio with Administrator rights. This post pointed me in the right direction and gives more solutions.
This may be due to checked-in applicationhost file.
Delete the file from the repository. Build the project again. This file will be created automatically. Don't check in this config file again.
This won't work for everyone, but in my case, the file that couldn't be written was actually a temp file in C:\users\\AppData\Local\Temp\iisexpress. We were getting a company wide virus attack and they shut this area down for everyone. They were able to change the policy just for me and that fixed it.

Debugging an ASP.NET app running on IIS express VS2012

I am using Windows 8 and Visual Studio 2012 to run an ASP.NET web application locally. Problem is I can't figure out how to attach the debugger. I tried debug>start debugging but it gives me the following error...
I added a breakpoint in my code and tried starting/hitting site, but no dice. I also checked my project and ensured ASP.NET debugging was checked and confirmed the proper config in my web.xml.
Any ideas?
Update:
Ok I can attach to the process using the following....
But it still says my symbols have not been generated...
And when I try to connect to iisexpress instead I see...
You need to attach the debugger to iisexpress.exe. Although this worked for me it did throw up an error at first so my assumption is that it can just be ignored. I am marking this as the solution for now, however, if someone comes up with a better answer I will switch.
It looks like you are trying to start a library project and not an asp.net project.
Do you have more than one project in your solution? Try right clicking your project file and clicking 'set as start up project' and debugging it again.
If you only have the one project in your solution, or you are sure the right project is set as the start up project, then you probably created the wrong project type for it. Create an asp.net project and move your files over into that.
Make sure your project is a asp.net project. If it is, right click on the project and select "set as startup project", then try running it.

Debugger can't connect when starting local azure project

Ok, first of; here's what I did:
Install AZURE tools
Reboot
Start Visual Studio - new Azure project
Add web role (asp.net MVC 4 beta web role)
Hit F5 (debug)
It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.
Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:
So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.
How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.
I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).
Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.
Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.
I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.
I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
file for the error messages. Mode details at
https://stackoverflow.com/a/8432621/182371
Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0', right
click --> Explore.... Make sure that this folder is not empty and
contains all the files required to start a web project successfully.
As for the Access Denied error:
it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.
Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx
Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.
I've met the same issue. In the end, I had to reinstall IIS 7.
I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.
Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk when upgraded from 2011.

Resources