IIS 7.5 and IIS 8.0 European Hosting

BLOG about IIS 7.5 Hosting, IIS 8.0 Hosting and Its Technology - Dedicated to European Windows Hosting Customer

IIS Hosting Europe - HostForLIFE.eu :: Stop Sharing a Drive/Folder by Using Windows Interface

clock March 30, 2021 06:49 by author Peter

In this article you will learn how to stop sharing a drive/folder using a Windows interface.

Step 1
First of all open the "Computer Management" from the Start Menu of your system.

Step 2
Now your Computer Management Window will be opened that will look like this:

Step 3
On the left-hand side of Computer management you will see many options, one of them will be "Shared Folders", expand this option.

Step 4
On expanding the Shared Folders you will see that three options are available to choose from, one of them will be named "Shares", click on this option to see the folders and drives that are shared.

Step 5
Now right-click on a folder or drive you want to stop sharing and click on "Stop Sharing".

Step 6
Now a Confirmation Message Box will pop-up that will again confirm you that you really want to stop sharing, click on the "Yes" button to remove this folder from the sharing folder option.



IIS 8.5 Hosting - HostForLIFE.eu :: Enable IIS Server to Serve .mp4 Files through web.config File

clock March 26, 2021 08:44 by author Peter

Now, most of the websites are being developed using HTML5 and using videos on the background. It is an easy job to use  the video tag.. It is advised to serve video files using a CDN, however, in case you want to host videos from your own server, you need to configure IIS to server .mp4 files. In case you don’t configure it, you will get a 404 error or an error saying “The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.” Again, if you have got access to IIS , it’s a great thing but what if you’re hosting the website on a shared server where you don’t have access to IIS Server? In this post, we will see how can we enable IIS Server to serve .mp4 files through web.config file.


To allow IIS to server files, we need to configure proper mimeType for the required files. The mimeType for a .mp4 is video/mp4. Just add the following line in your web.config file under system.webServer tag and you should be good to go.

<configuration>  
    <system .webServer>  
        <staticcontent>  
            <mimemap fileExtension=".mp4" mimeType="video/mp4"></mimemap>  
        </staticcontent>  
    </system>  
</configuration> 

Once you do the above changes, your web server should start serving .mp4 files without issues. Hope this blog post helps you! In case you know other ways of doing the same, do let me know via comments.



IIS 8.0 Hosting - HostForLIFE.eu :: Publish And Deploy ASP.NET Core MVC On IIS

clock March 5, 2021 08:51 by author Peter

ASP.NET Core is able to run as a standalone Application (out of process Console Application). It does not host inside IIS, which does not require IIS to run an application. ASP.NET Core app has its own self-hosted Web Server and processes the requests, which internally use the self-hosted Server instance. ASP.NET Core uses Kestrel Server to host the core Application but it does not support all the features of the Server such as IIS.

In older ASP.NET Web applications, everything is hosted inside IIS Worker process, which can also refer to an Application pool. The Application Pool hosts our Web Application and our Web Application is instantiated by the built-in ASP.NET hosting features in IIS. The ASP.NET Core Application does not run in the IIS worker process but runs as a separate out of process Console Application, which runs its own Web Server, using Kestrel Web Server. If we run on Windows, we may want to run Kestrel behind IIS to gain infrastructure features such as port forwarding via host headers, life cycle and certificate management.

ASP.NET Core Application is a standalone console Application that is invoked through the "dotnet" runtime command. It does not load into the IIS worker process but loads in the native IIS module called "AspNetCoreModule" which runs the console application. We need to install the AspNetCoreModule on the Server and it is part of ASP.NET Core Server Hosting Bundle.


All IIS applications are run on application pool. For ASP.net core, application pool must set to use No Managed Code. The Application pool acts only as a proxy to forward the requests. There is no need to instantiate a .NET runtime.


The primary job of AspNetCoreModule is to ensure that our Application gets loaded when the first request comes. All incoming Http request are handled by AspNetCoreModule and then it is routed to ASP.NET Core Application. Kestrel picks up the incoming request and passes into ASP.NET Core middleware pipeline that subsequently handles the request and passes to the Application logic, which is the same as the response of the Application which is pushback to the IIS and then Http client.
 
AspNetCoreModule is configured via the web.config file, which is stored in an Application root folder, which contains the startup command and argument. The dotnet is a startup command and our Application main DLL, which is used to launch application as aargument.
 
The Web.config file looks, as shown below.
    <?xml version="1.0" encoding="utf-8"?>  
    <configuration>  
    <system.webServer>  
         <handlers>  
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>  
        </handlers>  
        <aspNetCore processPath="dotnet" arguments=".\FirstCoreApplication.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>  
    </system.webServer>  
    </configuration>  


Publishing ASP.NET Core Application
To host our Application on IIS, we first need to publish it. There are two ways to publish .NET Core Application
    Using CLI command dotnet publish.
    Using Visual Studio Publishing feature.

Before publishing ASP.NET Core Application, we make sure that we are including all the required folders in PublishOptions node of project.json file. This node looks, as shown below.
    "publishOptions": {  
      "include": [  
        "Views",  
        "web.config"  
      ]  
    }  


Using CLI command “dotnet publish”
.NET Core Application also supports CLI. Using CLI tool, we can create, build and publish the .NET Core Application. The "dotnet publish" command compiles the Application and publishes the Application with the project dependencies (specified in project.json file) and puts it into a specified folder.

    >dotnet publish  


Using Visual Studio Publishing feature
To publish our application, using Visual Studio, the first step is to right click on the project which we want to to publish and select publish option. Next step is to select custom option and enter the profile name. Once the profile is created, we need to select publishing method. Here, we have four different publishing methods, namely File system, Web deploy, Web deploy pack and FTP. In this example, I have selected File System as publish option and also need to pass target location.
 
In the next step, we can select the configuration, target framework and some other publish option. When we click Publish button, Visual Studio publish requires file in to the selected folder.


Host publish folder on IIS Manually
To host ASP.NET Core Application on IIS, we must have Windows 7 or newer / Windows Server 2008 R2 or newer. To configure IIS on Windows machine, we need to turn on some IIS related features of Windows.

Once our Application is published, we can hook up IIS to the published folder. Now, I am going to create a virtual Application directory.


Now, I am creating ASPNETCore Application with .NET runtime "No Managed Code", as shown earlier.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in