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


Top 5 Contributors of the Month
david stephan
Fauzul Azmi
Asad Ali
Post New Web Links

Create App_Data Folder Grayed Out?

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net
 

I have a few questions regarding the "special" ASP.NET folders in Visual Studio web projects.

  1. Adding an App_Data folder in Visual Studio is present, but grayed out in my C# web project, why?
  2. What are the meanings of the various ASP.NET "special" folders?
    • App_GlobalResources
    • App_LocalResources
    • App_Data
    • App_Browsers
    • Themes - I know this is used to contain stylesheets for a particular theme and is then specified in the web.config or page (if I remember right).
    • App_Code - Were these classes that were pre-compiled?
  3. Do these ASP.NET folders retain their special meaning if you manually create a folder with the same name instead using the "Add ASP.NET Folder" feature in Visual Studio?



View Complete Post


More Related Resource Links

Create user is creating aspxxxx.mdf database in my app_data folder

  

I had already setup roles for my pages and requirements call for ability to manage and create users.

So i was looking at code that allows you to do so using membership, even though i got the page to work, it was creating a database in my app_data folder.. i already have SQLExpress setup with the asp schema, but cant figure out how to get my application to use that instead of creating the db in the folder?

What am i missing or doing wrong?

I have the following setup in my web.config file..

		<authentication mode="Windows"/>
		<authorization>
			<deny users="?"/>
		</authorization>
    <membership>
      <providers>
        <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        connectionStringName="connectn"
        enablePasswordRetrieval="false"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        applicationName="MyApplication"
        requiresUniqueEmail="false"
        passwordFormat="Hashed"
        maxInvalidPasswordAttempts="5"
        minRequiredPasswordLength="7"
        minRequiredNo

Possible to create sub folder under DynamicData/CustomPages/{table}/subfolder

  
Hi, Is there possibility to create a subfolder under   DynamicData/CustomPages/{table}/subfolder and way to redirect the pages to subfolder pages.

Create report that lists every user with permissions for each folder

  
I would like to have a report that will list each user with it's roles for every folder. We have a very large RS database with a lot of folders, we need some better way to keep track of permissions. I created a report that utilizes "GetPolicies" from http://localhost/reportserver/ReportService2005.asmx but I have to feed a folder name to get list of users. I can also (by using subreport) list all folders with users. However, I am not able to produce a report where I have it broken by user. any idea?

Question re. App_Data folder

  
I have authentication on my site and it works fine on my local machine but it has stopped working on my live one. Basically once a user logs in, if the role he/she has is listed in web.config as being "Access denied" then it redirects them to a page where they are given an error message.On the live on it doesn't redirect the user, it brings up a page with "Access denied creating App_Data subdirectory etc.." on it.I noticed that there is no  App_Data folder on the live site, but there is on my local pc (with a ASPNETDB.mdf file in it). So I created an App_Data folder on the live site and now I don't get the "Access denied " error but a timeout error instead.I presume this is because the live site does not have the ASPNETDB.mdf file.I am wondering for user authentication does this file have to be on the live site, could someone have deleted it? If so can I copy the one from my local pc to the live site?I hope I am making sense, thanks for any replies.

create workflow on a folder

  
within my document library i have placed some folders. the foldernames are the names of my technical users. when i place a document in one of those folders i want to send a email to the specific user. i think the workflow that you make is ownly assigned to the document library.   how can my workflow see, in witch folder i added  a new document and send a mail to this user? can i check this by a if statement, if yes how excactly.

automatically aspnetdb is created in app_data folder

  
 i have used membersip, roles, profile in my website. i have moved all the tables and sps to the new database i am using. to avoid creating aspnetdb. i use sqlexpress and visual web express. My problem is aspnetdb is automatically created event though i have not used 'localsqlserver' specified anywhere in the web.config file.  I not able to understand why aspnetdb is automatically created in the app_data folder. Any ideas..

Securing files using Handler and App_Data folder

  
HiI have secured some files on my webserver by putting them into the App_Data folder in the root (I do not have the option to secure folders using the ASAPI filter)The user gets access to these files by requesting them through a handler, fx. by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpgNow, I want to make all the content in a specific folder called "Members" (a single subdirectory of the App_Data folder) available only by passing a specific password. That is by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpg&password=xxxxIn my Handler.ashx I have written some logic seeking if InStr(context.Request.QueryString("file"), "Members") = 0 before sending the file. If inStr <> 0 a password is required.Is this a good way to secure a folder in and its content? Is there a way of getting access anyway, like using some kind of "sub-directory" line in the path (the same way as you can request parent directory by using "../../Myfile.jpg)? I know there will be a problem if someone fx. legitimately tries to access the file App_Data/Members.jpgThanks in advance!-Jesper

Restricting user permission to upload doc but not create new folder

  

Hi all,

was wondering if it's possible to allow a user to upload documents but not be able to create a new folder...

Any help is greatly appreciated.

thanks


How to create a new folder with contains of note pad in every time

  
<!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

Hello every one,

How to create a new folder with contains of note pad in every time. I mean if I am clicking on a new folder it’s automatically creates with notepad in that new folder. Please help me any one.

 

Thanks in advance

 

 

Regards,


Error to Add a Database to a Visual Studio 2010 Project via the App_Data Folder

  

I am trying to add a new database via the App_Data Folder and I receive an error described below.

When I attempt to add ANY TYPE OF SQL SERVER DATABASE through the App_Data folder I receive this error "Connections to SQL Server Files (*.mdf) require SQL Server Express 2008 to function properly.  Please verify the installation of the component or download from the URl."

I can create a db via SQL Server Mgmt Studio, it connects fine, and I can see tables.

Visual Studio- Server Explorer connects fine to the Database, I can see the tables.

Im running XP SP3 w/ Visual Studio 2010 and SQL Server 2008 R2 Developer.  I had previously removed SQL Server Express.

Why cant I access the database within my project, when Im able to connect to this fine within Visual Studio Server Explorer?


Error to Add a Database to a Visual Studio 2010 Project via the App_Data Folder

  

I am trying to add a new database via the App_Data Folder and I receive an error described below.

When I attempt to add ANY TYPE OF SQL SERVER DATABASE through the App_Data folder I receive this error "Connections to SQL Server Files (*.mdf) require SQL Server Express 2008 to function properly.  Please verify the installation of the component or download from the URl."

I can create a db via SQL Server Mgmt Studio, it connects fine, and I can see tables.

Visual Studio- Server Explorer connects fine to the Database, I can see the tables.

Im running XP SP3 w/ Visual Studio 2010 and SQL Server 2008 R2 Developer.  I had previously removed SQL Server Express.

Why cant I access the database within my project, when Im able to connect to this fine within Visual Studio Server Explorer?


SlideLibrary programmatically create folder

  

 Hi,

I have created a workflow in visual studio 2010 for a slide library when i upload new slides that they get in a folder, if the folder doesn't excist the workflow will automatically create the folder and move the uploaded slide to the folder. I have a custom field "Folder name" that i use to enter a folder name where i can store the slides that i have uploaded.

The code that i use:

 SPListItem item = null;
 SPWeb web = null;
 string folderName = string.Empty;

 web = workflowProperties.Web;
 item = workflowProperties.Item;
 
 var name = item.Name.ToString();

     
      folderName = (string)item["Folder name"];
     
      if (folderName != string.Empty && folderName != null)
      {


        SPFolder root = workflowProperties.List.RootFolder;

        string slideFolderUrl = SPUrlUtility.CombineUrl(root.ServerRelativeUrl, folderName);
        SPFolder slideFolder = web.GetFolder(slideFolderUrl);

      

How to place a MYSQL database in my ASP.NET site App_Data folder?

  

Hi!

How to place a MYSQL database in my ASP.NET site?

In what format I produces the file to my APP_DATA
database folder to place it.
How to build CONNECTION STRING to  database located in APP_DATA
I created a site  conncted with a LOCALHOST database.
Now I want to import it into my website folder APP_DATA
Please help.


can't create new mdf file in App_Code folder

  

I just installed vwd express 2008 and SSE 2008.  For SSE i setup a default installation (i.e. SQLEXPRESS as the default instance name etc). 

In VWD when i right-click on the "App_Data" folder and select "Add New Item--->SQL Server Database" i get the following message:

"  Connections 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: ............."

So to get around that what i've done is select the "Database Explorer" tab and right-click on "Connections--->Add Connection".  This process works for me but the other doesn't.  Any idea why?

One problem with the 2nd approach is now that database appears in the database explorer for any project i have open in VWD.  Again any idea why thats happening?

 If anyone could offer a suggestion as to why i can't add a new connection in the solution explorer as explained above that would be fantastic.

 Also - i don't know if it matters but i'm running a 64-bit version of vista and have installed the x64 version of SSE.

 

Jason


Database create error due to folder access right

  

I have SQL Server  and had that  problem Below .

When i try to create database having different folder it is not working

This directory works:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

Anything else like

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\OtherFolder

generated  error.

 

CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

 

Any body has idea how to resolve this.


Unable to create database in particualr folder

  
Hi,

When i am trying to create a database in Sql Server in my PC, i am not allowed to create database in a particular folder. It gives an error saying that,

Msg 1802, Level 16, State 4, Line 1

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

Msg 5123, Level 16, State 1, Line 1

CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\Program Files\Test\Database\CheckCreation.mdf'.

I am having the administrator access in that PC but still not allowed.


I am able to create it in all other folders.

Can anyone help me in this issue?

Thanks & Regards,
Subalakshmi Vijayarajan.


Content Organizer - Target Location - Automatically create a folder for each unique value of a prope

  

I would like to create a content organizer rule to route documents from the drop off library to their final location in the document library.

I also want to create a subdirectory based off a metadata field, so that a folder gets created for each year.

There is a metadata field called "Document Classification Year".

I check the chebox to  "Automatically create a folder for each unique value of a property" and choose "Document Classification Year" as the field.

For "Specify the format for the folder name:" %2

I was hoping this would create a folder called "2010" if the meta data field "Document Classification Year" was entered as "2010".

But it creates TWO folders. The first folder it calls "Document Classification Year", the SECOND folder it calls "2010".

I don't need a folder called "Document Classification Year"! Just the folder "2010".

Can this be achieved without the content organizer??

 


Categories: 
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