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 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 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?
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?
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 have an user control that reads the data from app_data folder and does some processing.In design time I'd like to show the row data in control placeholder (using GetDesignTimeHtml).To do that I need to figure out the absolute path to app_data folder on my project.The HttpContext is not available and HostingEnvironment.MapPath returns null.
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 know that in a web site project VWD will cram all the files into 1 specified folder which holds all the peices of your site together in a nice little container.
However, in a web based application (rather than web site) you have a similar folder but it contains a solution file; people often say this has more advantages, but from my early days of learning what would those advantages be?
Is there any reason to separate front-end FE and back-end BE (for Administration and customer service) in different websites under the same solution.
Actually it causes me problems in Removing items from the cache, (they) decided to put FE and BE in different app domains, this means different Cache objects!!
I asked them about the reason and they said
1- To not be out of memory and to remove BE effect on the FE performance.
I doubt on this, Customer service team are probably affecting the centralized database performance, but there hits will be like adding 10 customers to our website, it is nothing!! Also App domain memory extends when needed, as far as I know, it does not pre allocate resources
2- To avoid losing both FE and BE if the website goes down.
I agree but this is not a reason to put the whole BLL in a web service, what about SECURING the BLL!!!, I PREFER TO LOSE BOTH if the IIS goes down.
I have an accordion and a nested accordion as a menu ba on left. thepanes contain various controls mainly dropdownlists. I disable the accordion after a user has enetered some values and clicked the search button. However in IE7 the accordion is disabld and all the contained controls are too. But in IE6 the dropdownlists aren't disabled whats the reason behind this and whats the solution?
the testscript.js file is only included in FULL page refreshes...ie. when I load the page, or do a full postback....i can't get the file to be included in partial refreshes...have no idea why..when viewing the ajax POST in firebug I don't see a difference whether I include the file or not....
both of the ScriptManager Includes are being ran from the exact same place in "Page_Load"...so they should execute every partial refresh (but only the ScriptBlock does).