Install Ruby On Rails Application on Windows IIS server - ruby-on-rails

I'm going to install one basic ROR application on the windows IIS server.
I try many things and referred to some links which explain how to install ROR app on windows but it's not working for me.
Ruby version: 3.1.2
Rails version: 7.0.0
If I execute in the localhost of the windows machine, it's working fine but not working in the IIS server.
Project path : C:\inetpub\wwwroot\test\bmw_test_project
I'm sharing my web.config file
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform stdoutLogEnabled="true" processesPerApplication="1" stdoutLogFile="log\rails.log" startupTimeLimit="20" processPath="C:\Ruby31-x64\bin\ruby.exe" arguments="-S puma --env development --dir C:\inetpub\wwwroot\test\bmw_test_project -p %HTTP_PLATFORM_PORT%">
<environmentVariables>
<environmentVariable name="RAILS_ENV" value="development" />
</environmentVariables>
</httpPlatform>
<security>
<requestFiltering>
<requestLimits>
<headerLimits>
<add header="maxQueryString" sizeLimit="2048" />
</headerLimits>
</requestLimits>
</requestFiltering>
</security>
</system.webServer>
</configuration>
I don't know where I'm lacking.
Can any one help me.

Related

HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure due to some reason

NET core website it Give me this type of error "HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure"
Which version of .NET Core are you using?
This problem can be caused by not having the corresponding AspNetCore module installed in IIS (download hosting bundle from Microsoft website: https://dotnet.microsoft.com/download/dotnet-core). For .NET Core 2.2+ it is AspNetCoreV2.
Also, it can happen if IIS cannot find .NET Core on the machine - you can write the path to it manually in "web.config":
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\AppMainDll.dll" />
</system.webServer>
</location>
</configuration>

Issues on configuring IIS for mvc asp .net 3.1 application

I have problems with hosting web app on IIS. In next photos you will see my configuration files that I change and errors that I have when try start app on browser.
web.config:
<configuration>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet"
arguments=".\bin\Debug\netcoreapp3.1\TaskTracker.Frontend.dll"
stdoutLogEnabled="false"
stdoutLogFile=".\logs\stdout"
hostingModel="inprocess" />
</system.webServer>
</configuration>
hosts file
applicationHost
applicationHost part 2
Error when I try to see authentication of app
I was setup permissions on app folder in properties-security of foler.
When I try to consume app through browser, error was:
server error in browser
There is a problem with your web.config file configuration, I suggest you reinstall IIS and ASP.Net Core module to restore the configuration files.

Problem in hosting Dot net Core on windows server with IIS (nop commerce)

I want to host nopcommerce 4.10 on windows server IIS. I have installed .net core hosting bundle, .net Sdk and also set its environment variable c++ redistributable package is also installed. But I am still getting this screen. I have also enables stdout but does not getting any log.
I've tried many solutions from forums and all other site but still getting same issue.
Web.config
<configuration>
<system.webServer>
<modules>
<!-- Remove WebDAV module so that we can make DELETE requests -->
<remove name="WebDAVModule" />
</modules>
<handlers>
<!-- Remove WebDAV module so that we can make DELETE requests -->
<remove name="WebDAV" />
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule"
resourceType="Unspecified" />
</handlers>
<!-- When deploying on Azure, make sure that "dotnet" is installed and the
path to it is registered in the PATH environment variable or specify the
full path to it -->
<aspNetCore requestTimeout="23:00:00" processPath="%LAUNCHER_PATH%"
arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false"
stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600"
/>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
%LAUNCHER_PATH% and %LAUNCHER_ARGS% did not get replaced, it should be something like
<aspNetCore requestTimeout="23:00:00" processPath="C:\Program Files (x86)\dotnet\dotnet.exe" arguments=".\Nop.Web.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" startupTimeLimit="3600" />

asp.net core app. 500 - Internal server error

I uploaded my website to godaddy windows hosting with plesk.
All files are uploaded but I get an error:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
From researching the problem online I figured the prob;em must be in my web.config file
I am showing here what I have in my web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false" allowOverride="false">
<system.webServer>
<httpErrors errorMode="Detailed"/>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\myApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
<system.web>
<trust level="Full" />
</system.web>
</location>
<system.web>
<customErrors mode="Off" />
</system.web>
</configuration>
Your host (GoDaddy) will need to setup their servers to support asp.net core
web.config in asp.net MVC core Project
I tried on myproject also, but it didn't work
So after trying everything including calling godaddy and searching all over, I found out that GoDaddy doesn't support asp.net core 2.0 applications
I hosted with 1and1 windows hosting and it runs!

Cannot run Glimpse with ASP.NET MVC 5 Application on IIS

I have an ASP.NET MVC 5 application that is running on IIS and I want to use the Glimpse Package so that I can monitor all of the SQL calls that are being made within my application.
I have installed Glimpse using the Nuget Package Manager Console by using the command:
Install-Package Glimpse.MVC5
Since my application is running on IIS, I added the following commands to my web.config file:
<configuration>
<configSections>
<section name="glimpse" type="Glimpse.Core.Configuration.Section, Glimpse.Core" />
</configSections>
</configuration>
<system.web>
<httpModules>
<add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet"/>
</httpModules>
<httpHandlers>
<add path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet"/>
</httpHandlers>
</system.web>
<system.webServer>
<modules>
<add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" preCondition="integratedMode"/>
</modules>
<handlers>
<add name="Glimpse" path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" preCondition="integratedMode" />
</handlers>
</system.webServer>
After these commands are in place and I try running my application through IIS, I get the following error:
Could not load file or assembly 'Glimpse.AspNet' or one of its dependencies. The system cannot find the file specified.
I know that Glimpse is really set up to work by building your application locally but I think you can get it to work on a remote server as well.
Any help would be greatly appreciated!
I eventually got Glimpse up and running by making sure I installed all of the necessary NuGet packages for it.

Resources