Compiling a 6GB site - asp.net

This morning I moved a .NET website from our local server to live (not pre-complied). When I go to the url the sites hosted on the browser starts loading the site and has been doing this for the last hour. I presumed it is compiling the site and its just taking a while because of the size of the site. Is there any way to check if this is definitely the case and there's nothing else happening?

Put your images in a spearate folder, not in your virtual directory for the application.
# ck. You obviously haven't used Umbraco before because Umbraco cannot be hosted in a virtual directory.
Umbraco bin zip comes with the site precompiled. I am assuming the reason your site is compiling is because you have ascx usercontrols with ascx.cs files. Maybe some App_Code .cs files.
Put those in another Web Application project. Compile it, and just move the .dll and .ascx files over to the appropriate directories.

Put your images in a spearate folder, not in your virtual directory for the application.
I.e.
Default Web Site
- Picture folder (5.8GB)
- Application virtual directory (small application)

Related

Does deploy of a pre-compiled IIS site show faster first load times?

Using the asp.net compiler I have compiled a site with aspx pages. The contents of the pages have been replaced with placeholder text and the bin folder now contains multiple App_Web_*dll files. There are also multiple *.ascx.hash.compiled files.
I've copied this folder to the webserver and deployed by creating a Virtual Directory that points to this folder. The site works but I am not seeing any improvement in first load times.
When the first aspx is requested, the IIS asp.net cache is rebuilt in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files. This is as time consuming as dynamic compilation of source files. It almost seems like the site is being recompiled. The layout of the IIS asp.net cache is different from the site folder. There are App_Web_*dll files in the cache folder but different names compared to the site.
Am I missing some configuration to get this working right?

From what parts does the built Asp web forms application consists?

Can't google with a success an info about: from what parts does the built Asp web forms application consists? In a Debug folder I see only dlls, but as far as I understand the aspx pages and a web.config file should exist. Any links?
The BIN folder contains the compiled code behind. The ASPX pages and web.config stay in the same place, the root directory of your application.
Further reading:
ASP.NET Web Project Folder Structure
How to: Publish Web Application Projects
Asp applications, unlike windows forms applications need to be published first.
Right click on your project and click publish. From there pick file system option and publish to wherever you want on your computer.
Those files are the ones you upload to ftp server.

Where does IIS look for files

Can anyone explain, please, exactly how .net works. I create a web site in Visual Studio and publish it to a local server to a folder at
D:\WebSites\Project1
I create a web site in IIS and provide the address of the folder containing the files for the web site. When I publish the site, using 'fixed naming and single page assemblies', all the .aspx files go in the folder on the D drive and a dll for each page goes in the bin folder inside that folder.
I would assume that when someone wants to view a page in their browser, IIS retrieves the file(s) required from the folder specified, they get processed and turned into html and sent to the browser.
Recently when someone clicked a button on a page that calls a web service - a file not found error was reported. Apparently
C:\Temp\bx5tn2js.dll
could not be found. The thing is - why did IIS decide to look in C:\Temp for a file?
And, in the error message was a load of references to xml serialization. What is being serialized?
This file looks like the compile files that asp.net generates on compile.
This folder can be setup on web.config on compilation session with the
tempDirectory="C:\Temp"
If you do not have set this option asp.net is use a default folder that is usually inside the asp.net directory, inside the windows folder. But if you have set this, and this folder did not have the correct permissions, then asp.net fails to compile the project, and you can get a message like that.

asp.net manual copy to server

So I just got a site hosted at hostasp.net. In VS I'm working with a web site not a web application. In the control panel on the host under my site I have folders (data, logs, wwwroot). My current project only has 1 javascript file, 1 aspx page, and a web.config. I placed Default.aspx & web.config directly under wwwroot. In VS my javascript file is in a subfolder named Scripts so I created this subfolder on the host site and placed my javascript file in there.
When I access my site I get "Server Error in '/' Application." error. What am I messing up here?
Also if I have a code behind file, where do I put that? Should it be compiled somehow? When I built the VS project it doesn't give me any dll for it or anything. Right now I don't have anything in the code behind but just wondering for later if I do.
If you are using Visual Studio:
You can certainly just copy the files to your live server. Your "code behind" files will be compiled at run time.
You can Publish a Web Site or Web application so you have the option to pre-compile (to dll) all your code (and will be in /bin folder).
If you want to remove the "guessing" of which files you need to "push" to your live server. You can publish to your local file system or directly to FTP. VS will pre-compile your Web Site or Web Application, and "collect" all the necessary files that make up your web site/application and save it in the folder/FTP site you designate.
If you chose to publish to file system, then all you have to do is copy/ftp (whatever) to your live site. You might ask why even publish to local (first) only to FTP it anyway? So you can get fully acquainted with how all of this works - the different publish options, etc. locally (which is essentially the exact structure of your production site).
Publish Web Site (VS):
Publish Web Application (VS):
The only time this may not work is when your host doesn't have the "bits" that you might have. E.g. not all hosts may have the latest/greatest from Microsoft, like say, Web API and all the assemblies it entails.
But again, the tooling can help with Add Deployable Dependencies...which does and when you publish, the dependencies are all "bin deployed" (meaning they'll be in the /bin folder):
Hth...

IIS 6.0 web application - Does the entire "website" need to be an "application"?

I had a website hosted in IIS. One small section of it needed asp.net. So I just right-clicked that section/directory and made it an application and a virtual directory.
Is that alright? Or does the entire "website" need to be made into an application and virtual directory?
The reason I ask is that when I try to browse to the aspx page in this "application", I am getting a parser error message "Could not load type...MyCodeBehindType" in the page directive, which seems to me to indicate that it is not finding the dll's, or even the code behind class files (which are clearly in the same directory).
EDIT:
If I do it this way, with only a subfolder of my website actually being a web application, where do I put the dlls? In a bin folder of the website the web application is within? Or in a bin folder of the web application?
Making just a folder within a website, an application, should be fine. I usually have to remember to change the version of ASP.NET from 1.1 to 2.x, that may be what's causing the error.
In order to test the configuration, start with a blank test page (blank.aspx) with just HTML. If the HTML shows up, you know IIS is serving .NET pages.
If there is a problem with ASP.NET not being correctly registered for IIS, you could try re-registering it. Open the following folder:
%WindowsDir%\Microsoft.NET\Framework\x.x.x\
and run:
aspnet_regiis.exe -i

Resources