Last post Jun 18, 2018 08:10 AM by villamouri
Jun 13, 2018 06:11 PM|villamouri|LINK
I have a web project written in .NET 3.5, on Visual Studio, which I have been supporting for a number of years.
I always deploy this myself using FTP. The project compiles to a single DLL file, which I put in the bin folder on web server. I then put the .aspx pages in the appropriate folders. I do NOT put the source code across. I am happy with this way of doing things.
I find that there is little start up time on the app, and if I replace an aspx page on the fly, nothing is affected eg page lag.
I have a new web app built with .NET 4.5.
In the bin folder, I now find other files along with my DLL.,
eg folder called Rosyln, files called Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll, Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml
The app is running OK but..
One thing I find is that if I FTP up a replacement .aspx file, any request to a different page then takes a few seconds.
OK.. to my question... I would ideally like my 4.5 project to be deployed identically to my 3.5 project. That is, a single DLL file to FTP, plus the .aspx pages as needed, and hopefully get round the 'initial request lag' which I don't get on 3.5
Is there some setting I need to make it behave the same, and do away with the other stuff in the bin folder? Thanks
Jun 14, 2018 07:16 AM|Brando ZWZ|LINK
As far as I know, after NET4.5, the VS template will use the Roslyn by default.
The Roslyn is a set of open-source compilers and code analysis APIs for C# and Visual Basic .NET languages from Microsoft.
If you don't want to use Roslyn, you could try below steps to remove it.
1.Remove Nuget Packages:“Microsoft.CodeDom.Providers.DotNetCompilerPlatform” & “Microsoft.Net.Compilers".
Run below command in the Nuget Package Console.
2.Delete below codes in web.config.
<system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" /> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" /> </compilers> </system.codedom>
Besides, as far as I know, when you republish your project to IIS and access the page firstly, the IIS will copy the page into the temfolder.
This may cause the delay.
Do you access that page delay each time when you acccess the that url?
Jun 14, 2018 07:54 AM|villamouri|LINK
Many thanks Brando for the info re removing Roslyn, I will give that a go.
As for the delay, I have found that if I put an .aspx live via FTP, then any other request to a different .aspx file causes a delay (just one time).
As it happens, my system hosts several web sites for my clients, all in their own directories, but running the same dll. It is a bit of a drag that if I put an aspx file live in one directory, it causes the next request for another site to delay, perhaps
4 seconds. I didn't come across this on my .net 3.5 project.
Jun 18, 2018 05:22 AM|Brando ZWZ|LINK
As far as I know,if you modify the Bin directory, it will cause the IIS immediate recycle the application pool.
When the IIS find the page is changed, it will auto compiled again and copy the temp file into templated file.
So no matter asp.net 3.5 or 4.5, it will recycle the application pool and should have a delay for accessing the page.
I guess you may have configed the precomplie for the web application in asp.net 3.5 but not in the asp.net 4.5. So it will show this delay, I suggest you could also check the publish setting for different project.
More details, you could refer to below article.
Jun 18, 2018 08:10 AM|villamouri|LINK
Thanks Brando for the information, much appreciated.