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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

c# n zip files

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :.NET Framework
I want to get all file and folder information inside .zip file using visual c# code without extracting .zip file.

View Complete Post

More Related Resource Links

Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

SharePoint document migration challenges when migrating files and folders

There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.

Combine, minify and compress JavaScript files to load ASP.NET pages faster

Websites are getting more interactive these days and most of this interactivity comes from JavaScript. People are using different JavaScript libraries and frameworks to make their websites more interactive and user friendly.

PrintPocketCE Print Pocket Excel, Pocket Word and email files

Version 3.560 (May 15, 2009):

Important bug fix: a slight difference in how some devices create fonts was causing a few devices to have significantly longer print times for large print jobs.

Adjusted PocketJet printer paper feed commands

Other minor fixes and enhancements.

Version 3.559 (Mar 5, 2009):

Added support for Martel MCP78xx printers

Version 3.558 (Aug 20, 2008):

Added support for Martel MCP78xx printers

Version 3.557 (June 27, 2008):

Fixed error in Canon printer support

Fixed COM0 port selection

Version 3.556 (June 15, 2008):

Added support for Brother MW-260

Added support for Sato MB400

Version 3.555 (Aug 8, 2007):

Added support for Pentax RuggedJet 3 and RuggedJet 4 printers

Changed Epson TM-P60 support to maximum page width of 1200 dots

Version 3.551 (Aug 1, 2006):

Added Peripheral Nomad printer support

Version 3.550 (Mar 23, 2006):

Added Panasonic JT-H200PR printer support

Added Pocket Spectrum printer support

Fixed problem with WM5.0 "inverted image" problem

Conversion of text files from ANSI to UTF-8

reading and writing text files in ANSI format and
writing html-files in Charset ISO-8859-1 (Western Europe).

How to transfer files between computer and mobile device using bluetooth

What is Bluetooth? How can I have it on my computer?

Bluetooth wireless technology is a communication technology that allows two devices to communicate wirelessly. Most of the notebooks are nowadays equipped with bluetooth. For those notebooks or computers that don't, you can use a bluetooth dongle to add the functionality and it just costs you around $5. Although higher price range bluetooth dongles are available but it makes no sense of buying them if you just plan to connect your mobile device to the computer. Look for one that has Bluetooth v2.0 + EDR (Enhance Data Rate) supporting speeds of upto 3Mbps and with Vista support. You can easily have one of that kind in just $5.

Setting up bluetooth to work on your computer

Just Insert the bluetooth dongle in the USB.
It should get detected by your Operating System and should be ready to use. In case it is just detected as a new hardware, you need to install drivers for it that came with your bluetooth dongle (You can try Google to find the drivers).
Once drivers are installed, a bluetooth notification icon will appear in your system tray.
Right Click on it to access Settings (This may vary with your bluetooth dongle).
Make sure you have turned Discovery On (It allow others to see your computer).
Switch On the bluetooth on the mobile device.

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


Printing resource files



I have some resource files for localization and would like to print them. When I try to print them in Visual Studio (with File -> Print...) the button is disabled. Does anyone know how to print them? (Without copying each into word or excel)

Thanks and regards,

Wrong Account being used to access files - Help - No Impersonation


I run a simple .aspx website on a Windows Server 2008 machine.

There is NO impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns NT AUTHORITY\NETWORK SERVICE, which it the account which the application pool runs. In my web.config, I have <authentication mode="Forms">.


I tried to test the security of the application and server by removing file permissions to the .aspx files. I was greatly worried when the website continued to run without problem (it should not have been able to read the .aspx files).

By turning on file level auditing, I discovered that the .aspx files were being read by the machine$ account (if the machine is called Serv1, then the files would be read by the Serv1$ account, which seems to have access to all files on the local machine).


Is this a security breach or is this behaviour by design ?

Please can somebody assist, as I am worried.

Disallow Direct Access To Files



Here is my dilema, on my site i have a WordPress Audio player (http://wpaudioplayer.com/standalone) that plays my mp3's.

It loads the Mp3's in by javascript...example below:

       AudioPlayer.embed("audioplayer_7", { soundFile: "/Files/Music/[name of file].mp3" });

This file name is clearly visible in the browser source. Not a problem, however this means that any user can legitimately browse to the file directly and download it.

Now i still need the mp3 player (which is flash) to have access to the file but if a user was to try accessing the file directly, they would not be allowed access to it.

I am not sure how to go about this, i am circling the idea of a httphandler but not sure if this is sufficiant to stop the direct access to the file.

Any help would be appreciated

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

reading values from config files in NUnit tests


One of my NUnit tests has to read in some values from config files.  In my main application this process works perfectly well, however when I run the unit test, the code that reads in the values from the config files doesnt read anything in.  Ive tried putting app.config in my unit test project (I even tried web.config) but nothing seems to work.  Are there any special steps involved when reading from config files in an nunit test ?

NUnit and config files


Ive created an NUnit test project in my solution and have added 3 tests.  They all fail with the same error

SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.
  ----> System.NullReferenceException : Object reference not set to an instance of an object.


SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.

  ----> System.NullReferenceException : Object reference not set to an instance of an object.

heres the test method

        public void CreateDataContext_ConnectionString_ReturnsDataCon

Translating RESX files


So I took the Forums advice and made a separate RESX file for each ASPX page in my web app. Personally, I wanted to put all of my language strings into a single global RESX file, but instead I did it the 'right' way and made a separate one for each ASPX. So now Ive got about 100 different RESX files with 5 to 15 short strings of text each. Many of them are repeats. The question is, how can I export these 100 RESX files into one single spreadsheet that I can send off for translation to other languages? Whats the normal way to do that? I dont want to send the translating company 100 little files, I'd rather send just one big one. And I'd like to omit duplicate text strings (for example, "Cancel" appears in at least 50 of the RESX files - I dont want to pay for that word to be translated 50 times).


Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

Advanced Basics: Office 2007 Files and LINQ


LINQ to XML and the Microsoft SDK for Open XML Formats simplify access to the parts of a 2007 Office system Open XML document when retrieving or modifying data, resulting in shorter, less complex code.

Ken Getz

MSDN Magazine March 2008

Office Space: Building Office Open XML Files


This new column explores how you can extend and customize Microsoft Office System applications and file formats.

Ted Pattison

MSDN Magazine February 2007

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