asp.net Attempting to create publish settings in vs 2012 gives strange error - asp.net

I recently updated my asp.net 3.5 web project from Visual Studio 2010 to Visual Studio 2012. Every time I try to create publish settings it says the following:
{There are errors in web.config. Please correct these errors and try again.
The first error is: "Web.config appears to be in invalid state. Please correct it and try again."}
I have been unable to determine what this means. I have no errors in my web.config that it is telling me about. I have search for this error and have come up with nothing.
Can someone please help me out?
I should also mention this entire project resides on a mapped drive. I am still able to open the project and publish it in Visual Studio 2010 but can't even create the publish settings in Visual Studio 2012.

I think the below steps would help you out.
Before performing publish make sure the project is changed to Release mode.
Do not perform publish as a website. Try and publish your website to a file system.
create a virtual directory and point that virtual directory to the published folder.
The above mentioned steps worked for me.

Related

Visual Studio 2017 crash when publishing web application

After updating my Visual studio to version 15.8.1 it has started to crash every time I try to publish a web application.
I try to use web deploy and fileSystem options, both crash. Changing the settings like unchecking delete unused files as no effect. Giving full permissions to the destination folder has no effect either.
Recreating the publish profile solved the issue. Something must have changed for pubxml file.

ASP.Net Core 2 - IIS 502.5 Error

I am creating an ASP .Net Core (2.0) MVC application within Visual Studio 2017 which was working absolutely fine.
After turning off my computer yesterday and coming back to my application today, I now receive this browser error when I start the application in chrome without debugging.
Running dotnet run within the directory of the application, I can access the site just fine. It is just when I run it via Visual Studio/IIS Express I get this error.
HTTP Error 502.5 - Process Failure
The application builds and compiles just fine. I have also cleaned the solution.
Looking in the event logs I find:
Application 'MACHINE/WEBROOT/APPHOST/MYAPP' with
physical root 'C:\Users\Ben Hawkins\Desktop\Development Folder
\Dev\Website\Version_2\MYAPP\MYAPP\'
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\Ben
Hawkins\AppData\Local\Temp\tmp3547.tmp"', ErrorCode = '0x80004005 :
0.
Within my output window in Visual Studio 2017 I recieve this message under
ASP NET CORE WebServer
Failed to initialize CoreCLR, HRESULT: 0x80131534
What I have tried:
Cleaning the solution, rebuilding etc
Restarting the computer
Trying to launch another application. (Same result)
Created a new application from scratch. Same result.
Repairing Visual Studio Community 2017. Same result.
Stopping/Closing IIS Express
My setup was working perfectly yesterday and suddenly is not.
Thank you for your time. I hope we can find a solution.
We finally found the issue! After logging on to the machine as a different user, we saw a warning that the main user had ignored initially. There was a 0 byte file in the root of the directory named "Program" with no file extension. It appears that this causes some sort of issue when VSIISExeLauncher.exe is invoked through Visual Studio. (Note it would work if executed from the command prompt). After deleting the file, everything worked!
We do not know how this file was placed there for certain, but suspect it was some sort of copy error when the user was pulling in files from his old hard drive.
I don't know if anyone else will come across this, but if so hopefully this helps!
Maybe you need install previous versions of .NET Core, isn't it? I installed here and it works now. I had only .NET Core 2.0 installed and I realized that applications with 1.1 stopped so when running. In Windows' event logs I've had the same error registered.
Try to change the IISExpress to IIS by creating new IIS profile and change the Lunch to IIS. It resolved my problem.
I have hit a very similar issue with ASP.net Core 2.0. I had copied my VS project to a new one, and I was getting this error message.
After doing some research, I was able to determine that the nlog.config file was not copied into the bin > Debug > net461 folder. Once I did this, I was able to run my application.
I found it by running dotnet run from the command line on my project where the csproj files live.
Had same issue yesterday (windows 10).
Solved it this way:
Update Microsoft.AspNetCore to latest (Nuget manager - 2.1.3)
Make sure the sdk also updated to latest version. if not, update it manually from Nuget console like this:
Install-Package Microsoft.NETCore.App -Version 2.1.3
Download and install latest ASP.NET Core/.NET Core: Runtime & Hosting Bundle
from here
Same problem with version 2.2. Reinstalling .NET Core SDK fixed the problem for us.
In my case, my project was setup as a website in IIS and the file "bin\IISSupport\VSIISExeLauncher.exe" was missing in the project's directory.
I simply selected "IIS" when debugging the project in Visual Studio 2019 and it generated the missing file. It also generated 2 text files (IISExeLauncherArgs.txt, pidfile.txt) in the IISSupport folder, made changes to my web.config file, and my project ran successfully.
After that I was able to access the local website that was setup in IIS without running it in Visual Studio.

Build and publish web site project with VS 2012 and TFS 2010

I am using VS 2012 and TFS 2010. I am trying to build a website project (NOT a web application project) and deploy it to a test web server.
When files get checked in, I want TFS to build the website and push it over to a test server (uncompiled).
I have found many posts indicating that I should use a web deployment project, but that doesn't seem to be an option for VS 2012. I also found that VS 2012 is supposed to have better support for website project deployment (.pubxml) which I can get to work great from inside Visual Studio, but the TFS 2010 build wants a project or solution file.
I am new to TFS so I may be missing something obvious here.
Solution from the OP:
I figured out my issue. There was a file create called website.publishproj that I needed to put into source control before turning on gated check-ins. I could then use that file for "Items to build". TFS is at least now attempting to build the website. It looks like I have some more configuration issues to get through.

Visual Studio 2012 Error

I use Visual Studio 2012 on a Windows 8 PC. I had no problems when installing VS2012.
When I'm working on a ASP.NET c# project I usually use the option "See in the explorer" instead debug the project. This gives me the ability to change code behind.
Sometimes after build and press F5 to reload the page I get some errors. This doesn't happend always, but very often.
The errors are: CS2021, CVT1100, CS1566...
"Can't find file 'C:\Users\UserName\AppData\Local\Temp\Temporary ASP.NET Files\root\617be439\61539075\App_GlobalResources.iuxkzxdi.0.cs'"
Always the "C:\Users\UserName\AppData\Local\Temp\Temporary ASP.NET Files\root" is the problem. Sometimes it says can't find file others it says access denied.
Visual Studio works but is horrible to keep pressing F5 until the error goes away.
Can anyone help me?
Run VS2012 as Administrator. Local account by default have restriction accessing the build/temporary locations and will throw such errors. You'll have similar problems when trying to publish websites.
Therefore, It is easier to set VS 2012 once, and check the box in properties to "Run program as administrator" to allow it run always as "Administrator".

Problems with 'Publish Web Site' on Visual Studio 2010

Recently I've upgraded from Visual Studio 2008 to Visual Studio 2010, however I'm having various problems when uploading my compiled web site to the live area. I'm doing exactly the same as I would have done with Visual Studio 2008, however, now I receive errors such as:
{filename}.aspx is not a pre-compiled file
masterpage.master does not exist
All these errors don't make sense. Has anyone encountered these problems before, and was a solution ever found?
Try run the Clean Solution command from the Build menu on your solution.
Try diagnosing by publishing to a brand new IIS location. Perhaps there are files from your VS2008 build that aren't being overwritten by your VS2010 build.
Are all the files present in the bin directory as you'd expect?
Is there an PrecompiledAppConfig.config file in the root?
You can run the Clean command by selecting Build -> Batch Build. You will see the options Build, Rebuild, and Clean in the dialog box.
The web site does not have to be created in IIS in order to use the Batch Build dialog.
Hope this helps,
Rick
you probably have not created an application or virtual directory on your server.
use IIS Manager to create it

Resources