.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Cannot publish files in root directory?

Posted By:      Posted Date: October 17, 2010    Points: 0   Category :ASP.Net

Hi Everyone,

I have a website(not an application) built in VS2008. When I try to publish the site, any of the files that are in the root folder are not published. This has only just started happening and I am unsure what I have changed to cause this. The files are not excluded from the project.

Thanks for the help


View Complete Post

More Related Resource Links

Polling FTP-Server and downloading files to our local directory on regular intervals

Issue regarding downloading same file again and again. Let me be clear, I am using SSIS to poll FTP Server on regular intervals to download different files to my local directory. Once the file is downloaded I need to load the file name into table and validate that particular file name against FTP Server next time when I am polling, so that I don't download same file again.                              Question here is how could I implement this either using SSIS or VB Script ???

Redirecting default.aspx to root virtual directory

I have a simple ASP.NET 3.5 application running under IIS7 under a virtual directory. So the URL of my app is like http://site.com/app. I want to 301-redirect the request to site.com/app/default.aspx to site.com/app for better SEO. I have to do this redirect through code only, not by any IIS settings. I am unable to do so via code mentioned in this article:http://www.4guysfromrolla.com/articles/072810-1.aspxThe code:if (request.RawUrl.Equals("/default.aspx")) { newUrl = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Url.Authority, request.RawUrl.Remove(request.RawUrl.LastIndexOf("/default.aspx", StringComparison.OrdinalIgnoreCase))); context.Response.Status = "301 moved permanently"; context.Response.AddHeader("Location", newUrl); } seems to go into an infinite loop when the application is under a virtual directory. the request.RawUrl property always returns "/default.aspx" even after a 301 redirect causing the infinite loop. How can I fix this issuhttp://forums.asp.net/AddPost.aspx?ForumID=27e?

Web Service Unable to access Directory (Temporary ASP.NET Files) CS0016

QuestionMoving web service to a production level server. This is not a new server, but is new to running an ASP.NET 2.0 web service. No other websites or services existed on this server.

Installed .Net 2 and specified that ASP is registered for 2.0 using aspnet_regiis. Installed missing components such as Front page extensions. When I try to browse to the services asmx page I get the error saying that the process has a compilation error and cannot access the asp.net temp directory under the 2.0 Framework. I looked at the directory and it appears that the asp.net process and others have correct access.

Note a basic asp.net page will come up as well as a basic html page.

All comments are welcome.

  • .Net 2
  • ASP.NET aspnet_regiis specifies .Net 2 as root
  • C#
  • IIS6
  • Windows Server 2003 SP1

What is the difference between Shared Feature Directory and Instance Root Directory?

Anyone know the difference?

uid.sbmp.tmp files on SSAS temp directory


Hi, We browse a cube thanks to the Microsoft datapump and after a benchmark I notice the process msmdsrv has 2000 handle count.

Thanks to Process Explorer I know that this is the *.sbmp.tmp files stored in the temp directory.

Someone know what is these files?



Progrmmatically Creating the Asp.net Page and save it to the root Directory


Hi all

Please tell me How i solved  probelm of dynamic creation of aspx page on fly and save it to the disk or root direcotry of the Project.

Any link or Article is highly Appericiated.


Best Regards


How to make VS publish ism, ismc, dat files.


Smooth Streaming requires .ism, .ismc, .dat files to make the Silverlight video player page work.  If the "Only files needed to run this application" is selectd in the "Package/Publish Web" tab, these files are not published. Now I have to select "All files in this project" to publish them but this is undesirable because it also pushes all the source code files to the server. 

Is there any way to specifically tell VS that .ism, ismc and .dat files are required to run the application?

Any tip would be greatly appreciated.

File.Copy to Program Files Directory.

I searched high and low and have found some discussions on this topic but do seem to see any solutions.   So here is my issue.   I have an application that will copy 2 files to the Program Files directory.   What happen is, when I run it and the files exist (this should be what normally happens) I get accessed denied.   If I try to do a File.Delete (in code) first I get an access denied, however I can manually (in OS windows explorer) delete the files and then the copy will work.   I am running the application as Admin, so permissions to the folder are good.  

The application is restoring a 3rd party software file that tends to get corrupted a lot.   We have mechanism that will back this file up, but when I try to restore it I get the problem described above.   (not a file lock issue, I have made sure no programs have a handle to the file)

OS = Vista32
Program written in C#

Is there anyway of accomplishing this?


Programmatically copy all files from a SharePoint Library to a local directory on the server with an


Through the use of an event receiver I am trying to copy all the files in a document library to a local folder on the server.  I am finding examples of how to upload but none to download.

Can someone show me the code or have a good reference for me?


Getting files from a directory in a server


Can someone help me with moving files from a server to another server. Ive tried using the FOREACH loop container, but it seems that the files have to be on the same server to use a flat file enumerator.

My issues is I have Server A, and Server B. I need to pull files from a folder in A onto B, B has SSIS on it. I tried creating a connection manager to the existing folder on A, but I cant seem to use it in the FOREACH container.




You are so wise...like a miniature budha covered in fur. -Anchorman

Exclude some files or directory to require authentification in an asp.net forms authentification pro



I have an asp.net which requires forms authentification, which i configured in the root web.config file

My problem is that i want some aspx.files be accessible without requiring to authentificate


Is it possible ? In the web.config file ? IIS ?

Or do i have to put them in a special directory ?  

When using a custom theme, there is no custom files added to "_themes" directory.


I've been working on customizing some Sharepoint 2010 Team sites and have read through many helpful articles on how to create and edit custom themes. The most consistent method is to create a base theme in Powerpoint which I've done.

I then install this THMX file in the themes library and apply it to my pages which seems to work as expected. The one inconsistency with what these articles say and what is happening on my end is that there is no numbered directory created in the "_themes" directory when I view All Files. These articles explain that this directory is created every time you apply a theme to your site so you can further edit the images and CSS associated with the theme. All I see in this "_themes" directory is "Custom.thmx, CustomPreview.thxm."

Is there some site setting or permissions issue I should look into to have this directory available to me?


System.UnauthorizedAccessException when enumerating files in directory




as the title says, I've been getting a System.UnauthorizedAccessException when enumerating the files in a directory. The exact line that throws the error is:

string[] files = System.IO.Directory.GetFiles(path, "*.htm*");

My first thought was that I had insufficient NTFS privileges on the directory, but the error kept occuring even when I granted Full Access to Everyone. Running the program as Administrator (Win 7) produced the same result. Googling didn't give me any other ideas either. Anyone have a clue what the problem could be? Thanks.

COM+ Application Root Directory being ignored


I work on an application which runs in dllhost.exe, configured as a COM+ server application, containing a mixture of 32-bit native code dlls and .NET assemblies.  The Application Root Directory is set to a folder containing an application.config and the binaries.  This has worked fine under 32-bit Windows XP, Vista (and before that 2000 and XP) on many different systems.

I've just had my laptop upgraded to 64-bit Windows 7.  I created the COM+ application and build folder the same way I always do, but have errors starting up the application - it can't locate the assemblies or application.config file.  Using Fusion Log Viewer I can see that the AppBase is set to c:\Windows\SysWOW64, not to the Application Root Directory configured under the COM+ app.  I've verified that the root directory path is correct, but for some reason it's not taking effect, the root is set to the default root of dllhost.exe that the application is running under.

One of my colleagues has this environment working on 64-bit Server 2008 R2, but I'm the first one to try on Windows 7.  Has something changed in the COM+ configuration that affects the Application Root Directory setting?

Calculating the size/files count of a directory (including subdirectories)




I've been told that the fastest way to calculate the size/files count of a directory (including subdirectories) was something like this:

                ProcessStartInfo startInfo = new ProcessStartInfo("CMD.exe");
                Process p = new Process();
                startInfo.RedirectStandardInput = true;
                startInfo.UseShellExecute = false;
                startInfo.RedirectStandardOutput = true;
                startInfo.RedirectStandardError = true;

                p.StandardInput.WriteLine(@"dir " + this.Path + " /s/-c");

                string output = p.StandardOutput.ReadToEnd();


And then reading the sums somewhere in the end o

Directory.GetFiles with searchPattern to get all *.dll and *.exe files in one call


Hi experts,

is it possible to use Directory.GetFiles with searchPattern to get all *.dll and *.exe files in one call?




Directory.GetFiles throws System.IO.IOException: There are no more files


We are having problems with the Directory.GetFiles method in our production environment.  We have a console application that is started every 5 minutes 24/7 and it runs fine, but once in a while we get the following exception:

System.IO.IOException: There are no more files.

  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
  at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
The exception occurs on the folowing line:

string fileMask = "*.xml";
filenames = Directory.GetFiles(dataFolder, fileMask);

The documentation of that function clearly states that if no files are found, the function returns an empty array, and it does so in 99,999% of the cases.

Some background information:

The program runs and reads on the local D drive of a virtual W2K3 clustered machine.  That D drive is swapped between cluster members during failover, but at the time of the exception no failover is taking place.

As the problem on

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend