Closed red-erik closed 5 months ago
Hello @red-erik,
Thank you for your feedback. The Wiki had an outdated command for deploying as a Stand-Alone site, so I have updated it.
https://github.com/mspnp/AzureNamingTool/wiki/Run-as-a-Stand%E2%80%90Alone-Site
The guide has been updated with to the dotnet publish command, with some configurations specified (Release configuration, output directory).
The process to deploy the site would be:
NOTE
Hope this helps!
Hello Bryan, thank you very miuch for that. Doing the same thing, I'm now receiving this
dotnet publish -c Release -o R:\AzureNamingTool MSBuild version 17.7.4+3ebbd7c49 for .NET Determining projects to restore... C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'BlazorDownloadFile (>= 2.4.0.2)' for 'net7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Modal (>= 7.1.0)' for 'n et7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Toast (>= 4.1.0)' for 'n et7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Microsoft.VisualStudio.Azure.Cont ainers.Tools.Targets (>= 1.19.5)' for 'net7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 6.5.0) ' for 'net7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore.Annotation s (>= 6.5.0)' for 'net7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Collections (>= 4.3.0)' fo r 'net7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] C:\Download\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Runtime.Caching (>= 7.0.0) ' for 'net7.0'. [C:\Download\AzureNamingTool\AzureNamingTool.sln] Failed to restore C:\Download\AzureNamingTool\AzureNamingTool.csproj (in 103 ms).
P.S. I'm not a developer and I don't have Visual Studio, only SDK and Runtime
Regards, Red.
Hi Red,
You should not need Visual Studio. You just have to be able to build the project (from the downloaded. zip file). From the error, it looks like you .NET 7 SDK may not be ins6talled correctly. You could try to run the installer again:
https://dotnet.microsoft.com/en-us/download/dotnet/7.0
You may find it easier to run the site in Docker, without having to install/configure IIS. The easiest way to do this is to install Docker Desktop and then following the Wiki:
https://www.docker.com/products/docker-desktop/
https://github.com/mspnp/AzureNamingTool/wiki/Run-as-a-Docker-Image
Hello, I confirm same error on a fresh new VM with Windows 2022 (same with 2019) and single fresh install of .NET SDK 7.
For testing purpose, deploying it as a stand-alone IIS app is a requirement.
Regards, Red.
Hi Red,
OK, I got the site working on a new Azure VM doing the following:
When doing the above, the site launched normally. I think you just need to make sure you download the .NET Core Hosting Bundle (not just the SDK) to get it working. I hope this helps.
Hello, we are really not able to solve this.
Created a new Windows Server 2022 Datacenter VM in Azure [OK] Installed IIS (this required updating the group policy to allow Remote Shell Execution (https://www.windowstechupdates.com/solved-the-ws-management-service-cannot-process-the-request-the-service-is-configured-to-not-accept-any-remote-shell-requests/)) [OK]
Installed the .NET Core Hosting Bundle Installer (https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer) [OK] -- NOTE: This is not just the SDK, but all the files required to host a .NET Core site in IIS.
Downloaded the v3.3.0 AzureNamingTool.zip package (https://github.com/mspnp/AzureNamingTool/releases/download/v3.3.0/AzureNamingTool.zip) [OK] Un-zipped the file to a directory [OK] Ran the dotnet publish -c Release -o [Your Site Directory] command (noted in the Wiki), specifying my output folder [SAME ERROR]
dotnet publish -c Release -o R:\AzureNamingTool\
SDK Version: 7.0.404
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
MSBuild version 17.7.4+3ebbd7c49 for .NET Determining projects to restore... C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'BlazorDownloadFile (>= 2.4.0.2)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Modal (>= 7.1.0)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Toast (>= 4.1.0)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Microsoft.VisualStudio.Azure.Containers.Tools.Targets (>= 1.19.5)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool3 30\AzureNamingTool.sln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 6.5.0)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore.Annotations (>= 6.5.0)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.s ln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Collections (>= 4.3.0)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln] C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Runtime.Caching (>= 7.0.0)' for 'net7.0'. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln] Failed to restore C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj (in 102 ms). Eseguito dotnet nuget add source https://api.nuget.org/v3/index.json
dotnet nuget add source https://api.nuget.org/v3/index.json Package source with Name: Package source 1 added successfully.
PS C:\Users...\Downloads\AzureNamingTool330> dotnet publish -c Release -o R:\AzureNamingTool\
MSBuild version 17.7.4+3ebbd7c49 for .NET
Determining projects to restore...
Restored C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.csproj (in 2.46 sec).
C:\Program Files\dotnet\sdk\7.0.404\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path
results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [C:\Users...\Downloads\AzureNamingTool330\AzureNamingTool.sln]
C:\Users...\Downloads\AzureNamingTool330\Services\ResourceTypeService.cs(488,57): warning CS8600: Converting null literal or possible null value to non-nullable type. [C:\Users...\Downloads\AzureNamingTool330\AzureNamin
gTool.csproj]
C:\Users...\Downloads\AzureNamingTool330\Shared\Components\AnchorNavigation.razor(7,46): warning CS8622: Nullability of reference types in type of parameter 'sender' of 'void AnchorNavigation.OnLocationChanged(object sender, Lo
cationChangedEventArgs e)' doesn't match the target delegate 'EventHandler
Regards, Red.
Hello Red,
I'm sorry you are still having issues. I followed the exact process I detailed above (creating a new Azure VM, installing the hosting bundle, and building the application) without issue. The only thing I can think of is maybe you are downloading the wrong zip file. You will want to download the "AzureNamingTooo.zip Package", not the GitHub Repo Code. You can find the Releases here:
https://github.com/mspnp/AzureNamingTool/releases
Note: If you do download the GitHub repo, the process is the same, however, you would need to switch to the "src" directory and build the application from there.
If you can provide screenshots, error logs, and any other information I can try to keep looking into the issue.
Hello, thank you for your help, it seems better with Rel. 4 but we receive this C:\Program Files\dotnet\sdk\8.0.101\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds.
The other problem I see is that the path of all links inside the app seem to be hardcoded to the IIS Root while we would like to be able to deploy it as an application into a Virtual Directory. If it's not supported, it should be a good idea to specify that into documentation. Tryng to copy all CSS and img files to the IIS Root but it seems not to be working properly.
Thank you again.
Regards, Red.
Thank you for the feedback Red. I did confirm many of the navigation links are to "/", which would explain the behavior you are seeing. We will update these to relative paths in the next version.
Hello, only for reference, we started again on a NEW Windows 2022 Datacenter Edition VM, Fresh install of everything following your input step by step, but we are still receiving this as donet publish command output:
PS R:\AzureNamingTool> dotnet publish -c Release
MSBuild version 17.8.3+195e7f5a3 for .NET
Determining projects to restore...
Restored R:\AzureNamingTool\AzureNamingTool.csproj (in 347 ms).
R:\AzureNamingTool\Services\ResourceTypeService.cs(488,57): warning CS8600: Converting null literal or possible null value to non-nullable type. [R:\AzureNamingTool\AzureNamingTool.csproj]
R:\AzureNamingTool\Components\General\AnchorNavigation.razor(7,46): warning CS8622: Nullability of reference types in type of parameter 'sender' of 'void AnchorNavigation.OnLocationChanged(object sender, LocationChanged
EventArgs e)' doesn't match the target delegate 'EventHandler
Regards, Red.
FYI, I have a create a new issue for the navigation path update, if you want to track the progress:
Hello, thank you very much for that. We rebuid everything and repaired all .Net installation and we solved the error. Now, the only point is that the master password is NOT SAVED and we need to use a blank one. All permissions on IIS www root seem to be fine.
Regards, Red.
Hello Red,
I wanted to provide an update on a few things:
I have resolved all of the build warnings that you seeing when building the application. These changes will be included in the next release.
In researching the navigation issues, I found that ASP.NET Core sites are not support as Virtual Directories in IIS, You can view that in the documentation here:
It is possible to host as a sub-application, however, I am still researching what it will take to add that support to the tool.
For now, I would recommend hosting the tool in the root of your IIS site to resolve the navigation issues.
Hello Bryan, thank you for clarifying that but now we are using it as a Root Web Site and not a Virtual Directory or Application but the password problem is still there.
Regards, Red.
Hello, The password is now properly saved/managed. Thank you very much for your work and quick support.
Regards, Red.
Hello, trying to deploy as a stand-alone site for IIS. Following your instructions at https://github.com/mspnp/AzureNamingTool/wiki/Run-as-a-Stand%E2%80%90Alone-Site Using both .NET SDK 8 or 7 I receive
dotnet build
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'BlazorDownloadFile (>= 2.4.0.2)' for 'net7 .0'. [R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Modal (>= 7.1.0)' for 'net7.0'. [ R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Toast (>= 4.1.0)' for 'net7.0'. [ R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Microsoft.VisualStudio.Azure.Containers.To ols.Targets (>= 1.19.5)' for 'net7.0'. [R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 6.5.0)' for 'ne t7.0'. [R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore.Annotations (>= 6.5 .0)' for 'net7.0'. [R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Collections (>= 4.3.0)' for 'net7.0 '. [R:\AzureNamingTool\AzureNamingTool.sln] R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Runtime.Caching (>= 7.0.0)' for 'ne t7.0'. [R:\AzureNamingTool\AzureNamingTool.sln] Failed to restore R:\AzureNamingTool\AzureNamingTool.csproj (in 125 ms).
Am I missing something ?
Thank you in advance.
Regards, Red.