VS 2010 - List Files In Zip

Jun 30, 2011

In the app that I'm currently working on, users can upload zip files. I want to restrict the users from uploading exe files (or any potentially virus infected type of files).

I want to list the files inside the zip they are uploading, and check for file extension, and deny the upload if a potentially unsafe file is found. I've been searching on the net, I found examples that use java (like this one), but java is not supported in Visual Studio for a while it seems...

I am using Framework 4.0

View 14 Replies


Similar Messages:

SQL Server :: How To Open Different Types Of Files / Display All The List Of Files In Gridview

Aug 26, 2010

I am trying to open different types of files that I have uploaded on my sql server database. I would like to display all the list of files in Gridview. When user click the link it should open download dialog box and should be able to open its particular applications such as word, excel, browsers etc.

View 3 Replies

Visual Studio :: 2010 - Finding Assemblies In Program Files Vs Program Files X86?

Jul 3, 2010

I have a VS2010 project that I want to move back and forth between an x86 and an x64 machine. On the x86 machine, several assemblies are located in Program Files, and the path of the assemblies are shown as c:Program Files...... When I move this project to the x64 machine, the same assemblies are located in C:Program Files (x86).... Is there a way that I can confugure VS2010 so I don't have to manually change the path when I move the project from one machine to another?

View 1 Replies

New To ASP: Creating A List Of Directories, Followed By List Of Files?

Jun 7, 2010

I've created a page that can list Directories and Files but when you click on the file link it posts back to the main page for some reason. If you can point me in the right direction....let me know.

[Code]....

View 1 Replies

VS 2010 Published Files Won't Update

Jul 19, 2011

I updated my project and was finally able to get a specific section working correctly. I tested it in Debug mode and everything looks good.Now, I want to transfer those updated files to my server. I Published the files to my DropBox and uploaded them to my server, but they worked like the old files.

View 10 Replies

VS 2010 Deleting Temp Internet Files?

Mar 3, 2011

I had a page to update user picture and redirect user to login page, the problem is when a user re-login, the old picture is still available until user refresh the page.

notes: I have already use <%@ output> but not working with master page and also have used Response.Cache.SetCacheability(HttpCacheability.NoCache) and also not working

here is my code:

Protected Sub btnUpdate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpdate.Click
'Updating User Pic
fuUserPic.PostedFile.SaveAs(Server.MapPath("~ImagesUserPic" & UserID & ".jpg"))
Response.Cache.SetCacheability(HttpCacheability.NoCache)
FormsAuthentication.SignOut()
FormsAuthentication.RedirectToLoginPage("msg=Please login again")
End Sub

what can I do to delete temp internet files to display picture after updating?

View 9 Replies

Visual Studio :: 2010 Locking Files?

Aug 13, 2010

VS2010 keeps locking my .aspx files so I can't edit them. I have to stop the project, close and reopen the file. Is there a setting causing this (it doesn't happen on my home machine)?

View 1 Replies

VS 2010 - Secure Folder For Non ASPX Files

Jul 2, 2012

My client is moving from a linux to a windows shared server that uses the following:

Plesk Panel 9.5
PHP Version 5.2.13
ASP.NET framwork version: 2.0.50727.0

They currently are using .htaccess in several folders that make the user have separate credentials that relate to each folder.

Is there a way to do this on the new location using web.config? I tried using .htaccess but doesn't seem to work. I am able to get the .aspx files in a folder so if accessed and not logged in it goes to a login page.

If I have a bunch of .html pages in a folder, can I configure web.config so if someone goes to one of the .html pages direct it asks for credentials?

View 6 Replies

VS 2010 - Two Different ASPX Files But Same Code-behind File?

May 21, 2012

I have code that needs to run in two deployments. Let's call them deployment H and deployment W.

The code is already running in deployment H, and there's an aspx page and an aspx.cs code-behind file. The code is compiled for framework 2.0 which is the lowest common denominator of the two deployments. Deployment H has its own logos and styling which are coded in its aspx file.

Deployment W now wants to use this same page, but it wants its own logos and styling. There are also additional fields on the page that deployment H doesn't need.

I think it's easier to maintain one code base which is why I want the same code-behind file, but I am having trouble figuring out how to set this up in Visual Studio. Orginally, I was going to have two projects, one for W and one for H, but I'd have to make the same changes to both files when some of the common areas changes.

View 11 Replies

VS 2010 URL Rewrite Regex - Root Files Only

May 17, 2012

I am using url rewriting rules in my web.config and have it working but today I added a rule in a folder but my primary rule keeps overriding.

Web.config

Code:
<rewriter>
<rewrite url="~/folder/*_a_(.+).aspx" to="~/folder/index.aspx?id=$1" />
<rewrite url="~/*_a_(.+).aspx" to="~/listing.aspx?id=$1"/>
</rewriter>

Usage:

www.domain.com/topic_a_1.aspx -> This would load listing.aspx?id=1 which is great.

www.domain.com/folder/newtopc_a_2.aspx -> This is also loading listing.aspx?id=2 but should be loading index.aspx?id=2

I believe I need to change the second rule from *_a_... to something like [^/]_a_.... but that doesn't work.

What I can do so the second rule doesn't override my sub folder rules?

View 2 Replies

VS 2010 - Publish Web Doesn't Copy SVG Files

Mar 7, 2012

How can I tell Visual Studio to copy .svg files when I publish from the "Publish Web" dialog (right-click on Project and select "Publish...")? It's copying all other image files to the target directory, but is not copying .svg files.

View 3 Replies

VS 2010 - How To Parse Excel Files Data In WebForms Using C#

Nov 14, 2010

how to parse excel files data in ASP.NET WebForms using C# or ASP.NET MVC using C#?

View 8 Replies

Visual Studio :: 2010 Missing Web.config Files?

Aug 9, 2010

I just moved into a new computer running Windows 7 pro, and I installed a new copy of VS2010. Now all of my old sites that I made in VS2008 do not have their web.config files. Does anyone know what happens to them in VS2010, or Windows 7?

View 3 Replies

Visual Web Designer 2010 Express Not Recognizing Access MDB Files?

Aug 31, 2010

Withing Microsoft's Visual Web Developer 2010 Express, I am trying to link an MS Access 2000 database to a web form using the Toolbox tool provided with the program. In the second dialog box where you specify the database to use, it shows that the Data_App folder is empty, yet in the windows explorer window the file is clearly there.

Is this a limitation of the evaluation version, too old of Access database file, or something stupid that I am doing? I gotta admit, I am a newby to .NET and ASP.NET, but I can create other aspx web forms with no problems.

I can connect to the MS Web Server, for instance.

I'd use MySQL, but it doesn't want to work on my computer.

That is the other post I made to Bytes.

View 2 Replies

Visual Studio :: Enable .asp Files In 2010 Website Project?

Nov 11, 2010

how I can enable .asp files in a simple VS2010 Website project? For example: Start VS2010 Click "File/New Web Site..." Accept defaults Add an html file called "Test.asp" Attempt to open Test.asp (debug project with that file active) and you get the following error: "This type of page is not served. ... is not server because it has been explicitly forbidden. The extension '.asp' may be incorrect " SO, HOW DO I EXPLICITLY ALLOW IT? VS2010 is using the ASP.NET Development Server....

View 2 Replies

Visual Studio 2010 - Apply Intellisense In .skin Files In 4

Nov 25, 2010

Is there a good way to apply intellisense in .skin files in ASP.NET 4? like a microsoft visual studio tool for example? I installed an intellisense schema for .skin files to my visual studio 2008 long time ago but it had some bugs so i had to remove it. any improvements in visual studio 2010?

View 1 Replies

C# - App_Code Files Are Ignored (Microsoft Visual Web Developer 2010 Error)?

Feb 19, 2011

I have a 'Connection.cs' file in the App_Code folder of Microsoft Visual Web Developer 2010, but it alerts me of an error:

The type or namespace name
'Connection' could not be found (are
you missing a using directive or an
assembly reference?)
('Connection' is the name of a class in the Connection.cs file)

[Code]....

View 1 Replies

VS 2010 - Getting List Item From DataGridview

Apr 19, 2014

Basically, I have a gridview table with a dropdownlist column and I need a way to retrieve the selected item from it. Now I'm using an imagebutton in order to get the selected item from the dropdownlist to pop-up as a message box (as a string). I already know how to get text from a boundfield. However, using the same code to get the dropdown list item won't work. This is a snippet from my code:

ASP code:

Select...
8:00
9:00
10:00
11:00
12:00
1:00
2:00
3:00
4:00

Visual Basic code:

<asp:BoundField DataField="Case#" HeaderText="Case#" ReadOnly="True" />
<asp:TemplateField HeaderText="Surgery Time">
<ItemTemplate>
<asp:DropDownList ID="Time_Slot" runat ="server">
<asp:ListItem Selected="True" Value="0">Select...</asp:ListItem>
<asp:ListItem Value="1">8:00</asp:ListItem>

[CODE]....

View 1 Replies

VS 2010 - How To Set Sqlparameter List To A Gridview

Aug 28, 2013

how to set sqlparameter list(of sqlparameter ) to a gridview??

Code:
Dim l As New List(Of System.Data.SqlClient.SqlParameter)
l.Add(New System.Data.SqlClient.SqlParameter("@name", "joy"))
l.Add(New System.Data.SqlClient.SqlParameter("@class", "neel"))

grd1.DataSource = l.ToList
grd1.DataBind()

View 3 Replies

VS 2010 - Gridview With Dropdown List

Feb 1, 2012

I've a web page that contains a Customers DDL, and a ClassCode gridview with a Salesman DDL. So far i have manged to populate the Customers DDL as well as binding data to the ClassCode gridview/ Salesman DDL. My next step is depending on which customer is selected(code event below), query the DB to get all relevant ClassCodes/Salesmen and update the gridview and any instances where the classcode doesn't exist for the customer the Salesman DDL will have a default value. Here's my code so far:

Code:
protected void ddlCustomers_SelectedIndexChanged(object sender, EventArgs e)
{
BindData();
DataTable dt = new DataTable();
try

[Code] .....

How to get the ClassCode for that row by getting DataKeys of the GridView, using the RowIndex of the Row. See if you have a SalesMan for the ClassCode. If you do, use FindControl to find the DropDownList in the Row, and set its SelectedValue.

View 3 Replies

VS 2010 Selecting Item From Drop Down List

Dec 7, 2010

I am trying to set the item that is selected from a drop down list based on what it in the database for that particular record. I am filling the dropdown list with a SQL DataSource I have tried a couple of example that I have found for selecting the item in the list but I am always getting the first item in the list as the selected item. This is what I am currently working with:

Code:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If IsPostBack Then

Else

Dim ID = New Guid(Request.QueryString("ID"))

[code].....

View 9 Replies

VS 2010 - How To Write List Of Objects To CSV File

Mar 13, 2013

Nothing I find on the Internet is working.This is the closest I've gotten. It produces an output file without exceptioning but the output file has blank lines. But it's the correct number of blank lines.

Code:
public void WriteCSV<T>(IEnumerable<T> items, string path)
{
Type itemType = typeof(T);
var props = itemType.GetProperties(BindingFlags.Public | BindingFlags.Instance)
.OrderBy(p => p.Name);

[code]...

View 2 Replies

Crystal Reports :: VS 2010 On Development Machine Can't Find Folder Containing The Required Files?

Jul 7, 2010

When I attempt to test my new report on my workstation in Visual Studio 2010 running the beta Crystal Reports for 2010 it can not find the folder containing the required files.

Is there a way to force it to find them so I can debug the code calling the report?

View 3 Replies

.net - Editing Aspx/ascx Files Randomly Disabled In Visual Studio 2010?

Aug 10, 2010

I'll be debugging a site in Visual Studio 2010 and editing an *.aspx or *.ascx file, and without warning, it will lock up so that I can't edit it. There's no message or anything, I just can't type or make any changes. The only way to start editing again is to stop debugging, close the editing window, and then find whatever file I was working on and reopen it. It's a huge pain in the you-know-what. My colleagues are experiencing the same thing, so it's apparently not something with my particular setup. What's the explanation, and how can we make it stop?

Note 1: I've reported this to Microsoft here. If you've experienced this as well, please go there and vote up the bug report.

Note 2: This is not VSS-related, at least in my case. We use VisualSVN, which doesn't use file-system-level locking to mark files as checked out.

View 9 Replies

Web Forms :: List Files In Web Folder?

Jan 30, 2011

I have a simple user control which needs to output a list of images in a particular folder. I'm passing a property containing the folder path into the method so the same method can be used with different folders on other occasions.

What I have is almost working, but there seems to be a problem with the format of the file paths. Here's the usercontrol:

[Code]....

This loops through the files absolutely fine, but they don't render because the 'src' attribute is a local file path as opposed to a web-safe file path or a relative path. It renders like this:

<img src="C:UsersMeDocumentsMy Web Sitesmysiteiconsflagsad.png" /><img src="C:UsersMeDocumentsMy Web Sitesmysiteiconsflagsae.png" /><img src="C:UsersMeDocumentsMy Web Sitesmysiteiconsflagsaf.png" />

how to update my code so that it looks for files in the folder relatively, or uses correct absolute paths for the website to render the images correctly?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved