Visual Studio :: How To Create App_Data Folder Grayed Out
Sep 29, 2010
I have a few questions regarding the "special" ASP.NET folders in Visual Studio web projects.
Adding an App_Data folder in Visual Studio is present, but grayed out in my C# web project, why?
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? 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?
I have web application project and i want to edit aspnetdb Database, but id does not appear in App_Data folder.I even cant see web.config file for subfolerds. When i create web site project in vs, i can see the aspnetdb Database.Vs Version : 2008
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?
So, i am running SQL Server 2008 R2 Express and VWD 2010 Express on Windows 7. I am logged in as admin on my machine. I have created a new web app project (VB Linq to SQL) and I have attempted to add an existing .mdf to my project's App_Data folder. I right-click, choose "add existing...", navigate to the .mdf file in the C:Program FilesMicrosoft SQL ServerMSSQL10.SQLEXPRESSMSSQLDATA folder, and then i get an "Access is denied" error box with no further details.
I am trying to use one of the componets of the WPF Toolkit,[URL] but when I look for the component in my Toolbox it's not there, so when I set the Toolbox to ShowAll, the components are listed but they are grayed out. I right click on the Toolbox > Choose Items and look for the component in my list and ensure that the component is selected, but it still shows up as grayed out. If I turn off ShowAll the components are not listed. How do I get these grayed out components available for use?
I am having problems getting the security.aspx to load up on my primary development computer which is using Windows 7 Ultimate and Windows IE 8. Clicking on the ASP.NET Configuration icon from the IDE in the Solution Explorer within Visual Web Developer 2008 Express Edition loads up default.aspx with no problem. But when I click on the "Security" hyperlink to access "security.aspx" I get a message along the lines of "The configured SQL data source provider is not properly configured". It goes on to state a list of potential reasons for this problem. One that includes not having the proper credentials or permissions. Im almost 100% sure it has something to do with permissions because I can't even get to the "security.aspx" page from opening a new empty project. I have recently installed Visual Web Developer 2008 Express Edition on my laptop which is running Vista with all latest updates and this issue does "not" exists. I can click the "ASP.NET" icon, load up "default.aspx" and click "Security" and it loads the page with absolutely no issues.
I have discovered a weird workaround but I don't like having to do this. If I add the following lines to my "web.config" file from any given project I can get to the "security.aspx" page without getting any SQL messages about improper configuration or permissions.
Basically, what I have to do to get to the security page to load without error is add a remove statement and then I just cut'n'paste almost the exact same connectionString from machine.config in the Microsoft.netFrameWorkV2.0.5027config directory. This does away with the "Improperly configured SQL datasource message" and gets me a new error message along the lines of "Could not create a SQL instance". My memory is fuzzy on exact error messages since Im not at development computer right now. However, when I change the User Instance attribute from true to false, then I have success at last.
I signed up with a new hosting company that uses Plesk. I use Visual Studio 2005 It appears that my rootfolder must be named httpdocs, which means every website I create would have the same name. If I do nothave my aspx files stored locally in an httpdocs folder, then I cannot synchronize with the server when I usethe copyweb dialog. Also Visual Studio 2005 creates a folder using the website name in the C:Documents and SettingsuserLocalSettingsApplication DataMicrosoftWebsiteCache for storing website settings, but cannot have multiple folders of same name, i.e., httpdocs, so this seems to be a conflict with Plesk. What can I do to resolve this?I talked with support at the hosting company, but they do not know Visual Studio at all. I am thinking I need to switch to
I downloaded a trial version of Visual Studio 2010, created a new c# Solution and then wanted to add an ASP.NET Web Site. I am Folllowing an example in a book: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008.In the book they write that a template for createing an c# ASP.NET Web Site would be found, but whereever I search for o template in VisualStudio I cant find that for c#, I could find it for VisualBasic but that is not wath I want!
Pardon if this is a very dumb question, but I was trying to migrate an existing ASP application to asp.net MVC, and followed the procedure from the music store tutorial (http://www.asp.net/mvc/tutorials/mvc-music-store-part-4), which involves adding the database to the App_Data folder. (I had to restart my machine before it would work, since otherwise, Visual Studio thought the database was being used by another application.)
Now when I check in Windows Explorer, it looks like the database file was literally copied into the App_Data folder, and now I have two mdf files on my hard drive with the same name. What is going on there?
Will my MVC app ignore the original (real) database and use it's own private copy instead? (That would be bad.) Or is the new copy just for reference when using wizards that generate entity classes etc.? If the latter, what is the procedure when the real database is modified, to update the application code?
I have put a css file in App_Data folder and referrenced it properly in the page to be used. But when I browse the page then it does get loaded and page is shown without styling. Well I know why it is happening because Asp.Net run time blocks access to App_Data folder at run time. But I wanna ask that how we can make it working that is I put the css file in App_Data folder and it still works.
I can see the AdventureWorks MDF file in my Server Explorer window in VS, but when I try to add this database file as an Existing item to my App_Data folder in the Solution Explorer it gives me an error saying that this file is in use. Is it possible for me to add my Adventureworks database to the App_data folder? I am running a 32-bit XP using SQL Server 2005 Express.
I 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.jpg
I have 32-bit XP with SQL Server 2005 Express and VS 2008. I have successfully added the Adventureworks DB to my VS website and I can see it from SOlution Explorer, however, the entire DB is attached. How would I only attach a few of the tables and stored procedures from this DB?
The following code is used to add the asp membership tables to an already existing database instead of creating a seperate database for membership and having two databases in the application.
aspnet_regsql.exe -S .SQLEXPRESS -U username -P password -d databsename -A all
It works fine by adding the membership tables to the existing database that is located in the c drive, program files sqlserver folder.
But my database however is not in the c drive but located in my asp website app_data folder, so the above code does not give any error and the tables are not added after I run it. how can I now add the membership tables using the above code when my database is located in the website app_data folder,
An associate wants to store an Access database in the App_Data folder of a website that lives on a local server and write new data to it daily from Microsoft Access on a client computer on the local network.Internet users will access the Access data from the website.
Is it possibe to write to an Access database in the App_Data folder of a website that lives on a local server using Microsoft Access? And also connect and read with ASP.Net?The internet connection is "Read Only".
I'm new to .NET and while starting to learn ASP .NET MVC2 framework I see that you can create a .mdf file inside the App_Data folder and connect to it or you can connect to a SQL Server.What is the difference between these to methods of interacting with a database? What are the advantages/disadvantages of one over the other?