aspnet_client folder within IIS website - iis-6

I want to know how to permanently remove the aspnet_client folder under some of our websites in IIS.
Our application does not require it, and scripts against these folders fail due to the folder permissions on this folder.

Even the .NET 4 install continues to add this folder. There doesn't seem to be a permanent way to delete the folder, outside of deleting it after registering .NET with IIS, or after installing a new version of the .NET Framework.
Some people say they throw a read-only attribute on the directory, but ... that still keeps the directory hanging about.
See my answer to a similar question, Prevent aspnet_client folder being added to .NET sites
To reiterate that answer:
Check out the MSDN documentation on the ASP.NET IIS Registration Tool (Aspnet_regiis.exe). There's an e and ea command line switch you should be able to use to clean it up after the fact.
You can use Aspnet_regiis.exe to install and remove system client-side script, such as script for client-side validation. Use the -c option to install client script for the version of ASP.NET that is associated with the tool. (Script is installed in the Aspnet_client subdirectory of each IIS site directory.) To remove the client-side script for just the ASP.NET version that is associated with the tool, use the -e option. To remove the client-side script for all installed versions of ASP.NET, use the -ea option.
(Emphasis added.)

Related

How to update client-side packages in ASP .NET Core 2.1?

Environment: .NET Core 2.1 running on Ubuntu 18.04
When a new ASP .NET core project is created, a bunch of client-side packages are automatically generated. For example:
$ dotnet new razor
$ ls wwwrooot/lib
bootstrap jquery jquery-validation jquery-validation-unobtrusive
However, I do not see any configuration file that lists these client-side packages.
I believe bower is no longer being used. Plus, I don't see any bower.json file.
I believe libman is not even present on my machine. Plus, I don't see any libman.json file.
Using the command dotnet restore restores only the .net packages listed in .csproj file but does not restore packages under wwwroot/lib directory.
As a quick test, I deleted wwwroot/lib directory and tried various commands. However, none of my attempts was able to restore any packages under wwwroot/lib directory.
Can someone please tell me how are client-side packages managed in ASP.NET Core 2.1 and beyond? How does one upgrade these packages to the latest version?
Most of the files in projects created with the dotnet new command are simply hard-coded in the template. So if you delete them the only way to get them back would be to copy them in from somewhere else.
If you want to manage client-side libraries, then you can use any number of tools to help you such as LibMan or one of the many third-party alternatives.

Getting Error <location allowOverride="false"> while hosting WEB API 2 in Hostgator

I am using WEB API 2 its working in my local system,but when WEB API 2 run in Hostgator windows server its given me error below is my error screenshot
http://prntscr.com/bc5ihv
As I commented, I got similar problem while hosting web api on shared hosting.
The solution is to remove Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and clean and build
You can deploy even without Roslyn with no change in code. Open NuGet Package Manager window and uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and rebuild & republish. This uninstallation also removes CodeDom configuration from web.config file. This will solve your purpose. Basically this will not generate any csc.exe, vbc.exe files inside bin folder.
I got it from here

VB.NET Azure deployment has no /bin but has a nuget package

I've just published (via GitHub) a VB.NET Azure Website that works fine on local machines but not on Azure:
Compiler Error Message: BC30451: 'Newtonsoft' is not declared. It may
be inaccessible due to its protection level.
Dim category As Category = Newtonsoft.Json.JsonConvert.DeserializeObject(Of Category)(json)
The Newtonsoft.Json package is installed via NuGet: Newtonsoft.Json.5.0.5.
It's the only 3rd party dll in the project right now.
I used the Azure ftp access to browse to /site/wwwroot/ and noticed that there is no /bin directory.
Now, my .gitignore excludes [Bb]in and [Oo]bj folders, but it's the same .gitignore I've used successfully with c# projects and always assumed that Azure just fetches the missing nuget dlls from /packages.
This is my first VB.NET > GitHub > Azure Websites deployment. What have I missed?
edit: I can confirm that if I upload /Bin/Newtonsoft.Json.dll via Azure ftp the site works. Or at least it will until it's re-imaged...
Sounds like you've not enable "NuGet Package Restore".
By doing so this creates a .nuget folder at the root of your solution and a packages.config file in the application that the build process in Azure will pick up and load the required references from.
Right click on the solution and it should be an option in there.

What effect does the new precompile during publishing option have on MVC4 applications?

So I recently updated Visual Studio 2012 to Update 2. Lo and behold, the next time I go to publish my application (via File Publish in this case) I notice that there are three new options:
Delete all existing files prior to publish
Precompile during publishing (with a link to Configure)
Exclude files from the App_Data folder
The first and third options are pretty self-explanatory, but I can't find any documentation on the second option as it applies to MVC. When I check it, there doesn't seem to be any change in the files produced on the site and I don't see any real change in performance.
Using the ASP.NET precompiler can have the following impact on your MVC app:
If you have anything in App_Code, it will be precompiled into a DLL before deployment. Without precompiling, this would happen on the fly by the ASP.NET runtime.
If you choose the option to not make your pages updateable (i.e. uncheck the first checkbox in the advanced settings dialog), it will also precompile your views (ASPX and Razor) instead of compiling those dynamically at runtime as well. The default (checked) setting of "Allow precompiled site to be updateable" allows you to update your view content without needing to rebuild the entire project.
If you don't have any files in App_Code and you want your site to remain updateable, it doesn't seem to do much.
It is an old question, but I just encounter similar issue and feel something worth sharing.
My error message is same in this post. My project is MVC5, build with Visual Studio 2013 professional.
Compilation Error: The type 'ASP.global_asax' exists in both DLLs
In my case, with precompile option, there is a file, App_global.asax.dll, in bin folder, and cause above error message.
First, I remove App_global.asax.dll on server, restart application pool, issue is gone.
Then I tried another approach, uncheck precompile and republish, redeploy to server, issue is gone.

How to create Web Deployment Package for IIS WebSite and use standard manifest/parameters

I have various IIS hosted service hosts with simple svc files etc. What I want to do is to be able to create deployment packages from our test server using IIS Export Package in a way that parameters may be saved and picked up at Export time so that the Export is repeatable and automatable. I.e. the Export will always use the necessary Manifest extensions such as XmlFile etc.
The web sites exist in the solutions and are then picked up using a Web Deployment project in each solution so that config substitutions are done etc.
We are currently on VS 2008 SP1 so do not have direct access to VS 2010
The first issue I have with MsBuild (running in TeamCity) is how to build the IIS web site (with target=Package) when there is no project file? In this way maybe I can avoid the Web Deployment projects (I use them for various configurations but don't want to do it this way for deploying to Production but rather export from our fully tested staging into a package file to be imported onto a production server).
Secondly, I want to avoid having to configure the Export in IIS 7 each time I run it. I want it simply to pick up the correct set of extensions to use and create the necessary parameters for me. Is this done from a Manifest file? I can see how to use the parameters.xml but I am unclear whether I need to use a manifest.xml (created by hand) and how to link it in. The idea is that a tester/deployment person should be able to do the Export simply without having to enable all of the extensions that are required
Any help or guidance will be greatly appreciated.
Ok, in the meantime I got it figured out.
I ended up using the document at Package an Application for the Windows Web Application Gallery which gave me the means by which I could extend our automated build in TeamCity to create the "repeatable" export packages.
In short I will use the current Web Deployment Projects to create the deployment artefacts and then in MsBuild combine them with the pre-prepared manifest.xml and parameters.xml files into Build artefacts folder and zip them up into a package. From there the task will be to Import the package into IIS Deploy in the target environment.
The parameters.xml file will be used to set the HostName for wcf clients and services, connection strings, app settings etc.
This turned out to be the best solutuion bcause I can put it into our automated build.