I have an angular project that is launched through IIS with visual studio
modifying the code does not reload the page while it's working fine from the command line when using "npm start"
I need it to run from visual studio through IIS for technical reasons
if I go to the ClientApp folder and do "ng build", then CTRL+F5 in Chrome, the page is updated
is it a bug or is there something to enable somewhere ?
<?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:\...\myapp\bin\Debug\netcoreapp3.1\myapp.exe" arguments="" stdoutLogEnabled="false" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="443" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
thanks
try something like http-server and watch.
Install the http-server and watch via npm globally:
npm install -g http-server watch
watch will scout for file changes in your directory. If a change is happening it will execute the given command and this one uses the http-server to reload the page.
You can edit watch and http-server then in your package.json
Related
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.
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.
I'm using Visual Studio Enterprise 2019 version 16.3.10. Whenever I run/debug my web project using IIS Express, it adds COMPLUS_ForceENC environment variable as shown below:
<environmentVariable name="COMPLUS_ForceENC" value="1" />
Here is the screen print,
Every time I need to undo this change before committing my changes to source control. Please can anyone assist me on how to avoid this change?
After a long time, I got response from Visual Studio developer community.
The web.config only gets updated if you have the following section present in the web.config. You can remove the following from the web.config and running the application will not update the existing web.config. if you are using IISExpress, You can alternatively remove the full web.config from the project. web.config is not required in the project for running in IISExpress.
<handlers>
<remove name="aspNetCore" />
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44370" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
<environmentVariable name="COMPLUS_ForceENC" value="1" />
</environmentVariables>
</aspNetCore>
Here is the link for the same.
Adding this Enivronment Variable seems to be a workaround for enabling the "Edit and Continue" debugger feature.
Source
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" />
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.