EPiServer 8 shared VPP folder - c#

i want to configure multi-developer development environment for a web site in EPi server 8. i have followed this article to do this(i guess that's the only article provided on web for this purpose :-) )
i have moved my EPi Server database and VPP folder(Modules/_protected) to a shared location
I have changed following physical paths web.config
<episerver.packaging protectedVirtualPath="~/EPiServer/" protectedPath="\\location\Modules\_Protected" publicVirtualPath="~/modules/" publicPath="modules" />
<virtualPathProviders>
<clear />
<add name="ProtectedModules" virtualPath="~/EPiServer/" physicalPath="\\location\Modules\_Protected" type="EPiServer.Web.Hosting.VirtualPathNonUnifiedProvider, EPiServer.Framework" />
</virtualPathProviders>
I have restarted IIS as well but still website tries to access EPiServer.Cms.Shell.UI.zip from old location which is [websiterootfolder]\modules_protected\CMS
Can anyone please help????

Related

Azure Keyvault stopped working on IIS hosted site

Hi I have a question regarding Azure keyvault and IIS. So our server provider did an windows patch:
2021-04 Cumulative Update for Windows Server 2016 for x64-based Systems (KB5001347)
2021-04 Servicing Stack Update for Windows Server 2016 for x64-based Systems (KB5001402)
After this windows patch and restart of server our fetch from web.config to keyvault in Azure stopped to work.
When IIS is starting our app it can not find Microsoft.Configuration.ConfigurationBuilders.Azure
Even if the DLL is located in the bin folder.
One other important thing to mention is that our connectionStrings to the database that are located in their own file connectionstrings.config are working great with Azure Keyvault.
Our windows services on the same machine are also working great with Azure Keyvault.
So the issue is only affecting our appsettings section in our web.config.
We have tried to add the bin folder to privatePath in the web.config, that didnt help
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;modulesbin"/>
This works great on our STAGING machine which has the same windows updates and uses the same configs.
Does anyone have a clue what we can do next?
What we are using:
System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
<configBuilders>
<builders>
<add name="AzureKeyVault" vaultName=somevaultname"
type="Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azure, Version=1.0.0.0, Culture=neutral"
vaultUri="somevaulturi"/>
</builders>
</configBuilders>
Thanks for any help
Edit:
We have now installed newer Azure dlls.
Installed Azure CLI on server.
We hare now using AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_CLIENT_ID instead of AzureServicesAuthConnectionString in the environment variables.
After reboot, the webapp, services, connectionstring stopped working.
Error message in Event viewer:
Exception message: An error occurred loading a configuration file: The specified user does not have a valid profile. Unable to load 'Microsoft.Configuration.ConfigurationBuilders.Azure
Everything still work as expected on our stage server.
AZURE_TENANT_ID was added correctly under Administrator environment variables
but under system environment variables it was added with AZURE_TENTANT_ID (one t too much)
Such a typo. All good now.

Deployed web on Azure cannot access a .less file (error code 404). Local IIS deployment works without error

I deployed a website in https://pokegotool.azurewebsites.net.
However, when I use a browser to access it and read the browser console, it told that the "Content/pre-css/styles.less" file is inaccessible (error code 404).
I build the web site locally in IIS and it had no such problem as the file is loaded successfully. I am sure that the file exists in Azure deployment place.
This URL is ZIP archived project: https://www.mediafire.com/file/i6745pz5j43cw2z/RangeGen.zip/file
Feel free to use it.
Is this an error from Azure or from my project itself? How could I fix it?
I have deployed your project and met the same issue . Basically , it is due to that Azure app service IIS server have not mapped correct MIME type for .less files by default.
To solve this issue , just adding a map record in your web.config file as below :
<system.webServer>
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/plain" />
</staticContent>
</system.webServer>
It works on my app service , try it here : https://rangegen20190902101335.azurewebsites.net/Content/pre-css/styles.less
Pls mark me if it solves your issue : )

C# MVC: Cannot Debug in IIS Express

I just changed my laptop. I am moving my old project done in MVC 4 and was done in Visual Studio 2012. My current Visual Studio in my new laptop is 2017 version.
There is a problem when I want to debug my MVC application. This error comes out after I run the debug:
HTTP Error 403.14 - Forbidden The Web server is configured to not list
the contents of this directory.
Most likely causes: A default document is not configured for the
requested URL, and directory browsing is not enabled on the server.
I never set my application to be listed in directory browser. My application is an MVC application which will run global.asax and redirect to my home page.
How can I fix this?
enable directory browsing.
keep this into your web config file then rename the add value="pagename.aspx"
<system.webServer>
<defaultDocument>
<files>
<add value="yourpage.aspx" />
</files>
</defaultDocument>
<directoryBrowse enabled="false" />
</system.webServer>
or
<system.webServer>
<directoryBrowse enabled="true" />
</system.webServer>
You can also enable directory browsing from IIS
Open a command prompt, and then go to the IIS Express folder on your computer. For example, go to the following folder in a command prompt: C:\Program Files\IIS Express
Type the following command, and then press Enter:
appcmd set config /section:system.webServer/directoryBrowse /enabled:true
Got the same error, but MVC5 on VS2017. Eventually found I got the error because i had marked Application_Start() in Global.asax as a static. I did that because i made the mistake of following this Code Analysis recommendation:
This is a potential duplicate of
HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents
Different context since you are trying to debug in IIS express and you are not hosting the application in IIS, however the error is the same and the answers is worth checking out. Could set you on the right path.
Would have commented but don't have enough rep yet.
Make sure you have defined your default application inside the hosts file in your new laptop.
This is a cause for many headache.
See it under:
C:/Windows/System32/Drivers/etc/hosts

Asp.net core rc2 binary can not run IIS 8.5 window server 2012, getting error 502.3

I am trying to get my new asp.net core rc2 version running on my dev server that running IIs 8.5 and window 2012 server
I've followed the steps list in here, which is:
On my local:
Create a new asp.net core project using VS 2015 (Dev14) U2
Change the web.config stdoutLogEnabled="true", create a new deploy profile and publish it locally to a folder
Make sure the website works on IIS Express.
On my server
Installed the DotNetCore.1.0.0.RC2-WindowsHosting.exe and reset IIS
Setup new app pool with no managed code, setup new website in IIS that points to the local: D:\apps\myapp1\
Copy the deploy content to D:\apps\myapp1\ (such as the dll is D:\apps\myapp1\myapp1.dll)
dotnet.exe is on the path. I can even go to D:\apps\myapp1\ and dotnet myapp1.dll. It will bring up the nano server.
What I see when I hit http://mydevserver/myapp1 (or localhost/myapp1 on my dev server):
HTTP Error 502.3 - Bad Gateway
When I view the Event log, I can see a bunch of failure like this:
my logs folder on D:\apps\myapp1\logs is also empty. There is no log in that folder whatsoever.
At this point I am pretty lost on what to do. Help!!!
Here's the content of my web.config
<?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="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>
</xml>
There are a few things you can do to troubleshoot:
go to the published app and try running it without IIS
logs won't be written if the folder does not exist and by default the logs folder does not exist
if it is a portable app make sure the path to dotnet.exe is on the system wide %PATH% (note you need to do iisreset after you set it to make IIS pick it up)
I wrote a blog post explaining how ASP.NET Core apps work with IIS and the post contains the section on troubleshooting your very problem.
So I finally figured out what's wrong. Apparently because I did not setup my website under "Default Web Site" of IIS, so IIS (I think) routes my website incorrectly. My fix is to move my website under Default Web Site.
One of my friends found another way to setup the website outside of Default Web Site by disabling the Default Web Site. I have not tried to get both Default Web Site enable and MyApp website enable working. Maybe somebody else can contribute in...

Configuration error in ASP.NET website

I recently started getting this error:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred loading a configuration file: Failed to start monitoring changes to 'H:\2013 T1\SIT302 Project\Deliverables\Website' because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.
Source Error: [No relevant source lines]
Source File: refers back to the web config file Line: 0
I have no idea why this is happening.
The following is contents of my web config file.
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
It seems H:\2013 T1\SIT302 Project\Deliverables\Website is a network path not a local path and there is a network problem between the IIS Server and the file server containing the website files. Check the network connectivity.
Users of IIS and ASP.NET often receive this error message when running a website from a network share or NAS device. Check this LINK for more information and the solution.
I made a very detailed answer to this problem here: https://stackoverflow.com/a/20710473/705198
That answer is an accumulation of all the technet, msdn, and blog reference material I could find on the subject, and what we ended up having to do to fix the problem. Disabling Jumbo Frames (HP Server NIC problems causing another error) and SMB2+ combined with the registry edits were what ended up saving us with our high traffic IIS sites. The registry edits alone only made it so the network bios limit errors would not show up as fast under normal load.

Categories

Resources