Working with IIS

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
gcorwin
User
Posts: 21

Working with IIS

Post by gcorwin »

I downloaded and installed all the needed components (.NET SDK, Node.js, etc), but when I created my first project (ASP.NET Maker says that the "Generation completed successfully") I am getting an error with the webconfig file (or so IIS says). here is what I did

  1. Connected to mySQL
  2. changed nothing in the app other than the output directory where IIS is pointed
  3. clicked generate
  4. went to localhost and got this
    HTTP Error 500.19 - Internal Server Error
    The requested page cannot be accessed because the related configuration data for the page is invalid.
    
    Detailed Error Information:
    Module	   IIS Web Core
    Notification	   BeginRequest
    Handler	   Not yet determined
    Error Code	   0x8007000d
    Config Error	   
    Config File	   \\?\D:\html's\DPI-Tech\LIVE\cms\web.config
    Requested URL	   http://localhost:80/cms/
    Physical Path	   *REDACTED*
    Logon Method	   Not yet determined
    Logon User	   Not yet determined
    
    Config Source:
       -1: 
        0: 

the error message suggests that there is a problem with the webconfig file but it looks OK to me:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<!--
	Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
	-->
	<system.webServer>
		<handlers>
			<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
		</handlers>
		<aspNetCore processPath="%LAUNCHER_PATH%"
			arguments="%LAUNCHER_ARGS%"
			requestTimeout="00:02:00"
			stdoutLogEnabled="false"
			stdoutLogFile=".\logs\stdout">
			<environmentVariables>
				<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
			</environmentVariables>
		</aspNetCore>
	</system.webServer>
</configuration>

I checked the application pool in IIS and it is set to use .NET 4 with an Integrated pipeline.

any suggestions on how to get this running would be great


MichaelG
User
Posts: 1095

Post by MichaelG »

You need to publish the project and install the ASP.NET Core Module/Hosting Bundle in IIS. Please read the notes in Generate Settings -> Publish:
https://aspnetmaker.dev/docs/#/generatesetup.html


gcorwin
User
Posts: 21

Post by gcorwin »

So I installed the bundles and went through the documentation. I am still getting poor outputs. I will note that when I did the install the Powershell script halted at a line that had "UnelevatedInstallerTelemetryDecorator " in it. then it crashed out. I tried to un/re-installed the application and now I have gone past the trial. Is there anything I can do? I don't mind buying it, but not if it won't work on my system


MichaelG
User
Posts: 1095

Post by MichaelG »

What error did you get? You should also read:
https://docs.microsoft.com/en-us/aspnet ... ual-studio

You can also install Visual Studio 2022 and open the generated project. Then use the publish tools in VS 2022 (Build -> Publish) to publish the project.

*** Make very sure you install the Hosting Bundle, which includes the .NET Runtime and IIS support, see System Requirements and
https://dotnet.microsoft.com/en-us/download/dotnet/6.0


darkdragon
User
Posts: 148

Post by darkdragon »

gcorwin wrote:

I checked the application pool in IIS and it is set to use .NET 4 with an Integrated
pipeline.

any suggestions on how to get this running would be great

The App Pool needs to be created with "No Managed Code" and "Integrated Pipeline"


gcorwin
User
Posts: 21

Post by gcorwin »

After installing the license and starting a new project I am no longer having any issues.

But I am having a little difficulty understanding the directory structure for Publishing.

I have a project in C:\Users\User\Documents\ASPNETMaker\WebSites\project1\ and I can browse the output with HTTP.sys. there are several folders in the project1 folder, but I am not sure which ones I need to move to my website. I want the url to be www.domain.com/ContentManagement

What do I need to do? (sorry if this is a noob question, I just don't really understand .net all that well)

I also want the uploads (images/docs) to upload to www.domain.com/images and www.domain.com/docs respectively. What should I be using for the Upload Folder "../images/" and "../docs/
(e.g. the same as was used in ASPMaker)?


MichaelG
User
Posts: 1095

Post by MichaelG »

Read Generate Settings -> Publish.


gcorwin
User
Posts: 21

Post by gcorwin »

I did read the documentation but i still don't understand. Namely, what is the target folder and default document for the login.


MichaelG
User
Posts: 1095

Post by MichaelG »

You need to set up IIS application / Virtual Directories for the required folders. For example:

  • "ContentManagement" as the application root of your ASP.NET Core application and point to your published folder
  • "images" / "docs" as the virtual directories of your upload folders

To override the download href path, change Tools -> Advanced Settings -> File upload URL path. You can also change Field.HrefPath in server events.


gcorwin
User
Posts: 21

Post by gcorwin »

I think I may see the disconnect between my question and your answer.

I do not have an asp.net application, I want to use the ASP.NET Maker as a standalone application (on a webserver) to manage the database for another Classic ASP application. Just like I used to use ASPMaker for the past 15 years, and a subdirectory on a website. How do I do that?

And if I can be frank, I had a .NET developer that I work with look at the replies in this thread and even he didn't understand it


MichaelG
User
Posts: 1095

Post by MichaelG »

No, you cannot run ASP.NET Core application under a sub directory. It must be run as an IIS application. Read:
https://docs.microsoft.com/en-us/aspnet ... ual-studio


ready4data
User
Posts: 16

Post by ready4data »

Don't know if this will help but I struggled with getting an ASP Net site to run after being used to ASP Maker.
Even after installing all the needed components and publishing the site in its own folder it wouldn't run.
What finally worked is in IIS, Right click on the site and select Add Application. This was the golden ticket for me.

Scott


Post Reply