Asp .Net Core DirectoryNotFound Exception - exception

I need help, I was trying to publish my application to production in windows server and i it gave me this error
An error occurred while starting the application.
I runt dotnet command on windows server to check what was the error and this appeared on command line
Unhandled Exception: System.IO.DirectoryNotFoundException:
C:\inetpub\wwwroot\NoPaper_new\wwwroot\files\ at
Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String
root, ExclusionFilters filters) at
NoPaper.Startup.ConfigureServices(IServiceCollection services) in
C:\Users\A0H79224\source\repos\NoPaper\NoPaper\S tartup.cs:line 53
--- End of stack trace from previous location where exception was thrown --- at
Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection
services) at
Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize() at
Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at
NoPaper.Program.Main(String[] args) in
C:\Users\A0H79224\source\repos\NoPaper\NoPaper\Program.cs:line 11
basically I have a folder in wwwroot called files which has 3 subfolders where it is possible to upload files to but they are empty.
So i checked the folder in IIS and on wwwroot the files folder doesn't exist.
Why was it not published? How can i solve this problem?

Related

Getting an error Unable to locate appender "jmeter-log" for logger config "root" while running and creating the html dashboard for my jmeter scripts

I am trying to create Jmeter HTML report through CSV with the help of command but getting below error in my CMD. Please help me what i need to change or enhance for getting the reults
2020-07-23 16:47:20,385 main ERROR Null object returned for File in Appenders.
2020-07-23 16:47:20,409 main ERROR Unable to locate appender "jmeter-log" for logger config "root"
An error occurred: Cannot read test results file : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
errorlevel=1
Press any key to continue . . .
The main problem is Cannot read test results file and it occurs when you point JMeter to not-existing file or the file cannot be read (you don't have permissions to open the file in that location)
The other problem is with JMeter logging configuration, either your log4j2.xml file is broken or again you don't have proper read/write permissions to the folder where JMeter is installed. Try running the terminal with elevated rights and both should go away
I solved this problem by installing the latest version of Jmeter, 5.3. After that, no more logging/summarizer errors.

Error when trying to Scaffold a model

I'm building a Razor Page app using ASP.NET 2017. When I run the command
dotnet aspnet-codegenerator razorpage -m Activity -dc CongContext -udl -outDir Page\Activities --referenceScriptLibraries
This error appears:
Could not load file or assembly 'Microsoft.EntityFrameworkCore,
Version=2.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I stopped and restarted VS, I've also cleaned and build the solution. Attached jpg shows the code I typed and the results
This is because of different versions of packages. Check the 'Dependencies' node of your project. The Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Design must have same 2.0.3 versions.
If not, delete and re-add them from [Tools] menu > [Nuget Package Manager]. Also delete the Migrations folder and repeat instructions as listed here. For more info, you may take a look at this comment

Server Object Creation Error

I am unable to run a particular ASP page in my website. It is throwing the below error.
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/includes/conferenceRoom/init.asp, line 13
800401f3.
However my page is running well in Prod server but it is throwing error in my dev derver. I am unable to find the root cause for this error.
The line 13 is to create obj for my calender app in ASP:
set objCal= server.CreateObject("bsCal.cDate")
Any one please help me to resolve this error.
Make sure the COM object (i.e. bsCal.cDate) is registered. Find its DLL and register it using regsvr32
Assuming you copied your dll to the folder d:\objects.
In a command prompt type:
regsvr32 d:\objects\YourDll.dll

Error while configuring build server on windows server 2012

I'm trying to create build definitions for a project. TFS and build server machines are the same.
When I create the build definition using Default Template (Tfvc Template.12.xaml ), it gives the following error:
Exception Message: The path '$/Scrumproject/Scrumproject/Scrumproject.sln' could not be converted to a local path. Make sure this path is relative to the 'src' folder on the build machine or specify a full server path. (type ArgumentException)
Exception Stack Trace: at Microsoft.TeamFoundation.Build.Activities.Core.LocalPathProvider.GetLocalPath(String incomingPath)
at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
When I use the Upgrade template it gives the following error:
Exception Message: TF42006: The build service could not get the project file for build definition Newdefinition. Ensure the project file exists and the build service account NT AUTHORITY\NETWORK SERVICE is a member of the Build Services group for the team project. (type InvalidBuildTypeException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Can anyone help configure the build server correctly?
The first error could be due to an incorrect mapping: is $/Scrumproject/Scrumproject/ folder mapped in the build workspace?

Google drive Dredit sample app for dotnet

I was following exact the same steps as described in this article to test the dotnet app.
https://developers.google.com/drive/examples/dotnet
My env is visual studio 2010 and IIS 7
Everything was fine. The app deployment was successful and I could see the login screen and the "allow access" dialog. However once I granted access, I saw the following error.
Can anyone help?
Thanks,
Qiang
Server Error in '/' Application.
Failed to find or load the registered .Net Framework Data Provider.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
Source Error:
Line 82: {
Line 83: StoredCredentialsDBContext db = new StoredCredentialsDBContext();
Line 84: StoredCredentials sc = db.StoredCredentialSet.FirstOrDefault(x => x.UserId == userId);
Line 85: if (sc != null)
Line 86: {
Source File: C:\Qiang\DrEdit\Models\Utils.cs Line: 84
You have to install Microsoft SQL Server Compact 4.0, which is used by the Entity Framework to map model classes into database entities.