Visual Studio Build error after copy solution to new location - asp.net

I inherited Visual Studio 2010 Web Site solution.The solution is pretty simple (but large), and only contains one project.
BUT when I copy the site to another location on my hard drive and try to build it, I get the following error:
Error 1
An error occurred loading a configuration file: Failed to start monitoring changes to 'C:\Development\SolutionFolder\app_code' because access is denied. C:\Development\SolutionFolder\app_code\web.config

Looks like some impersonation issue. Please check the local user permission on the app_code folder.

Related

Running same application throwing error in IIS express

I was running a project say ProjectA in visual studio 2015 and for some reason, I have created a copy of that project say CopyProjectA.While running that copied project, i.e
CopyProjectA project it was showing an error
Port number is in use
So for that, I changed the port number of CopyProjectA.
Now, while I run CopyProjectA it's now showing
Unable To Launch IIS Web server.
Failed to register URL "https://localhost:portnumber/" for site "CopyProjectA or Project_Name(1) " application "/". Error description Cannot create a file when that file is already exist (0x800700b7)
Note:
CopyProjectA or Project_Name(1) both are same
Please help me to fix this problem :)
The best way is to create a new virtual directory for the application after changing the port number; this will delete any related configuration caused by the old website.
From the Properties of your application;

Visual Studio 2012 throwing error while building website

I am getting the errors below while building an ASP.NET website in Visual Studio 2012 over and over again. These errors are very random and sometimes I'm able to run the site after many attempts.
'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\fccrcissues\94bcbaf1\224612b9\CSC7282803B8D0F44FBA57E415444603873.TMP'
is not a valid Win32 resource file
The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
The only solution I have is to build it over and over again until it succeeds.
Had a same problem! Try this. Have given link to solution too.
1st Solution) Under you IIS > Virtual Directory Properties > Execution Permissions might be marked as “Scripts and Executables” the dll is not being loaded so you are getting “System.Runtime.InteropServices.COMException”
Try changing the Execution Permissions to “Scripts Only” and applying it - It should work now!
I am not sure about the exact different between the two so all I know is:
Scripts only -> Run only scripts,such as ASP applications and
Scripts and Executables -> Run both scripts, such as ASP applications, and executables
2nd Solution) On your server where you're website sits, open the command prompt and run the following command:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i - It should work now!
http://www.strivingprogrammers.com/How-to-fix-The-handle-is-invalid-Exception-from-HRESULT-0x80070006-E-HANDLE

I can not create a SQL database in visual studio

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.

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)

Missing assembly 'dnx.clr.managed'

I am trying to deploy an ASP.NET 5 application to my 64-bit Windows Server 2008 R2 server. I created a blank web application and set up a file system publish profile using dnx-clr-win-x64.1.0.0-beta4. I copied the results from the publish location to a folder on my server and created a new virtual directory with a .NET 4.0 app pool pointing at the wwwroot folder of my application. However, when I try to browse to the site, I get this error:
Could not load file or assembly 'dnx.clr.managed' or one of its
dependencies. The system cannot find the file specified.
Description:
An unhandled exception occurred during the execution of the current
web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details:
System.IO.FileNotFoundException: Could not load file or assembly
'dnx.clr.managed' or one of its dependencies. The system cannot find
the file specified.
The same steps on my local PC (where I have Visual Studio 2015 installed) work correctly so it seems like I need to install something else on my server. I have already installed .NET 4.6 on this server without success. Does anyone know what I am missing?
I found the solution thanks to this question: Azure deployment : Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified
At first I thought that wasn't the answer because it didn't work when I changed my publish profile from dnx-clr-win-x86.1.0.0-beta4 to dnx-clr-win-x64.1.0.0-beta4. However, I later noticed that approot/packages folder didn't have the x64 package. So I deleted everything and re-published with my new profile and the page loaded.
Change the dependencies file to the current version, whether it is 1.0.0-beta7 or 1.0.0-beta6 ensure that you go to nuget package manager and install the appropriate version rebuild the solution you should see file updates from your output windows.

Resources