반응형

Previous Post

2024.09.16 - [Microsoft 365/Graph & IIS] - Microsoft Graph & IIS. (1) Setting up the basic testing environment.

 

In this post, we will cover the process of publishing an ASP.NET Sample Page to IIS. Since most Microsoft solutions are based on ASP.NET, I thought this would be a necessary step before testing Graph.

 

https://youtu.be/6z7HdW6IoCI

 

 

Launch Visual Studio.

 

File -> New -> Project

 

ASP.NET Core Web App (Model-View-Controller) -> Next

 

Next

 

Verify that the Framework is set to .NET 8.0 -> Click "Create" (You will need to install the Runtime and SDK version 8.0 on IIS to match this setting.)

 

Solution Explorer -> Controllers -> Add -> Controller

 

MVC Controller - Empty -> Add

 

Name the controller as HelloWorldController. -> Add

 

 

Right-Click on Views -> Add -> New Folder

 

Name it HelloWorld.

 

Right-click on HelloWorld.-> Add -> New Item

 

If the following options appear, select Show All Templates.

 

Razor View - Empty -> Confirm the name as Index.cshtml. -> Add

 

Verify that it has been created under the HelloWorld folder.

 

다음과 같이 입력합니다.

ViewData["Title"] = "Index";

<h2>Index</h2>
<p>Hello from the HelloWorld view!</p>

 

Debug -> Start Debugging

 

If any messages related to SSL certificates appear, click "Yes" for all of them.

 

Yes

 

Yes

 

Yes

 

The sample page is now accessible in Edge.

 

When you access /HelloWorld, it is displayed as follows:

 

Now, let's proceed with creating the sample page as a site in IIS.

Build -> Publish [Project Name]

 

Web Server (IIS) -> Next

 

Web Deploy Package -> Next

 

Specify the location. -> Site name 지정 -> Finish

 

Click Publish.

 

It will be generated as shown below. Now, copy the files to the IIS server.

 

After copying, extract the files.

 

After extracting, move the files to a subfolder as shown below -> Copy the folder and files to the root directory (C:\Sample).

 

Copy completed.

 

Launch IIS Manager.

 

Sites -> Add Website

 

Proceed with the creation process as shown below. (For the certificate, specify the one that was previously created.)

 

Confirm that the creation is successful.

 

Application Pools -> Double-click on **Sample**.

 

.NET CLR version -> Change the setting to **No Managed Code**.

 

IISRESET

 

Access localhost to verify the setup.

 

Once DNS registration and certificate binding are completed, test the published URL.

반응형
반응형

When testing Exchange Online and M365, there are times when an environment related to Graph API is needed. In the past, I would have skipped anything related to development, but now ChatGPT can generate sample pages to some extent.

Without any prior development knowledge, I will build a test environment using the knowledge gained from ChatGPT, based on IIS. The ultimate goal is to integrate Microsoft Graph, and I will post about the necessary components along the way.

In this post, I will cover installing Visual Studio 2022 and configuring the IIS Server.

 

https://youtu.be/LRoFa0EX-iA

 

 

Step 1. Installing Visual Studio 2022

Download Visual Studio 2022

https://visualstudio.microsoft.com/downloads/

 

 

Run the installation file.

 

 

Continue

 

 

Check ASP.NET -> Install

 

 

Proceed with the installation.

 

 

Installation complete -> Verify by running the application.

 

 

Step 2. Setting up the IIS Server

I proceeded with the installation separately from the VM where Visual Studio is installed.

 

Server Manager -> Add roles and features

 

Check IIS

 

 

Check the following features:

URL Authorization

Windows Authentication

Tracing

.NET Extensibility 4.8

.ASP.NET 4.8

WebSocket Protocol

 

 

After completing the IIS installation, install the necessary .NET components.

 

.NET Core Hosting Bundle installer

https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer

 

Install .Net SDK 8.0

https://dotnet.microsoft.com/en-us/download/dotnet/8.0

 

 

Run PowerShell to check the installed version.

dotnet --list-sdks
dotnet --list-runtimes

 

 

In the next post, I will cover how to create an ASP.NET sample page in Visual Studio.

반응형
반응형

I have previously shown you how to add multiple rows simultaneously.

 

Copilot in Excel Series:

2024.07.27 - [Copilot] - Copilot in Excel: Useful Prompt (1). Calculate A, Matching B based on C (English)

2024.08.10 - [Copilot] - Copilot in Excel: Useful Prompt (2). Show data insights & Add all insights to grid (English)

2024.08.23 - [Copilot] - Copilot in Excel: Useful Prompt (3). If (Calculate condition) (English)

2024.09.08 - [Copilot] - Copilot in Excel: Useful Prompt (4). Add Columns (Multiple columns) (English)

 

https://youtu.be/2opOcZk9OqY

 

 

As I continue to research prompts, it seems that a request like "Create a column" is more appropriate than simply asking for calculations, so I plan to focus on that aspect.

 

Prompt 1. Create a "X" column

I started with the following prompt.

Calculate "Month", based on "Date".

 

I believe this has transformed into the following form.

Add a column Month. Calculate Month, based on Date.

= Add a Column Month based on Date

= Calculate "Month", based on "Date".

= Create a 'Month' column

 

Calculate "Month", based on "Date".

 

The first is presented as follows.

 

Give me another suggestion based on my prompt

 

Give me another suggestion based on my prompt

 

I think it might be a form where the beginning is omitted, as shown below.

 Add a column Month. Calculate Month, based on Date.

 

 

 

The previous prompt execution history might have an influence, but the prompt below produces almost the same result.

Add a column Month. Calculate Month, based on Date.

= Add a Column Month based on Date

= Calculate "Month", based on "Date".

= Create a 'Month' column

 

 

Prompt 2. Create columns "Title: A, B, C, D". Calculate Condition, Matching Month based on Table1.

As I input many prompts, there were many cases where the following prompt from a previous entry did not function as intended.

 

In particular, the following prompt did not produce the desired results in many cases.

Calculate Method W, X, Y, Z.  Matching Name, Quarter based on Table1

 

This time, I will proceed with a slight change. It has been confirmed that using the "Create Columns" prompt results in higher accuracy.

Create columns "Department: Global Sales 1, Global Sales 2, Internal Sales 1, Internal Sales 2". Calculate Sales Performance, Matching Month based on Table1.

 

Requesting to add the desired columns (up to a maximum of 4), along with additional explanations or examples, increases the accuracy.

 

 

 

Clicking "Hide explanation" allows you to check the explanation of the formula.

 

Check the results.

 

Let's proceed in the same pattern as follows.

Create columns "Method: W, X, Y, Z". Calculate Sales Performance, Matching Month based on Table1.

 

Check the formula explanation to ensure it matches the intended content.

 

It is confirmed that the 4 columns are added as intended.

 

Proceed with the addition and verify the results.

 

Prompt 3. Create 4 columns "A, B, C, D". Provide the basis, location, and definition regarding the requested matter.

 

There is no correct answer in prompts. The only solution is how well you present it for Copilot to understand. This time, I will try entering the prompt in a different way.

 

Create 4 columns "Global Sales 1, Global Sales 2, Internal Sales 1, Internal Sales 2".

Each column calculate monthly sales performance by Department.

The performance must be matched based on the month of Table1.

 

I will generate 4 columns.

 

Check if it aligns with my intended purpose.

 

Click on the formula to review it once more for confirmation.

 

 

Let's calculate the monthly sales performance by method using the same approach.

 

Create 4 columns "W, X, Y, X".

Each column calculate monthly sales performance by Method.

The performance must be matched based on the month of Table1.

 

It can be confirmed that the columns were generated following the same pattern.

 

Click on the formula to verify it.

 

 

 

It seems that calculating the quarter isn't working well. Pre-inserting the quarter into Table1 lowers the difficulty. Therefore, the structure of the Source Table is crucial when using Copilot.

Let's see what happens when we simply change "Monthly" to "Quarterly."

 

Create 4 columns "Global Sales 1, Global Sales 2, Internal Sales 1, Internal Sales 2".

Each column calculates quarterly sales performance by Department.

The performance must be matched based on the month of Table1.

 

Looking at the results, there is no part where the month is calculated as a quarter.

 

 

This time, I added more detailed explanations.

Create 4 columns "Global Sales 1, Global Sales 2, Internal Sales 1, Internal Sales 2".
Each column calculates quarterly sales performance by Department. 
The performance must be matched based on the quarter of Table1.
There is no quarter column in Table1. The quarter must be calculated based on the month.

 

 

It can be observed that the quarter definition was added and calculated correctly. However, only one column was added.

 

I want to create 4 columns

 

It only generates the formula.

 

Create 4 columns using the provided formula.

 

Still, the result was just one.

 

When proceeding as below, it suggests other columns. Calculating multiple rows felt quite challenging. Perhaps it's because this is still in the preview stage

Give me another suggestion based on my prompt

 

Give me another suggestion based on my prompt

 

By adding one at a time, I was able to complete it as shown below.

 

It would be great if things were clearer, but for now, offering various directions seems to be the best approach.

반응형

+ Recent posts