I can't load the project in visual studio 2013.
error : The Web project 'ProjectName' is configured to use IIS Express. You must download and install IIS Express in order to load this project.
has any simple solution for this?
I had the same issue with a project on VS2015.
I deleted all the files in the repository (using Windows Explorer), then pulled the branch again, discarding all changes. This solved the issue, so I think this might have been down to some configuration file in the bin or something.
Related
Everything was fine until yesterday. This must be due to Windows update. No one touched the server. I have tired couple of similar solutions posted in Stack Overflow(all are old questions),none of them worked for me. What I have, Server Windows server 2019, APP netcore 3.1 ,IIS version 10. .net core runtime and SDK both are installed. This was working before. No one touched anything, just stopped working
In the browser appearing
HTTP Error 500.31 - ANCM Failed to Find Native Dependencies
When I executed on the command line
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in
When I checked event log. Something like below appeared. But let me tell you in the build
directory we don't have a file like app.runtimeconfig.json
What I have tried
Repair .netcoe runtime and SDK
Restore old DB backup
Reinstall .netcore versions
No pending Windows updates
Restart IIS APP pool also the server
Check file permission
None of them worked for me. If anyone can help, really appreciate.
For this issue, we can't find out that the environment of windows server caused by windows update is abnormal. As you said, it worked fine before.
So please allow me summarize below suggestions as answer.
Suggestions
Copy the publish file named original_file . And paste it in our dev pc or other server which have IIS Management. And test it, this publish file should be works. This step just confirm the publish file is normal.
Create a new website and a new application pool. Create a new asp.net core3.1 application and deploy it. Then check if it works properly under this new site.
The site should be fine in the second steps, and replace it with the original_file. And the application also should be works fine.
The site can't work in the second steps, it means the environment in you server has some problem. It could be registry issue or ApplicationHost.config issue in IIS and so on. If it's very important for you, you can rasie a support ticket and let official engineer help you to figure out what happend in this windows Update
After the third step, if the new site can run the original_file file well. We can compare ApplicationHost.config between the new site and the original one to see if any settings have been changed.
I am keep getting 500.19(0x8007000d) error when running my .NET core project through IIS Express.
After a bit digging, it looks like IIS doesn't recognize <aspNetCore> as a valid element in the web.config.
Here are the things I've tried:
installed URL rewrite module as someone suggested installed
AspNetCoreModule throgh here:
https://www.microsoft.com/net/download/dotnet-core/runtime-2.0.5.
installed .NET Core Windows Server Hosting bundle.
I've tried adding it as a managed module and put the path for AspNetCoreModule, but looks like it doesn't fix the issue. Enable stdoutLog doesn't work, because it simply won't generate any log file.
Any idea on how to solve this?
I got it working finally. Because all my website is under the default website, I went to install AspNetCoreModule module for the default website.
After it was installed, I noticed a change in the web.config under the default website. At the same time, AspNetCoreModule module is also listed as Native module in the module section.
The real error message is web.config was trying to install AspNetCoreModule, but it is already installed. Then I deleted the <modules> section in the web.config under the default website and it worked...
The website used to work before I turned off/on windows IIS features. Really not sure what caused this...
Repairing the core server hosting from the add remove program did the trick -
It seems like IIS was installed or changed after core windows server hosting. According to Microsoft is such case you need to repair the hosting bundle
Add Native module with path C:\Windows\system32\inetsrv\aspnetcore.dll
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.
I'm using the VS2013 Installer extension to build a web service installer.
The problem I'm having is that after installing this service, if I go to the inetpub folder, I find no reference to the service I just installed, and the service is evidently installed in the local source folder instead.
This behaviour is consistent regardless of where the installer is run from on the HDD.
If anyone has any insight on this, I'd appreciate it. I assumed that the installation directory would be determined based on the inetpub folder used by the Default Web Site, but it doesn't appear to be.
I wrote a static method in an MVC (WebApi) website. The static method had a bug in it, so I changed the logic in the static method. The method now works on my local machine and returns the correct data.
However, Azure is STILL running the old method and returning the incorrect results. The only thing I could do was compile the library locally and FTP it up to Azure.
Why is the old static method being retained - even AFTER a build and deployment?
NOTE: I'm doing manual build/deployments from Visual Studio Online/TFS (I'm not deploying from Visual Studio). I do have Rebuild and Clean flags set on MSBUILD.
UPDATE: After looking at file sizes, apparently Azure is deploying an older version of the DLL as the DLL that's deployed is much larger than the one I'm compiling locally.
Is that new dll included in the file list you can see in preview just before you publish to your website? What are your publish options for the dll?
I assume you are using Azure Websites? Is that correct?
I'd just deploy to another Website instance, test as working using the default domain and if it all looks good redirect DNS and delete the old site.
Arggghhh!!!
After 2 days of troubleshooting, I finally figured it out.
Again, the local DLL was different than Azure's DLL in size. So I started thinking that they may be a problem w/ the file in Visual Studio Online.
So, I opened up another VM and connected to VSO to look at the source explorer. Sure enough, the file in VSO was the old version. Apparently, Visual Studio marked the file locally as being up-to-date so it wasn't being checked in with any new changes.
To fix:
Do an exclusive checkout of the file in Visual Studio
Then, attempt a check in
You should then, finally(!!!), get a merge error
Merge the local file with the file in the repository
Check the file back into VSO.
It's finally deploying correctly again.