I can not create a SQL database in visual studio - asp.net

I have just installed Visual Studio 2010 and I can not make a simple database using Visual Studio. I use the following method to create the database:
The problem is when I tried to create it, I see this error:
I also see the following error when I want to access to the Asp configuration section in my Visual Studio:
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 5110 and the SqlException message is: The file "\MAC\HOME\DOCUMENTS\VISUAL STUDIO 2010\WEBSITES\ULTIMATEGOLDENSTUDIO1\APP_DATA\ASPNETDB_TMP.MDF" is on a network path that is not supported for database files. CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Creating the ASPNETDB_3cde4c4c17f74bb991c3d4fd2714db62 database...
Please let me know how to fix this problem.

It looks like you're running Visual Studio inside of a Parallels VM w/ your Windows User drive mapped to your host machine's shared Home folder.
Windows treats that as a network folder and, as the error message says, that isn't supported in this case.
The easiest solution would be to change the location of your Windows Profile directory so that it points to a location inside of your VM rather than a shared folder between the guest and host OSes.

Related

The 'msolap' provider is not registered on the local machine

tried looking at other examples on this and am a bit confused. I have 2 web servers that are load balanced and a sql server box (sql 2012). my cube is created on the sql server box (i see it in management studio). when i try to access via my asp.net page i receive the above error.
now, i see the msolap110.dll in C:\Program Files (x86)\Microsoft Analysis Services\AS OLEDB\110 on the sql box. do i need to do something permission wise with the dll or something? do i need to install analysis services on the web server? is there a specific port or something (doubtful as sql is running fine).
connection string is as follows:
"Provider=msolap;Data Source=;Initial Catalog=AutoOLAPAW;Cube Name=SampleCube;"
going to try to force to use MSOLAP.5 but waiting on a republish from our security/deployment group.
this all works fine in dev but my (more secured/stripped down) prod/qa is where i'm seeing the issue. using iis7 on both.
If you are using ADOMD.NET then either set CopyLocal=True on that reference on your ASP.NET source code so Microsoft.AnalysisServices.AdomdClient is deployed with the web app... Or install SQL_AS_ADOMD.msi from:
https://www.microsoft.com/en-us/download/details.aspx?id=49999
If you are using OLEDB then install SQL_AS_OLEDB.msi from that same link.
If you don’t want the SQL2012 version but want the latest then install from here and use Provider=MSOLAP in the connection string (instead of a number like MSOLAP.5).

Access denied when trying to delete a file in Temporary ASP.NET Files folder

I am unable to run a web application after a build in VS 2013. I get the following error:
Access to the path 'C:\Users\Thelonius\AppData\Local\Temp\Temporary
ASP.NET Files\vs\3874c594\43dbfd8b\DotNetOpenAuth.OpenId.dll' is
denied.
I tried to delete the DLL using Windows Explorer directly, but I was met with the following dialog:
You require permission from the computer's administrator to make
changes to this file DotNetOpenAuth.OpenId.dll
I found it odd since I was running as the administrator. When I tried to change the permissions from the Security Tab in Explorer, I got the following message:
You must have Read permissions to view the properties of this object.
I am unable to change the ownership on the project. Is there a solution to this problem or should I just make another ASP.NET temporary file folder? This is strange. If it helps, I am running Windows 10.
For what it's worth, Windows Handle utility claims that VS 2013 has the file open, but why can't it delete it? Also, if the file is open by Visual Studio 2012, shouldn't the error message say that the file is open?
To been able to clear the Temporary asp.net directory you need to :
Stop the IIS service (or just stop the web site that you wish to clear)
Close all visual studio programs (or only the web site that you work with)

Problems deploying ASP.NET 4 app to Web Server

I just created my first ASP.NET Version 4 app using Visual Studio 2010 and SQL Express 2008.
I copied the files to IIS and run the default.asp. This loads the programs main menu. So far so good.
When I open the read webform and do a read of my database I get the following Error:
Server Error in '/Diary' Application.
Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.
Any idea how to fix this error?
Did you look at support articile for the very issue.
Or even this

SQL server won't open DB created by Visual Studio

I've built an ASP.Net site in Visual Studio, and created the DB inside it (the .mdf file is in the APP_data folder).
Now, when I want to deploy in the customer site, I think about maintaining the DB without open Visual Studio, and by using the SQL Server Express tools (back up etc.).
I've searched how to do this, and learned that I should attach the .mdf file to sql server.
I've tried to do this and failed!
The error is: Unable to open the physical file "< .mdf >". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)
Google didn't helped me to solve the problem.
Now I have 2 options:
1. To give up and deploy the site in the current situation where the DB is an .mdf file and ASP.Net can connect to it by the SQL server express compact (in the proccess).
To extract all the data (I need to think how...) and import it to new DB, this time in SQL Server DB.
Wat would you recommend doing?
Thank you in advance.
If on Windows Vista or higher, try opening SQL Server Management Studio by right clicking and saying "Run as Administrator". As Mitch mentioned maybe it is just a permissions issue. Then try attaching to the database.
Error 5 is usually permissions related. Do you have permissions to access the file in it's location?
If you've created it in Visual Studio, it's most likely an Express database. SQL Server does not support "user mode" database connections which SQL Server Express use. Despite sharing a name, they are two fairly distinctive and different technologies.
To view the contents of an SQL Express database (ie- created in Visual Studio) I just use the Visual Studio server explorer.

Asp.net - publishing a web site is causing an access denied error

I am working in visual studio 2008 sp1 and trying to publish a web site to a local directory. I keep getting the following error :
Error 3 Access to the path 'C:\Users\name\Documents\Sandbox\BTNET\App_Data\BTNET.mdf' is denied.
My question is how do I determine what user account Visual Studio is running as? I have tried to give everyone, guests, and IUSR_ full control and I am still getting this error. It’s painful..
You must "run as Administrator" VS2008 and publish site
Bring up task manager (ctrl+alt+delete) and look for devenv.exe.You should see the user in the User Name column.
AFAIK (As Far As I Know), it's ASPNET account
Since you're having problems accessing the DB file, make sure all the connection to that database are closed. That file might be in use, which in turn will cause the error.
It sounds like either an application is open and using the file(i.e. Visual Studio, modifying the schema or data or an instance of Access) or the user publishing the files does not have access to the delete files.
The first scenario is more common.

Resources