I have made some changes to .cs file and copied the file into server where web application is hosted. But the changes I did are not reflecting. Please suggest a solution.
I tried copying .cs file alone also copied entire application files.
Did IISRESET and app pool recycle as well. But nothing works.
Most of the time when you're dealing with .cs files, you need to compile and copy the results of your build to the webserver. A combination of the .aspx/.cshtml files and bin directory including the .dll files
Here is a procedure that you can follow.
Create the app_offline.htm file on the root of your site, so the site will be off
Upload the updated files.
Now when you upload your files, if you have an Updated DLL, for your bin all is ok. You can even copy at least one dll on the bin, even if its not updated.
If you do not have that, update the web.config even with an empty line on the end, to give a signal to the site that needs some update.
Rename/remove the app_offline.htm from root and make the site online again
Related
I am currently getting this when visiting my http:// websitehere.com/excelData.aspx page:
This is a marker file generated by the precompilation tool, and should not be deleted!
The file system directory on the server looks like this:
--mainDir
|--excelData.aspx
|--PrecompiledApp.config
|--Web.config
|--bin
|--App_Web_cuydkh1j.dll
|--exceldata.aspx.cdcab7d2.compiled
Not sure what I need to add/remove in order for it to display my page without that precompilation tool text on it.
The IIS server is version 6.1
One of the reasons for this problem is the file PrecompiledApp.config is missing from the root of your site (this file is generated by the publishing wizard).
Hope this help others.
Problem:
When you upload the web application, sometimes the most important files in the bin folder (e.g., the .dll files) will not upload correctly.
Solution:
Re-upload the bin folder. Remember to overwrite.
Make sure the site is configured as an application on IIS
I want to backup my existing ASP.net web app before updating it.
Therefore I create a backup folder inside the website (ie same level as App_Code, web.config). Call it something like Backup_20110910
Then I move all the current website files/folders (excluding web.config, app_data) into the backup folder.
Then I extract the zip of the latest code in the now clean folder.
Is there any potential problems with this approach? As after all, you are increasing the number of csharp files in your website folder, could there be conflicts etc.
I wouldn't back up within the folder structure, there's a possibility that someone then finds your backup folders and browses to them, running the older code. If you zip it then you suddenly have files someone can download too. Even more amusingly if, as a lot of people do, when you change web.config you rename the old one to web.config.bak a lot of security scanners look for that because now it can be downloaded, as it's no longer a .config file, but a .bak.
Backup outside the web root, not within and all of those worries will go away.
There won't be an issue - except that it might become confusing to have identical folder structures within the current folder structure - it's always wisest to keep backups completly seperate from the current build
I just completed a website that is image heavy and I'm publishing the site to an FTP server. The publish time takes ~5 minutes. Is there a way for me to configure which file types get published? I'd like to push out changes only if the file extention is: (.config, .aspx, .cs, .asmx, .js, .html, .css, .master).
Is this possible?
No, the publish process publishes the whole website.
Publish it on your local computer first and then use an FTP tool (Filezilla, CoreFTP...) to selectively upload your files to the server.
Unfortunately No, it is not possible. Publish operation is either-all-or-none operation.
Even though, I sometimes only copy the DLL assembly (from bin directory to IIS website folder) if the change is only in the code-behind files and the markup/images/other-content have no changes.
you can set the Build Action for whatever you don't want published to None
These won't get copied to the deployment directory
I have just confirmed that it works (I tested on a MVC3 site)
so you'll have to change the setting for each file you want to exclude but you can change the setting of multiple at one time and folders can't be excluded
In my website when deploying production most of the time I only need to deploy bin folder and just marker files if new pages added.Since my website contains gigabytes of images folder and static stuff not updates frequently, it takes ages to complete a one publish cycle in visual studio website publish feature is there workaround to overcome like excluding these static folders when website publishing
Thanks...
You could use the Web Site Copy Tool - deploying a web site using this tool only updates the files that have been changed.
After you connect to the remote site, each file will have one of the following statuses.
Unchanged
The file has not changed since the last time the file was copied.
Changed
The file has a timestamp that is newer than the timestamp taken when the file was last copied. If the same file has been changed in both the source site and the remote site and you synchronize these files, the tool prompts you to indicate in which direction you want to copy.
New
The file has been added since the last time the site was copied.
Deleted
The file has been removed since the last time the site was copied. These files are shown only if you select Show Deleted Files. If you synchronize a file that has been deleted in one site, the tool will prompt you to indicate if you want to delete the file from the other site.
See this article for further information
I don't know if there is another way. But if you make the folder hidden in the file system, then it would not be published.
I'm new # linq and can't find anywhere where it mentions if the dbml or other files are necessary to deploy with a website.
Just use the Publish command on the web site. It knows what needs to be deployed.
That's actually compiled into the dll generated for the site, so even if you deploy your site with all the files if you change any of the .cs or .vb code files directly on the deployed folder nothing changes, the only things that you can alter and change the behaviour of the website are the .aspx, .master, .css, .js (and some other non compiled files)
Notice that you deploy with the option "Only the Necessary files", those pages won't even go to the deploy directory.