Wisej.NET Deployment
HomeNewsSupportVideos
  • Deployment
  • Targets
    • IIS
    • NGINX
    • Apache
    • Self Hosted
    • Hybrid
    • Amazon AWS
    • Microsoft Azure
    • ASP.NET Hosting
    • Linux, MacOS
    • Desktop (deprecated)
  • Concepts
    • Load Balancing
    • Visual Studio Publishing
    • Server Debugging
  • Troubleshooting
    • License Activation
Powered by GitBook
On this page
  • Project Formats
  • Old Project Format
  • SDK-Project Format
  • Troubleshooting
  • .NET Core
  • Security

Was this helpful?

Export as PDF
  1. Targets

Microsoft Azure

How to publish a Wisej app to the Microsoft Azure cloud.

PreviousAmazon AWSNextASP.NET Hosting

Last updated 3 months ago

Was this helpful?

Microsoft Azure supports different deployment types for Wisej (ASP.NET) applications. You can deploy to a Web Site (renamed to Web Service), to an IIS instance or a to a Virtual Machine with IIS.

In all cases you can publish directly from Visual Studio. Please refer to the guide and to Microsoft's Azure Deployment documentation for ASP.NET.

Project Formats

Old Project Format

Supported Frameworks for Publishing

  • .NET Framework v4.x

SDK-Project Format

Supported Frameworks for Publishing

  • .NET Core

You cannot publish .NET Framework v4.x projects to Azure using the Visual Studio Publishing Tool with the new SDK-Project format.

Troubleshooting

.NET Core

The application was published successfully but shows an error 'Couldn't find Wisej.Framework' on startup.

Remove <add name="Wisej" type="Wisej.Core.HttpModule, Wisej.Framework" /> from <modules> in web.config.

The application was published successfully but shows a blank white screen on startup.

Make sure <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> is uncommented under <handlers> in web.config.

Security

When deploying on .NET Core, you are unable to use the web.config file to configure the System.Web.HttpForbiddenHandler, which is typically used to block the downloading of potentially sensitive .json files. As a result, these .json files could become accessible for downloading, which might pose a security vulnerability.

Since ASP.NET Core relies on middleware modules instead of using traditional HttpHandlers and HttpModules, to secure specific files or directories, you need to modify the configuration in the Startup.cs file. Adjusting the middleware settings within Startup.cs allows you to implement security measures to protect sensitive files or directories effectively.

Below is an example of how to block access to specific files or directories in ASP.NET Core, based on your security requirements. You can customize the middleware configuration in the Startup.cs file to meet your particular security needs.

Conditional UseFileServer
// app.UseFileServer();
app.UseWhen(
 cx => !cx.Request.Path.Value.EndsWith(".json", StringComparison.OrdinalIgnoreCase), 
 app => app.UseFileServer()
);
Visual Studio Publishing
LogoQuickstart: Deploy an ASP.NET web app - Azure App Servicedocsmsft