way to excluding static folders like Images in publish website feature in Visual Studio 2010 - asp.net

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.

Related

Drupal Site configuration issues

Good day every one,
I am new in DRUPAL.
I am having problem with the drupal site.
I got the repository for the drupal site. I have successfully clone it and got every things and the database. I have uploaded the database to the local host server.
Now, I can see that initially the directory is like this
C:\wamp\www\test\site\docroot\sites\default\
Then when i first open the site through local host the directory automatically becomes like this
C:\wamp\www\test\site\docroot\sites\default\file
The "file" directory contains the empty folder of css, images etc/
which I believe is downloaded from the database for the first time.
The site is giving many console error like missing images etc.
Instead of having the empty folder in file directory there must be images and css files and everything I do not know what is wrong becs the folder should not be empty there must be files and and image sand css files and should be downloaded from the database when I first open the site.
Please help me to locate the problem.
Thank you very much.
Usually, you will put on git drupal core, modules and theme files.., basically everything except the files uploaded by user (admin). Those files are usually located at:
/sites/default/files
So, since they are not on git repo you need to copy them to your local environment from the working site (i.e. over (S)FTP).
If your "file" is not "files" dir I'm talking about then it's something specific to your site - don't know nothing about it.

Changes not working after deploying

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

Created folder in VS2012 is missing on the server

I have very strange problem and I don't even know why it occurs. Maybe I'm doing something wrong.
So i have created new website in VB2012. Then i've created new folder and uploaded everything on my host. But this folder is missing on the server. Why is that and how to fix it? Do i need to create desired folders on my host manually?
Folder named "photos" added in my website project
Folder is missing on the server when I upload that project
Empty directories are not published when using Visual Studio.
The top answer to this question regarding a similar issue suggests a workaround:
You need to create a placeholder.txt file in each empty directory if you want the precompilation tool to generate these empty folders. Failing that you can create a command line app that will create the folders in your post build events (but only if you are using web application project not web site project).
From my experience VS won't publish an empty folder. As a workaround we always put a dummy file in the folder to ensure that it gets copied over. Something like "placeholder.txt"

Backing up ASP.net website code files - to a backup folder under the website folder

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

Visual Studio 2010 - Partially Publish Web Site?

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

Resources