I made minor changes in my project using asp.net and published in VS2019. I received the following error
4/3/2019 11:52:21 AM
System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.WebTools.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__3()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__183.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---
I reopened the project in VS2017 and it published with no problem.
publishing with vs2019
How can i clear files that I have published to an App Service on Azure ?
Hi ,
I successfully publish a project via Visual Studio to Azure and all runs.
If i need to publish an entirely new project to that App Service, I have to first go into Azure and delete all files except the "hostingstart.html" file under the WWWROOT branch.
Is there an easier way to do this instead of individually going and deleting one file and directory at a a time. ?
Thanks
class file directory issues on hosting via IIS
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="AdminMaster.master.cs" Inherits="Project.content.AdminMaster" %></div> <div>The Inherits attribute contains the class for the page. But the class file is already compiled with </div> <div>
namespace Project.contentWhen I host the web app via IIS my current directory structure is ::</div> <div>
C:\inetpub\wwwroot\Project\content</div> <div>When I try to browse aspx pages I am getting error as ::</div> <div>
Parser Error Message: Could not load type 'Project.content.AdminMaster'.</div> <div>How could I resolve this problem ?</div>
place the compiled web app project in one common directory inside wwwroot folder
I don't know if you guys have face the same problem as mine. When I place my compiled web app inside wwwroot
, everything works fine. Suppose my compiled web app has directories bin, view (contains aspx pages and
master page file) then web config and packages.config files
.
Now if I place these files and folders just inside my wwwroot
directory
C:\inetpub\wwwrooteverything
works fine. I can browse my web application.
But when I put these files and folders inside one common directory say Project
such that now the file path become
C:\inetpub\wwwroot\Project
Now I get issues like
Parser Error Message: Could not load type 'Project.view.AdminMaster'
Why is it so ?
Bundling and Minification not working when i deploy to Azure
Hi ,
I have deployed a web project which uses Bundling and Minification to Azure , but it seems that the files , both .css and .js files are not loading correctly.
Is there a known issue with this ?
Thanks
Robby
json file editable after build
I am deploying an IIS asp.net core 2.2 website and I am having issues with how to store a JSON object.
I the moment I have a file called objects.json which is read using StreamReader. The problem is that when I build the project, the JSON file is combined with the rest and I can't edit it without rebuilding and redeploying the website.
What is the best way of doing this?
I have some environment variables, but I don't think that would be suitable for large json objects
How to prevent web.config inheritance for SMTP settings
Hello,
I have a child .net 4 web application which is trying
to inherit the parent .net 2 web.config file. That's caused some issues, but I've seemed to have resolved most with <clear/>. However, in the parent web.config I have some encrypted sections, one of those being the system.net/mailsettings/smtp section. The
child application is trying to inherit this but is getting the error "Configuration Section encryption is not supported". I can't seem to use <clear> or any other method to prevent inheritance from occurring in this situation.
The .Net 2 parent application is in the process of being replaced
(as is the web server), but that is still a number of months away. Moving to a subdomain isn't an option as using SSL certificates on multiple sub domains doesn't seem to work in IIS7.5
Any ideas on how I can resolve this issue?
Server Configuration for Live Video Streaming in website
Hello,
I need your help to find suitable server configuration details for one of my asp.net web application.
I am developing a system in C# to stream live video broadcast, I need to know the correct server config to host the same where I can have 1 to 10 Lakh concurrent users without any issue.
Also it will be helpful if you can provide approx pricing for the same.
Please advice if I am missing anything.
Thanks a lot !!
an exception was set up by the type initialiser for 'Microsoft.Web.DeploymentManager'. An exception was set up by the type initialiser for 'Microsoft.Web.Deployment.BuiltIntypesCashe'
I worked on an asp .Net mvc application. Now the client wants the application to be deployed in local IIS (IIS on sql server 2014). I read on the net how to publish an application on a local server. The problem is that, after the publication steps, I have
to create a new profile. I filled in the following information:
Publishing method (Web Deploy).
Server (localhost).
The Site Name (application name).
Destination URL (http: // localhost / mysite).
When I validate the connection the error below appears:
an exception was set up by the type initialize for 'Microsoft.Web.DeploymentManager'. An exception was set up by the type initialize for 'Microsoft.Web.Deployment.BuiltIntypesCashe'
So how should I proceed?
Note: This text was translated by Google Translate. Please try to understand the meaning
How to exclude from VS2017 web publish specific folders?
Hello,
In my specific - weird - use case I have some static files on my backend project wwwroot/images subfolder.
Whenever I web publish I want to ignore my local wwwroot/images folder and avoiddeleting/overwriting the existing folder on the web server.
Basically, I want the images to stay on the server and avoid storing them locally. What's the easiest way to accomplish this?
Prompt for Windows Authentication When /Pages/CRUDFolder is accessed
Hello asp.net world. I got into the programming game recently. In an attempt to build my skills I built an application for my work . I am using RazorPages. The main page is a form for users to rent laptops and other devices. I have now added a SQL database to contain information on the devices the users can rent as well as other CYOD type info. I want to use Windows Authentication as this is a simple intranet application.
http://localhost.com/DB/ <-- I want the windows authentication prompt to happen when browsing this directory.
I have tried editing the applicaitonHost.config and web.config file to enable authentication whenever someone browses to the CRUD directory. I am pretty confident I am failing at this because I am defining the folder name "DB" in the applicaitonHost.config
file. In the application directory above wwwroot there is no such thing as this folder just as there is no such thing as the cshtml files. They get compiled and put into dlls.
Is there a way I can set this up through the appsetttings.json file or does anyone know of a way to better accomplish this goal. Any help is appreciated.
Developing in Rider 2019.1 EAP
I have developed most of my project in Visual Studio 2019, however as I prefer the other JetBrains IDE's I wanted to move my asp.net core 2.2 project to Rider.
web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44307" />
<environmentVariable name="COMPLUS_ForceENC" value="1" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
lauchsettings.json:
{
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iis": {
"applicationUrl": "https://localhost",
"sslPort": 0
},
"iisExpress": {
"applicationUrl": "http://localhost:50133",
"sslPort": 44307
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
However when running with the IIS Express config in Rider I get an error complaining about the line:
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
So I commented it for now (it still runs fine in VS 2019).
I am now getting:
HTTP Error 500.0 - ANCM In-Process Handler Load Failure
Event Log:
Application 'C:\Project\Project' wasn't able to start. Application .dll was not found at C:\Program Files\JetBrains\JetBrains Rider 191.6733.764\lib\ReSharperHost\JetBrains.IisExpress.Worker.dll
Does anyone know what could be wrong? The target framework etc looks correct
I created a new project in Rider and it works fine.
Debug and Release, Deploy-Options
Hi all,
I don't know exactly if this thread is correct in here but I'll give it a try.
In Visual Studio 2019 there's this dropdown box with Debug or Release below the menubar.
I've developed an Asp.Net core webpage and want to WebDeploy it to my Release server just for testing.
The webapplication is using the appsettings.json and appsettings.Development.json where different connectionstrings were set.
One for my development db, the other for the release-server.
Typically my ef-migrations were done in the development environment and I was assuming that changing the dropdown to "Release" EF would detect that the release-db is not existing.
Running Update-Database from the Package-Manger Console then says that the db is already uptodate.
So when the deployment ist done (which went without errors - application runs) how do I get the database to the server?
Thanks for your help.
Web APP Publish error
Hello,
I am publishing a web app in VS2019, but I am getting the error:
Unrecognized attribute targetFramework.
I have windows 10 with .netframework 4.7 and VS2019.
My project is pointing to .netframework 4.5.
Do you think I need to install framework 4.5 if I already have 4.7?
Generate code metrics data shows blank
Hi All,
I am using Visual Studio 2017.
When I try to generate code metrics by using this command. Analyze > Calculate Code Metrics > For Solution
It actually show succeed in last when all rebuild is finishes.
but in code metrics Result it shows blank. Why?
Am I missing any configuration setting?
Deploy an Asp MVC Framework 4.7.2 application on IIS windows server 2008 R2
Hi,
First of all I want to know how is it possible to deploy on IIS windows server 2008 r2 an asp.net mvc application based on the framework 4.7.2.
We want to deploy our asp.net mvc web application locally on windows server 2018 r2. the problem is that the application works well under windows 2012 r2. But does not work under windows 2008 r2, Displays the error below. We did all the configuration on IIS.
We think that the version of the .net framework under windows 2008 is 2.0.50727. So if this is the problem, how can we update this framework .net version ?
Error that appears on the browser:
Server error in the '/ SGAlerte' application.Description: An error occurred while processing a configuration file required to respond to this request. Please see the error details below and edit your configuration file appropriately.Parser Error Message: Unrecognized 'targetFramework' attribute. Note that attribute names are case sensitive.
Source error:
Line 29: <forms loginUrl = "~ / Account / Login" />
Line 30: </ authentication> ->
Line 31: <targetFramework = "4.7.2" compilation />
Line 32: <httpRuntime targetFramework = "4.7.2" />
Line 33: <customErrors mode = "Off"> </ customErrors> Source file: C: \ inetpub \ wwwroot \ SGAlerte \ web.config Line: 31
-------------------------------------------------- ------------------------------
Version Information: Microsoft .NET Framework Version: 2.0.50727.5420; ASP.NET Version: 2.0.50727.5420
Go figure!!!
Hang Requests in AcquireReqestState in Session module after server move
Website hangs many time a day and requires pool recycle.
We are experiencing this after recent server move.
I have tried reinstalling IIS and played with almost all the settings.
I am the server guy , What Can I do to troubleshoot this ?
REQUEST "6600000080001fd7" (url:GET /this.aspx, time:187821 msec, client:x.x.x.x, stage:AcquireRequestState, module:Session) REQUEST "81000000800034da" (url:POST /that.aspx, time:8171709 msec, client:x.x.x.x, stage:AcquireRequestState, module:Session)
Can't run published ASP.NET framework web app won't run
When I browse app I get: error is HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory."
But when I open IIS Manager to adjust the web site, there is no web site shown.
When I did IIS Manager's "Connect to server" for local host, I get "Could not connect to the specified computer. Details: Unable to connect to the remote server"
The IIS Manager window, under Connections on the left only has "Start page" and nothing else...no "Sites", "Default Web Site", nothing else.
Using Windows Server 2019 IIS on AWS EC2 virtual.
Visual Studio 2019 Pro
Scheduled Tasks In Plesk
Hi,
I want Insert a record every minute in specified Table, but
how to set sql command for scheduled tasks in plesk ?