I am running Visual Studio 2010 and I created the default MVC3 sample project. The project starts fine and I get the home page.
But when I go to register a new user I get this error,
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 5177 and the SqlException message is: An unexpected error occurred while checking the sector size for file 'D:\WORK\VISUAL STUDIO PROJECTS\VISUAL STUDIO 2010\MVC3\MVC3\APP_DATA\ASPNETDB_TMP.MDF'. Move the file to a local NTFS volume, where the sector size can be retrieved. Check the SQL Server error log for more information.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Creating the ASPNETDB_af8cb88b53744229b5d3dca30395b572 database...
I also have SQLServer 2008 R2 installed.
Does anyone know why this is happening?
Thanks
I had the same problem. It is trying to create a database 'D:\WORK\VISUAL STUDIO PROJECTS\VISUAL STUDIO 2010\MVC3\MVC3\APP_DATA\ASPNETDB_TMP.MDF' and failing to create it. Firstly check if the file already exists and manually delete it if so. For me, it was because I was creating a drive using the Windows command:-
subst x: "e:\My Work"
And my solution was on X:, which for some reason the app did not like. You can also try creating the database 'D:\WORK\VISUAL STUDIO PROJECTS\VISUAL STUDIO 2010\MVC3\MVC3\APP_DATA\ASPNETDB_TMP.MDF' manually in Visual Studio and see if you get the same error.
If you can't create it, look at the drive/folder settings such as make sure it is NTFS drive and check rights etc.
For me, the problem was caused by the disk mapping, I have mapped a folder C:\abc as a virtual disk, then the error occurred while I run app from the virtual disk, move the projects outside of the virtual disk solves my problem.
you need to have express edition installed, generally to run the programs which we download from online. or else if you have developer edition or enterprise edition of SQL installed you need to change the connection string in web.config to you database and before that don't forget to copy database form APPData folder to you database.
Hope this should work.
Related
I just installed the latest Visual Studio 2019. I can open my SQL database project. But when I try to open a SQL script file, I got the error:
Failed to create an editor. Value cannot be null. Parameter name: Password.
Any idea how to fix it?
delete the file with "user" extension in your application root.
This error occurred for me too when I had a connection setup in my database project, where the password is blank.
Even though the database server I use is perfectly fine with no password, the editor in Visual Studio is not able to handle this.
For me as a workaround, I use another connection for my development process. If you can't do that, I recommend creating a new user for this purpose - where the password is set.
I'm working on an asp.net project in visual studio 2013 which uses Firebird as the database server. I have no problems with Windows 8 or if I deployed the project on a remote server, but if I work on a PC with Windows 10 and IIS and I tried to debug the project in visual studio, it is not possible to open the connection with the database, I got the error I/O error during "CreateFile (open)" operation for file "path and name of the database file" Error while trying to open file.
I think the problem is in the IIS configuration but I can't find out where it is. Surely someone can guide me...
Solved: I moved the database to the app_data folder of the project and the error disappeared
I am trying to add a reference to a project in VS 2010, and getting the following error message:
The Add Reference Dialog could not be shown due to the error:
Access to the path 'C:\Users\administrator\AppData\Local\Temp' is denied.
The error details have been saved to C:\Users\<my_user_code>\AppData\Local\Microsoft\VisualStudio\10.0\ShowAddReferenceDialog.log
The log file doesn't help - it just shows the full stack trace for the above error. The part that is confusing is that VS is trying to access the \administrator profile, when I am not logged in as 'administrator', nor am an administrator on my machine.
This also happens irrespective of the project as well, so it occurs even for a brand new project.
Is there a workaround or fix for that so that I can change the temporary folder that Visual Studio is attempting to write to?
Two things that come to mind are -
1) Run Visual Studio as administrator
2) MSConfig -> User Account Control settings, bottom out the slider to "no warnings" -> Restart
Good luck
We figured out the problem. One of the references was installed into the Administrator\Temp folder (for some reason), and due to policy restrictions that were recently implemented in our DOMAIN, read access to this folder was removed.
We reinstalled the dependency, and all is good.
I've both Visual Studio 2010 (Premium) and MS Access 2010 installed. I'm just trying to connect to a .mdb database file from the server explorer and it doesn't work. I get the following message: "Unspecified error". If I try to add a database on the App_Data folder and open it, I get the same error. I've tried with .accdb and .mdb files but both give the same problem.
I have also Visual Studio 2005 installed on the same machine. And it works without any problems.
Anyone has any thoughts about it?
Thank you
Make sure you have the appropriate references in you VS2010 project for Access databases.
Not sure this counts as an answer but, the issue is with Visual Studio 2010. I too need to connect to an Access database (tactical solution, migration not possible) and in VS2010 I get the "unspecified error". It fails if I try an ODBC based connection too. I can connect fine using SSIS, and as it turns out, in VS2008.
My current solution is to create my class library in VS2008 and reference the compiled DLL in my VS2010 project. I haven't got the time to try and fix my VS2010 install at the moment. When I do, I'll upgrade my 2008 project.
An aside: I think most people on here would migrate to a better database if they could, and are only connecting to Access databases because they have no choice.
I am working on a Visual Sudio 2010 Setup Project to install an Entity Framework / SQL Compact app. The app needs to install an SDF file on the user's machine. As I understand the Microsoft guidance, I should install the SDF file to a company\application subfolder under C:\ProgramsData on the user's machine, which I have done in the setup project by creating a custom folder in the File System Editor with a DefaultLocation property of [CommonAppDataFolder]. All works well, and the SDF file is installed to C:\ProgramData\MyCompany\MyApp\MyFile.sdf.
Here is my problem: On the client machine, my app is throwing an EntityException with the following message: "SqlCeException: Access to the database file is not allowed." Sounds like a permissions issue.
Is there a way to set permissions on the SDF installation folders from within a VS Setup project? How would I do it? Any examples? Thanks for your help.
The answer is to create a small DLL that gets executed as a Custom Action by the Visual Studio Setup Project. There is a walkthrough on creating Custom actons here.