Your Answer


My solution is different from the others, which is located at the bottom of this post, but before you try it make sure you have exhausted the following lists. I followed only these steps, instead of the more complex ones in the selected answer - and this alone solved it. I believe I wasted like 1 day on researching it and this what I have come out with. Delete all contents of the directory "C: The following information can be helpful to determine why the assembly 'MainCore.


Turned out I'd opened a solution without running Visual Studio as admin. Closing Visual studio down and running it again as admin then rebuilding solved this for me.

In my case, I was using simple impersonation and the impersonation user had trouble accessing one of the project assemblies. I am setting-up environment on new server. When I faced with "Could not load file or assembly or one of its dependencies. The issue is random, but after it happens once, it continues". By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies.

Could not load file or assembly or one of its dependencies. The issue is random, but after it happens once, it continues Ask Question. Pablo Claus 4, 3 21 Was this issue caused by uploading a new version of the dll?

Same old version of MainCore. Net files next time this happens, bcoz for cleaning them you might need to restart the IIS. For my scenario, I found that there was a identity node in the web.

Hoping this helps someone else out! For me, locally running the solution means removing the identity node completely from web. Don't forget that impersonation could be done via code without web.

Had to restart Chrome and revisit website to enter my user credentials. Fragment 1 14 This answer along with Love Chopra's solution worked for me. If, like me, you are trying to publish to Azure and get the same error, Go to your app on the Azure portal, Go to Application settings and Select the "bit" option for the "Platform" setting. My solution is as follows: Any solution for the same issue with C1.

The located assembly's manifest definition does not match the assembly reference. Yours is an entirely different problem. Just compare the error messages.

To anyone else who tried most of the solutions and still having problems. NET Files" Keep in mind the framework version you are using. Keep in mind the framework version you are using Change the identity of the AppPool that your app is using, from ApplicatonPoolIdentity to NetworkService. SO Answer Verify impersonation configuration if applicable.

SO Answer My Solution: Net Forum Don't disable the Anti-Virus because it is only doing its job. Yorro 7, 2 26 Net files worked for me even though the error only referenced repeatedly my local bin. Thank you very much I've been fighting against this annoying error for almost two weeks. Again, even though it truly ended up being that my impersonation user needed access to the Temporary ASP. In my case I discovered McAfee was blocking access for my.

Net application's dlls as seen in McAfee's logs. Then remove the Block check for the item called "Prevent all programs from running files from the Temp folder". This can be configured instead of disabled which is better. Look in the AccessProctectionLog. Location of log is on the Reports tab page. I get error using IIS Expresss in development environment. The same issue about AppPools. If you still facing the issue try this: Love Chopra 4.

This answer along with Fragment's solution worked for me. If you are using impersonation, be sure to give permissions, including write and modify permission to the relevant user account on the following folder: NET Files I was missing the modify permission, which was why just adding the default permissions wasn't working for me. I followed only these steps, instead of the more complex ones in the selected answer - and this alone solved it.

This worked for me too. NET Files" folder mentioned. Yasser Amer 1 2. I believe I wasted like 1 day on researching it and this what I have come out with. So basically follow these 2 steps Give permission to Temporary Asp. Naveen Kokcha 26 2. Houdini Sutherland 1, 15 Saurin Vala 4 I fixed it by renaming the corresponding service.

Van Vangor 71 5. Hope that helps someone. Look for the message of the inner exception to identify the problematic assembly. This site uses cookies to deliver our services and to show you relevant ads and job listings. By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Join Stack Overflow to learn, share knowledge, and build your career.

Check if the Administrators security group has full access to the xampp folder or xampplite folder. Apache just needs permission to write on logs directory. You can get this grant it to user running httpd.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies. Starting the Apache2 service os 5 access is denied Ask Question. I installed apache msi from their website in my windows 7 machine.

Failed to open the service.