Which files need to be deployed on IIS when you republish code? - asp.net

I have an ASP.NET application with published code running in IIS. Now I've made some changes to the application pages and republished the code.
Which files/folders do I now need to redeploy on IIS?

It depends, if you've made changes in C# class library, then you will need to update just DLLs. And if you've changed aspx or aspx.cs file the you will need to update that published page.

Related

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.

asp.net unpublishing

I published my web application to a folder , after I hosted that folder on a server,but my project codes are broken.Now I will republish(unpublisch) my application from the publish folder. I will see my aspx page's .cs codes.how can I see
you have no choice to unpublish your code. While you work on the project before publish u have to take the copy of the project. while publishing ur codes are converted to dll. no way to recover ur codes from the dll.

Refreshing auto-compiled code in iis 7?

I'm debugging som asp.net code on a asp-classic site. The layout is sporadic and chaotic - .aspx and .aspx.cs files are in the root directory of the site, some in the app-code folder, but not the relevant file).
My problem is that i need to implement the corrections to the .aspx.cs file. Replacing the file does nothing, and i thought i could just "recycle" the application pool in the IIS manager, but no cigar. The server still loads the same buggy code.
So: How do i go about clearing the auto-compiled binary for this code, and implementing the corrections?
Thanks a bunch :)
A full clean up for ASP.NET involves deleting all the temporary binaries
By default they are in ( depending on 32/64 bit and framework version )
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
I also recommend that you change the temporary folder in the machine scope web.config
If the site is pre-compiled, changing the aspx.cs file won't do a thing. You'll have to recompile the ASP.NET web application/web site project and copy the output .dll to the bin folder.

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

Asp.net dynamic compilation

With Asp.net web sites and ASMX web services, can some explain what can change once an application has been deployed.
For web sites, I can see that the you can change the aspx files but for web services, I am not sure what can be changed. Any real-world examples of where changing files and dynamic compilation is useful?.
JD.
After deploying the application you can change anything you want to in there. You can change .aspx pages, you can add / remove dlls from the bin folder, you can add / remove code files from the app_code folder, you can add remove stuff from the app_data folder, you can obviously add remove the .asmx files for the web service. I don't see any reason why you cant change anything. go ahead and try changing these things. When you run the code after changes the website will compile again automatically. The things i wrote are written considering that you have deployed the whole code for the website and not a published site !

Resources