Visual Studio 2013 Compilation Error - asp.net

I get a compilation error in my web page. I've just upgraded to Visual Studio 2013 Professional (version 12.0.30110.00 Update 1) from VS2010 (I still have VS2010 installed).
One of the webpages I'm developing is not running after the upgrade. The error shown in the web browser when running locally is:
Compilation error with error code 1.
Which is translated from spanish: "Error del compilador con el código de error 1."
I found more information about the error in Windows event viewer:
Faulting application vbc.exe, version 12.0.20806.33440, stamp 52005857, faulting module kernelbase.dll, version 6.3.9600.16408, stamp 523d45f2, debug? 0, fault address 0x00011aa0
This error only happens with a single aspx page. I tried renaming it, creating a new one (with the same code), running with IIS Express, IIS Local, as administrator, in Chrome, IE11, FF... I also disabled my antivirus. But I always get the same error.
Other clases in the project are running correct, for example a lot of webservices I've deployed under the same project.
The project is a classical web project developed under .NET 4.0 with VB.NET.
Are there any solutions to this specific problem?

Related

IIS Express not running in Visual Studio 2019

I am developing a chat application using ASP.NET Core MVC architecture.
Initially, the project worked well and could run on IIS Express. but later I found that now the IDE is not working; the project cannot run IIS Express.
I am getting the following error as an alert message as well as in the output console when trying to run my application from Visual Studio:
Error: The program '[18268] iisexpress.exe' has exited with code 0 (0x0).
Screenshot of the alert message in the IDE:
After a while, I restarted the project and when I run the project again, I got the following error again:
? Error: The program '[17512] iisexpress.exe' has exited with code 0 (0x0).
I am confused what is wrong with my project or IDE. Can somebody please help me to resolve this?
I checked Error running IIS-Express in Visual Studio and IIS express crashes after successfully debugged and build but they are very old posts and I could not find an answer to my problem.
Check your solution folder for a hidden ".vs" folder.
In Visual Studio, right click on the web project, chose properties and then navigated to the "web" tab. From there I changed the Project URL to another port number. For example, if it was http://localhost... - Changed it to http://localhost:43567.
If your machine is 64bit, please go to Tools-> options -> projects and solutions:

ASP.NET Core application doesn't work in IIS Express

I develop ASP.NET Core 2.0 application which works on full framework <TargetFramework>net461</TargetFramework>. Ususally to debug it I use IIS Express: just click green arrow in Visual Studio 2017. It worked OK. But today it stopped working properly. Application runs but all requests hang. No exceptions are thrown. In Windows Logs/Application I see this:
Application 'MACHINE/WEBROOT/APPHOST/MY.APP.HERE' with physical root 'C:\code\MY.APP.HERE\' failed to start process with commandline 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Username\AppData\Local\Temp\tmp35D5.tmp"', ErrorCode = '0x80004005 : 0.
Source of the message is IIS Express AspNetCore Module.
Any ideas what's the reason and how to fix it?
UPDATE: I see A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\code\PATH.TO.APP.HERE\bin\Debug\net461\win7-x64\publish\'. whily running dotnet MyApp.exe.
iisreset - try it one time - As it was working before , hope it works !

Migration of website VS2010 to VS2015 throwing error

Recently, I have moved/opened my VS2010 website(.net framework 3.5) to VS2015 website(.net framework 3.5).
When I run the website with default page, I'm getting error as:
"Server Error in '/' Application. The resource cannot be found."
But then again open the same project with VS2010 and run, it is opening the page without error.
As a next step, I try upgrading VS2015 website project framework 3.5 to 4.5.2 with some web.config changes. but the still issue remain same.
Help me on the above issue to run website on VS2015.

ASP.NET on mono: System.TypeLoadException

I would like to develop a website with ASP and run it on a Ubuntu or Debian server using Mono. To start I have created a very simple application with Visual Studio on Windows and want to deploy it to a Ubuntu box, just to see that it works. But so far it doesn't.
What I have done: I have created an ASP.NET (version 2) application with Visual Studio 2012 on Windows. Then I have published the project to my file system an copied it to the server. It runs Mono version 3.2.8. I have configured a vhost following this instruction: http://devblog.rayonnant.net/2012/11/mvc3-working-in-mono-ubuntu-1210.html.
However, if I open the browser and try to open the website, I get a System.TypeLoadException. It says:
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): <myprojectname>
Needless to say that this error does not occur in the debug environment.
I have been trying to fight this all day but I can't figure it out. Any help will be greatly appreciated.

"An operation is not legal in the current state" error when trying to launch ASP.NET project in VS2013?

I have an ASP.NET web site created with WebMatrix 3. I do have the option in VS2013 checked to use the 64-bit version of IIS Express since I am running on 64-bit Windows 8.1. When I try to launch the project I get the error "An operation is not legal in the current state". Does anybody know how to fix this?
I got this same error "An operation is not legal in the current state" when running a project on Google Chrome, Stopping the project then closing all chrome instances fixed the problem.
I think it's related to visual studio not being able to attach to chrome instance for debugging.
Closing Chrome and restarting IIS (e.g. in IIS Manager) should solve the issue. It helped in my case.
Just had the same issue on VS (Visual Studio) 2017 this morning.
The steps that will resolve this are:
Stop project that runs in VS
Clean all IIS instances that VS temporarily created
Compile project and start that service again

Resources