Windows Azure and GitHub: build error on web.config - asp.net

I've created a new ASP.NET MVC 4 project using the HotTowel SPA template. I haven't changed very much as you can see in my GitHub repository. I've set up Windows Azure to take in the changes and deploy to hourlee.azurewebsites.net, but nothing happened.
When I check my dashboard, it seems something went wrong. Windows Azure is complaining about an error in my Web.Release.config file.
More specifically, this is the error message:
D:\home\site\repository\Hourly\Web.Release.config(1,1): error : Data at the root level is invalid. Line 1, position 1. [D:\home\site\repository\Hourly\Hourly.csproj]
Failed exitCode=1, command="D:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\home\site\repository\Hourly\Hourly.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="C:\DWASFiles\Sites\hourlee\Temp\208c4975-46bc-4f4f-89d8-6ae54a5289d8";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="D:\home\site\repository\.\\"
An error has occurred during web site deployment.
It's repeated again (the entire message is longer).
I haven't changed anything in the web.config files and the whole thing builds and runs locally too.
I've noticed that it works when I remove the transform file (web.Debug.config and web.Release.config).

Related

ALINK : error AL1019: Metadata failure while creating assembly -- The file or directory is corrupted and unreadable

I have an asp.net webform project that build on system1 but not on system2 (they both are windows 10 and visual studio 2022 Version 17.4.3) and when I build visual studio show an error in error list window :
"Severity Code Description Project File Line Suppression State
Error Metadata failure while creating assembly -- The file or directory is corrupted and unreadable. Modabber D:\BehsamanCode\Modabber\Modabber.Web\ALINK"
Also it shows this error in the output window :
"ALINK : error AL1019: Metadata failure while creating assembly -- The file or directory is corrupted and unreadable"
I searched these errors and I enabled long path on windows10 and uncheck Sign the assembly but not work.
What should we do?
I don't know how but it resolved. I think system2 hard drive has a problem and after win10 repair it itself then restart windows the problem gone and project builded.

Error staging application: App staging failed in the buildpack compile phase in HWC Buildpack

I am trying to deploy my application built in ASP.Net 4.6.1. So I am using HWC Buildpack.
Below is my manifest.yml
---
applications:
- name: DRSN
random-route: true
memory: 128M
buildpack:
https://github.com/cloudfoundry/hwc-buildpack.git
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
The error that I am receiving is below.
Waiting for API to complete processing files...
Staging app and tracing logs...
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 creating container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 successfully created container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Downloading app package...
Downloading build artifacts cache...
Downloaded build artifacts cache (231B)
Downloaded app package (19.5M)
Failed to compile droplet: Failed to compile droplet: fork/exec /tmp/buildpackdownloads/6c6dca8d638ac0d145d6581f9eb9a96a/bin/compile: permission denied
Exit status 223
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 stopping instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 destroying container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Error staging application: App staging failed in the buildpack compile phase
Can anyone help me resolve this issue? Am I not correct in my manifest.yml? Or is it something else?
I believe that the problem is that you're telling the system to use the HWC buildpack, but at the same time you're not setting the Windows stack (at least based on what info I can see). That means it's going to default to the Linux stack, which I believe is why you're seeing the fork/exec /tmp/buildpackdownloads/... error.
Try adding stack: windows to your manifest.yml or -s windows to your cf push command (for future reference, when you need help always include the full cf push command you're running).
PS: you shouldn't use https://github.com/cloudfoundry/hwc-buildpack.git that is telling the system to grab the master branch in whatever state it's currently in. That's a.) not reproducible and b.) not guaranteed to be in a working state. You should either use the platform provided buildpack names (from cf buildpacks) or append #<branch_or_tag> to the end of the URL so it picks a specific branch. All CF Buildpacks have tags for each release. It's strongly recommended you use a tagged release.

ASP.NET MVC application in VS 2019 parser error in Global.asax.cs

Source Error:
Parser Error Message: Could not load type 'MyProject.MvcApplication'.
Line 1: <%# Application Codebehind="Global.asax.cs"
Inherits="MyProject.MvcApplication" Language="C#" %>
I have implemented all solution provided on below links and many more, but I'm not able to fix this issue. Is this related to the IDE? If so, I will open this app in something other than VS2019, then this issue would not occur.
IIs Error: Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication”
https://social.msdn.microsoft.com/Forums/windows/en-US/7ad2acb0-42ca-4ee8-9161-681689b60dda/bin-folder-location-causes-quotparser-error-message-could-not-load-typequot-problem?forum=winformssetup
https://www.c-sharpcorner.com/forums/i-am-facing-problem-during-build-my-asp-net-mvc-application
To resolve the issue you could try below workaround:
1)Delete all files from the bin folder of the project. Right-click on the project and click clean and build.
2)Check your global.asax and global.asax.cs are correctly formated.
3)try to remove the site from the iis and recreate it by your self.
If the above way is not working then I suggested you to restart the application OR remove the temporary files in the computer by Run command temp and %temp% OR include the obj folder in to the project and rebuild and run.
Refer this below link for more detail:
"Parser Error Message: Could not load type" in Global.asax
Parser Error Message: Could not load type 'TestMvcApplication.MvcApplication'

ASP.NET 5 Error: the verb must be specified by using the -verb argument. Error count=1

I am pretty new to the .net and I had this error while trying to publish my website to file system.
Error: A '-dest' argument must be specified with the 'sync' verb. This error is shown when I try to publish in the default detination
Copying to output path C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking103
Multiple commands defined. Defaulting to web.
Using command 'web' as the entry point for web.config.
Time elapsed 00:02:45.9471627
Publishing with publish method [FileSystem]
Publishing files to C:\Users\Iulica'sPc\Documents\Visual Studio 2015\Projects\GpsTracking\artifacts\bin\GpsTracking\Release\PublishOutput
Executing command ["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:contentPath='C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking103\' -dest:contentPath='C:\Users\Iulica'sPc\Documents\Visual Studio 2015\Projects\GpsTracking\artifacts\bin\GpsTracking\Release\PublishOutput' -verb:sync -enableRule:DoNotDeleteRule -retryAttempts:2 -disablerule:BackupRule]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error: A '-dest' argument must be specified with the 'sync' verb.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5): Error : Error count: 1.
I have searched for hours for an answer but nothing solved my problem.
Please help!
I think it's because there is an ' in your path name (or your username actually):
["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:contentPath='C:\Users\Iulica'sPc\AppData\Local\Temp\PublishTemp\GpsTracking103\' -dest:contentPath='C:\Users\Iulica'sPc\Documents\Visual Studio 2015\Projects\GpsTracking\artifacts\bin\GpsTracking\Release\PublishOutput' -verb:sync -enableRule:DoNotDeleteRule -retryAttempts:2 -disablerule:BackupRule]
Try deploying to a different folder like c:\projects\ ad also the source path could be the issue.
Check the Important things to remember here: https://technet.microsoft.com/en-us/library/dd569005(v=ws.10).aspx
In order for the sync operation to function correctly, the Msdeploy.exe.configsettings file must be the same on the source and destination computers. If you add any rules or custom providers to the Msdeploy.exe.configsettings file, make sure that this configuration file is identical on the source and the destination computers before you perform a synchronization.

Compiler Error Message: CS0009 - mscorlib.dll

When I try to run my web application, the following error occurs:
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: CS0009: Metadata file
'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' could not
be opened -- 'File is corrupt.'
It seems to me that the .NET framework 4 installation is corrupt, but I am using Windows 8.1, and I'm not sure how to repair this, as it is integrated into the Windows installation.
I manually copied the corrupted file from a different computer with the same Windows installation. It took some permission changing, but I managed to do it.

Resources