Razor Host installation error in dotnetnuke - dotnetnuke

I upgraded my IIS to .NET v4.0 successfully but on installing Razor Host, It shows the error like
*Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Access to the path 'C:\inetpub\wwwroot\dotnetnuke\Install\Temp\ajynte0h' is denied. ---> System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\dotnetnuke\Install\Temp\ajynte0h' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj) at System.IO.DirectoryInfo.Create() at DotNetNuke.Services.Installer.Util.WriteStream(Stream sourceStream, String destFileName) at DotNetNuke.Services.Installer.InstallFile.ReadZip(ZipInputStream unzip, ZipEntry entry) at DotNetNuke.Services.Installer.InstallerInfo.ReadZipStream(Stream inputStream, Boolean isEmbeddedZip) at DotNetNuke.Services.Installer.InstallerInfo..ctor(Stream inputStream, String sitePath) at DotNetNuke.Services.Installer.Installer..ctor(Stream inputStream, String physicalSitePath, Boolean loadManifest, Boolean deleteTemp) at DotNetNuke.Modules.Admin.Extensions.Install.LoadPackage(String package) at DotNetNuke.Modules.Admin.Extensions.Install.Initialize() at DotNetNuke.Modules.A*dmin.Extensions.Install.OnLoad(EventArgs e) --- End of inner exception stack trace ---
help me to solve this error?????

How did you udpgrade to 4.0? Did you change the app pool? or did you change the framework for the app pool, and kept the identity the same? If the first: Have you checked that you app identity has sufficient rights on the application?
If the second: Try to re-install the razor module.

Related

Error Loading Self Signed Certificate on Azure App Service with linux container with IdentityServer 4 AddSigningCredential

I have my asp.net core 3.1 app configured to use identity server 4. Everything works fine in my local machine and in my local IIS. If I publish to Azure App Service, the certificate loading fails with the below error:
2020-04-05T02:01:46.200965138Z Documentation: http://aka.ms/webapp-linux
2020-04-05T02:01:46.200972938Z Dotnet quickstart: https://aka.ms/dotnet-qs
2020-04-05T02:01:46.200980839Z ASP .NETCore Version: 3.1.0
2020-04-05T02:01:46.200988739Z Note: Any data outside '/home' is not persisted
2020-04-05T02:01:46.624585930Z Running oryx -appPath /home/site/wwwroot -output /opt/startup/startup.sh -defaultAppFilePath /defaulthome/hostingstart/hostingstart.dll -bindPort 8080 -userStartupCommand ''
2020-04-05T02:01:46.758919856Z Oryx Version: 0.2.20200114.13, Commit: 204922f30f8e8d41f5241b8c218425ef89106d1d, ReleaseTagName: 20200114.13
2020-04-05T02:01:46.769077531Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2020-04-05T02:01:46.770324503Z Could not find operation ID in manifest. Generating an operation id...
2020-04-05T02:01:46.771110686Z Build Operation ID: 2c1fda2a-9303-49d7-8d96-2fd6b961de83
2020-04-05T02:01:48.583605155Z Writing output script to '/opt/startup/startup.sh'
2020-04-05T02:01:48.934026596Z Trying to find the startup DLL name...
2020-04-05T02:01:48.934770080Z Found the startup D name: IDP.dll
2020-04-05T02:01:48.935266269Z Running the command: dotnet "IDP.dll"
2020-04-05T02:01:50.341053110Z [02:01:50 Information]
2020-04-05T02:01:50.341106512Z Starting host...
2020-04-05T02:01:50.341118212Z
2020-04-05T02:01:52.133020171Z [02:01:52 Fatal]
2020-04-05T02:01:52.133081573Z Host terminated unexpectedly.
2020-04-05T02:01:52.133093173Z Interop+Crypto+OpenSslCryptographicException: error:2006D002:BIO routines:BIO_new_file:system lib
2020-04-05T02:01:52.133102374Z at Interop.Crypto.CheckValidOpenSslHandle(SafeHandle handle)
2020-04-05T02:01:52.134995630Z at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromFile(String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
2020-04-05T02:01:52.135015331Z at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
2020-04-05T02:01:52.135025731Z at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password)
2020-04-05T02:01:52.135048232Z at IDP.Startup.ConfigureServices(IServiceCollection services) in C:\Users\xxxx\IDP\Startup.cs:line 47
2020-04-05T02:01:52.135072332Z at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
2020-04-05T02:01:52.140072381Z at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2020-04-05T02:01:52.140095582Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
2020-04-05T02:01:52.140545195Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
2020-04-05T02:01:52.140562795Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
2020-04-05T02:01:52.140572496Z at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
2020-04-05T02:01:52.140919606Z at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
2020-04-05T02:01:52.140980508Z at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
2020-04-05T02:01:52.141103111Z at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
2020-04-05T02:01:52.141119512Z at Microsoft.Extensions.Hosting.HostBuilder.Build()
2020-04-05T02:01:52.141498823Z at IDP.Program.Main(String[] args) in C:\Users\xxxx\IDP\Program.cs:line 37
2020-04-05T02:01:52.141564625Z
2020-04-05 02:01:53.668 ERROR - Container xxxxidp_0_bb9e5be5 for site xxxxidp has exited, failing site start
2020-04-05 02:01:53.676 ERROR - Container xxxxidp_0_bb9e5be5 didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2020-04-05 02:01:53.693 INFO - Stoping site xxxxidp because it failed during startup.
Status_WatchFile :: Error Error: ENOENT: no such file or directory, open '/appsvctmp/status.txt'
Here is my configure services in startup:
builder.AddSigningCredential(new X509Certificate2($"{Environment.ContentRootPath}\\Certificate\\my certificate.pfx", Configuration.GetValue<string>("CertificatePassword")));
Here is my certificate in my project folder structure,
Please assist if I'm doing something wrong. Trying for more than a day and not able to figure where I'm going wrong.
After almost weeks and analyzing all possibilities, I figured out where I went wrong. It is the \ that is causing trouble. I have certificate added in my application. The below line works with windows machine,
builder.AddSigningCredential(new X509Certificate2($"{Environment.ContentRootPath}\\Certificate\\my certificate.pfx", Configuration.GetValue<string>("CertificatePassword")));
However I understood that \ doesn't work in linux when it comes to path. So I replaced the \ to forward slash / and it worked in both windows and linux.
builder.AddSigningCredential(new X509Certificate2($"{Environment.ContentRootPath}/Certificate/my certificate.pfx", Configuration.GetValue<string>("CertificatePassword")));
Hope this really helps some one.

DI exception for IndentityServer4 after install core 2.1 SDK

I'm getting the following exception when trying to run a project produced with the is4admin dotnet new command.
System.InvalidOperationException: Cannot resolve scoped service
'IdentityExpress.Manager.BusinessLogic.Interfaces.Services.ILicenseService'
from root provider. at
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteValidator.ValidateResolution(Type
serviceType, ServiceProvider serviceProvider)
Is there anything I can do to fix this?
That is a problem not with identity server but with the AdminUI https://www.identityserver.com/products/ Likely their code needs to be updated, you can contact support and let them know.

Postgres entity framework 6 code first issue

Ok, here are the exact steps I followed:
Installed postgres 9.3 locally, created database 'testdb', added login role with uname/pass test
Installed Setup_Npgsql-2.2.3.0-r2-net45.exe from here
Created a new class library (PGTest) in vs 2012, installed "npgsql for entity framework" from nuget package manager
Modified app.config to match this
Added Models folder, added two files: DataContext.cs and Region.cs
In package manager console ran "enable-migrations", "add-migration Initial", "update-database -script"
Got the following error
PM> update-database -script
Applying explicit migrations: [201501282207413_Initial].
Applying explicit migration: 201501282207413_Initial.
System.Runtime.InteropServices.COMException (0x8004000C): User canceled out of save dialog (Exception from HRESULT: 0x8004000C (OLE_E_PROMPTSAVECANCELLED))
Server stack trace:
at EnvDTE.ItemOperations.OpenFile(String FileName, String ViewKind)
at System.Data.Entity.Migrations.Utilities.DomainDispatcher.OpenFile(String fileName)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.Data.Entity.Migrations.Utilities.DomainDispatcher.OpenFile(String fileName)
at System.Data.Entity.Migrations.Extensions.ProjectExtensions.NewSqlFile(Project project, String contents)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
User canceled out of save dialog (Exception from HRESULT: 0x8004000C (OLE_E_PROMPTSAVECANCELLED))
In visual studio, going to SQL menu, Transact-SQL Editor, New Query... It gives you a dialog about the tools not working with the server installed. Installing SQL Server Data Tools - December 2012 update (http://msdn.microsoft.com/en-us/jj650015) fixed the problem.
The dialog should provide you a link to the SQL Server Data Tools.

TFSBuild / Release Manager: The directory name is invalid

I have a continuous integration build that used to run fine, but began giving me the following exception:
This exception is from the build agent,
Process each ConfigurationsToRelease
Release the build
Run the Release Management build Process for the current configuration:
Exception:
Exception Message: The directory name is invalid (type Win32Exception)
Exception Stack Trace:
Server stack trace:
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.ProcessWrapper.Start()
at Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.InvokeProcessInternal.RunCommand (AsyncState state)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[]
args, Object server, Object[]& outArgs
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg,
IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Func`2.EndInvoke(IAsyncResult result)
at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution
(AsyncCodeActivityContext context, IAsyncResult result)
at
System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
This is using the default build template and it seemed to have started randomly. The release never actually hits the Release Management and never throws an exception or Roll Back there. It seems to die as it should be hitting Release Management.
I've checked the drop folder and everything is there as it should be. Permissions are still correct. I don't know what folder it's looking for.
Has anyone had any experience with this or any ideas of where to begin looking?
Install the RM Client on the build server.
Somehow, the RM Client had gotten removed from the build server in between releases. Going to have a talk with IT about that.
Thank you #Daniel Mann for catching that.
Update:
After upgrading to Release Management 2015, I received the same error. The ReleaseTfvcTemplate.12.xaml was updated. Make sure to copy the new template to your BuildProcessTemplates (or update your custom templates) from "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Release Management\Client\bin"
After upgrading to RM 2015 I had to update my build templates as described in the comment above by abest.
The only changes are the version number in the registry paths.

jdbc connection fails while running the program from jar file

I've got an application, where I use a JDBC connection. When I run it from the Eclipse environment, there's no problem with anything, neither with connection.
But, when I pack it into executable jar file, and run it from command line, while calling the line
DriverManager.getConnection(url, user, password);
with correct credentials, the application gets frozen. (With wrong login attempt everything is ok - the SQLServerException is thrown).
I tried to create the jar file with different library choices, but the result is the same.
Can anyone help?
I use sqljdbc4.jar library
Constructor of my Database class:
public Database(String url, String user, String password) throws SQLException, ClassNotFoundException {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
System.out.println("forname");
connection = DriverManager.getConnection(url, user, password);
System.out.println("get connection");
}
After correct login no Exception is thrown and "get connection" string is not printed out (only "forname" string is printed)
Are you using Java 6 Update 29? If so Update to Java 6 Update 30 or higher (preferably the latest: Update 32). There was a bug in that Java version which caused the Microsoft SQL Server JDBC driver to hang.
"frozen"? Are you catching an Exception with an empty catch block?
I'll bet the JDBC driver JAR is in the CLASSPATH when you run in Eclipse but not when you run the executable JAR. Add the Class-Path to your JAR manifest and put all the JARs with your executable JAR. That should do it.

Resources