Error Could not load file or Assembly Microsoft.Web.Infrastructure

Asked

Viewed 6,198 times

1

I created a site in c#, the same runs on my machine, but when I publish and update on the server via FTP(Filezilla) this message appears, someone can give me a tip on how to solve ?

Could not load file or Assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, Publickeytoken=31bf3856ad364e35' or one of its dependencies. System cannot find specified file.

  • 2

    You need to include this dll in the files that go to the server.

  • On which server are you trying to publish your application? Some servers like Locaweb or even godaddy, depending on the plan need special permissions for the directory.

2 answers

1

This is because the server you are using does not have some files that are needed to run your application.

You can take the project dependencies and put them together in the bin folder. You select the dlls(s) that are occurring this error in your project references (NomeDoProjeto/References or NomeDoProjeto/Referencias) and go on the estates (Alt+Enter) and change the value of the Copy property Local/Copy Local for true.

That should solve your problems!

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.