Website DLL Access Denied - visual-studio-2010

I just recently inherited a website and while there are errors in the build (its missing import Microsoft.VisualBasic in a few places and i have fixed these)
There was no solution files with this website so i have just added my own and imported the website,
what i am finding now is that when i build the website i get
Error 1 Could not load file or assembly 'ActiveReports.Chart, Version=6.2.3681.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff' or one of its dependencies. Access is denied.
I know its not a permissions issue as i have gone in and edited the permissions to allow for everyone to access the file.
I am working on a Windows 7 x64 machine, but if i look at the DLL its targeted towards a x86 build, could this be causing the problem OR could it be that i have copied the files across from a dev server to my local machine.
I have tried to google it and most of the results are showing as permissions to the file.
any help you could give me would be great.
Thanks
Update
After some more investigation i found this in the web.config of the project
<identity impersonate="true" password="yyy" userName="xxx" />
and the Bin folder was trying to connect using this user.
hence the Permissions as the user was not valid on my machine
I have now learned a very big lesson, always validate the Web.Config of a website you inherit.

Stupid me the DLLs needed to be added to the GAC.

Have you made sure that the reference to this DLL in your project is to this same version and not a different version?

You just need to add the ActiveReports.Chart assembly to your project and you should be good to go. In case you are facing any issues then just send us an email to powersupport#grapecity.com

Related

Error: Registration of the app failed

While trying to deploy an app from Visual Studio, I'm getting an error. I have already set developer mode and also deleted the app package from the packages folder, but it still won't work.
Here's the error message:
Error : DEP0700 : Registration of the app failed. Deployment Register
operation with target volume C: on Package
App_1.0.0.2_x64__m0fsgersa29a0 from: (AppxManifest.xml) failed with
error 0x80070002. See http://go.microsoft.com/fwlink/?LinkId=235160
for help diagnosing app deployment issues. (0x80073cf9)
Do I need to set anything else?
I got this when attempting to debug a project from a shared folder.
Opening the project from a local folder first resolved the issue.
I know there is already an accepted answer, but I had a totally different problem with the same excact error message. When th app was running I took a look in the SQLite database with a program that I didn't close when I uninstalled the app and re-run it from Visual Studio. I think that Visual Studio couldn't overwrite the database as I was 'using' it.
Closed the program and voila the app run smoothly.
Hope this helpes anybody else as I was stuck for precious hours!
In Windows 10 there are two possible cause of this problem are as follows,
Previously installed app is locked and preventing VS to delete while deploying the application. Goto C:\Users\{you user}\AppData\Local\Packages and delete the folder of your application. Now rebuild and deploy your application.(this was the solution in Windows 8 devices as well)
If it is still not working, double check if you have removed the below entry from appxmanifest file. If you are targeting Desktop Name="Windows.Desktop" entry should be there in the file. If it is Phone, Name="Windows.Mobile" should be there in the TargetDeviceFamily. You can have both in the configuration but sometimes Microsoft will suggest to keep separate configuration when you submit the application for STARTS testing.
< Dependencies>
< TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
< /Dependencies>
Hope this help in figuring out the reason and solution for "Error : DEP0700 : Registration of the app failed" error.
Don’t worry, the solution is actually very simple.
Error: DEP0700: Registration of the app failed. An internal error occurred.
So you’ve started your Windows 8 app development journey. All things are going smooth until one day you hit this error when trying to run/debug your app. The error says “Error: DEP0700: Registration of the app failed. An internal error occurred with error 0x80073D05. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues. (0x80073cf6)”
This is a very cryptic error and does not give you any info about what the problem actually is. The problem is that Visual Studio is not able to delete the application data in your local packages folder.
Don’t worry, the solution is actually very simple. On your Windows 8 machine, go to C:\Users\\AppData\Local\Packages\ folder. There you will find a folder that has your application’s Package Family Name in it – you just need to delete that folder. The issue is that while your app is in development, it might have a random GUID as its Package Family Name, so the folder will also have that random GUID as its name which makes it hard to know which folder belongs to your app. Again, that is easy to find as well. Right click your project in Visual Studio and click properties. The value you see in the “Package Family Name” field is the name you should look for in the folder. Simply delete it and build your solution again and it will run like a charm.
Read more details at http://paraswadehra.blogspot.com/2012/12/error-dep0700-registration-of-app.html
For me this was caused by being signed in with my Microsoft account in windows instead of the local user account. Logging in as a local user fixed this.
DEP0700: Registration of the app failed
For me the error DEP0700: Registration of the app failed, was raised because my Store App was installed from the actual Microsoft Store. I had to uninstall it and then I could debug my app smoothly.
I got this when I tried to run the project from a ReFS filesystem. Running from NTFS worked. My error code was 0x80073cfd.
I stumbled over the same issue today and after a few hours I found out, that the problem was because I moved the AppIcon files into a subfolder and forgot to adjust the references inside my package.appxmanifest. Unfortunatly the corresponding error message didn't point into this direction and all the above mentioned solutions didn't help for me, so hopefully this helps someone else!
In my case, I was opening one of the App files (Log Files). When deploying, Visual Studio attempts to remove all the files and packages (if uninstall is on in the properties). It was unable to remove the Log file as it was opened. When I closed all files, and tried again, it worked.
I ran into this error when testing some code in domain-bound and non-domain-bound scenarios (which requires me to have a domain account and a non-domain account on the same machine).
I found that I had to uninstall the application from the account I originally deployed it from before I could deploy it again on the other account.
My problem is that there is another Microsoft account in my computer that installed the app from Microsoft Store.
Nothing from the provided solution helped.
The only thing that solved my problem is to delete that account that I installed the app there.
SQLlite database might be opened. Just close the sqllite and try to deploy again.

Deployment package installing dlls no longer in project

I'm using Visual Studio 2010 for two applications, installing to IIS 7.5 on another server. Project A is a web forms web application, and Project B is an MVC 4 web application. During an attempt to set up StateServer between the two applications, I had added a reference to each's .dll in the other's References list. StateServer was abandoned in favor of using a cookie, and the project .dlls were deleted (I did not notice until the installation process that Project B's references were probably also in the list. VS seems to have deleted them from the References when the Project B.dll was deleted, since I did not delete those refs manually).
The problem is, the deployment package is still including them. (I'm just troubleshooting Project A, at the moment.) They are no longer listed in the project's References list, they do not appear in the folder contents under the obj/Release/Package folder, but they DO appear in the installed location after using Deploy -> Import Application in IIS! This includes Project B.dll, as well as many of it's references, such as DotNetOpenAuth.OAuth.dll.
I've run a search through my entire solution on Project A, and have no references to the Project B.dll. I've tried setting up a brand new site in IIS, and deploying to that. I've tried deploying under Staging (QA) and Release configurations, to make sure it wasn't just one of them that was messed up. Under Package/Publish Web, the settings you may be interested in are "Only files needed to run this application", and "Create deployment package as a zip file".
Running the site gives the error, "Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies". This dll is not in the References list of the project, nor the deployment Package folder, nor the installed location's bin folder. It runs with no error, locally.
If I simply remove the extra .dlls manually out of the installed location, I get a compilation error when running the site, complaining a variable is not declared: var lotid = <%=defaultLotID %>; However, this variable is very much declared in the code behind: Public Shared defaultLotID As Integer = 0. And like I said, it runs fine locally. So it seems like a bogus error; just a canary in the mine, maybe.
Seriously, what am I missing? I had no idea how hosed I would be after making a reference to another type of web application. Thank you to whoever takes on the challenge of troubleshooting this one! I'm two days in and coworkers are baffled.
I ended up undoing all my changes, putting my code back to the TFS last check in version. I reintroduced the just the cookie code, built and deployed, I no longer saw the other project's dlls in the installation location. I guess it wasn't going to work to move forward through the reference and subsequent backout. Had to rollback to the prior TFS version, and start over.

Webmatrix error when creating new site from folder "MACHINE/REDIRECTION"

I'm experiencing an error when creating a new site from a folder with Webmatrix.
I've used it for months now and i never had a problem with it, but yesterday when i went for create a new site i got this error with no other explanation:
ERROR
Cannot find configuration file 'MACHINE/REDIRECTION'.
I actually have no idea what caused it and what it is about, i tried looking in the configuration file of IIS Express installed with it but couldn't find anything related to it, even searching with google gave me no useful answer.
It seems redirection.config file that is supposed to be present in the %userprofile%\documents\iisexpress\config\ folder is either doesn't exist or it is corrupted. You have two options.
Option-1:
1.Copy redirection.config file from %programfiles%\IIS Express\config\templates\PersonalWebServer (or %programfiles(x86)\iis express\config\templates\personalwebserver) to %userprofile%\documents\iisexpress\config\
2.Restart webmatrix
Option-2:
1.Rename iisexpress folder located in %userprofile%\documents\
2.Restart WebMatrix
Note: If you follow option-2 steps you may not see websites that were created recently.

Trying to figure out why Site directory in IIS 7 would drop permissions?

So all of a sudden I couldn't run my website any longer getting server error 500.19. Turned out that I had lost the IUSR and IIS_IUSRS accounts on my web project directory (or at least that resolved the issue).
I definitely didn't do anything with permissions either at a folder level or within IIS, and the only change I had made that could have had control that was out of my hands was installing a NuGet package (structuremap-mvc3) through NuGet in Visual Studion 2010.
I am curious on why or how it could loose permissions. My worries is there is another or larger issue that still has looming issues and I am only aware of the one problem that I resolved with the loading of the web.config file.
Any thoughts?
Could you (or someone else) have re-created the folder? If permissions were explicitly set on that folder, but it was removed/re-created, it'd probably inherit the parent folders permissions again. We generally try to set IIS permissions on the parent ("Websites") folder so all newly-created folders will inherit them.

Unable to copy file to server on build. Access to path is denied

I have a solution in Visual Studio that is comprised of 5 projects. The projects build to assemblies (.dll). I have the output path of each project set to \my-web-server\wwwroot\bin, which works fine on one project. In the properties for all of my projects, I have the output path set to the same directory, but when I try building all but one of the projects, I get the error:
Unable to copy file "obj\Release\Index.dll" to "\my-web-server\wwwroot\bin\Index.dll". Access to the path '\my-web-server\wwwroot\bin\Index.dll' is denied.
I assume it could be an issue with permissions, because my organization keeps things locked down, but I have no control over granting permissions. Any help in the right direction is much appreciated.
It must've been something silly. I deleted the .dll manually, then rebuilt. Looks like everything's working normally. Thanks.
The solution for me was to delete everything in bin and obj folders in every project. Just ran this powershell script as described here.
I had the same issue. A copy of Visual Studio (devenv.exe) was still running invisible in the background keeping the particular dll locked.
Delete all DLLs from the bin folder and build the solution.
just had the same issue, built a new project/solution, got it all working and then added to TFS.
Unfortunately I did not clean the build before adding and this meant some files that should not have been under source control were and were then read only(not checked out).
Manually deleting the files before rebuilding fixed the issue.
Most likely a program is running using that library.
This happens to me when running something to debug, and I forget to close it (not attached to IDE debugger).
And since this looks like a website, it is potentially due to the website being hosted from the development build folder, and someone is accessing it.
Similar to what Aequitarum said, it's mostly likely a locked file because it's in use. Since you have multiple projects, you mostly likely have references between them. And since you have all the projects outputting to the same folder any of the referenced projects will most likely get copied more than once if you have those files set to be deployed in the child project. (In a C# web application, you can view the properties of the reference and look at the "Copy Local" property.) And if you have the MsBuild project set to use multiple processors for the build, two child projects are both trying to copy the file at approximately the same time and one is erring out.
It's a very unique situation, but it is possible.
Working solution
Just go to Task Manager and search Detail (if its Win10) and search with your application name (for easy search just look at your windows user id wise)
And right click shows properties. just give the permission like Administrator access.
That's all its working fine for me. ( I was struggling for 1 week and its killed more my time)
It looks like WSearch Service locks up the files and does not release them. I disabled the service on WINDOWS 10 and was able to rebuild the solution.

Resources