net development. I am working in a website project and I am trying to update one of the dll files. I've search for hours for a solution on stackoverflow, but no luck.
Our website project in Visual studios is composed of one website that uses three C# projects. I am trying to update just one of these C# projects. Currently the website is in production and the DLL files of these projects are in the /bin folder.
I opened up the solution in VS and made my changes.
I built the whole solution and retrieved the new dll.
I stopped our in-process website with IIS and overwrote the dll and restarted it again.
I get an Missing Method Exception as an error when I do this. I was hoping for a straight forward way of updating our website project because I only need to change about two lines of code and swapping dll files seems like the easiest way of doing this.
Thank you guys for your help and be patient with me I am a slow learner and I ask a lot of questions.
One of the reason of this to occur could be that your dll is built using different version of .net framework than what is on your server. You can check that and see if that resolves the issue.
Related
I have a Visual studio solution with 3 projects (umbraco cloud site). One of the projects is a website that runs on a webserver (web), it references another project which contains the business logic (core).
Id like to use miniprofiler to profile the referenced DLL when im running the site but i dont seem to be able to see the results on the front end of the site. I can see steps that ive added in the web project however.
Is it possible to do this? Thanks, Jonny
I am sorry to ask a question which doesn't have a specific problem, but I would be more than grateful if you could point the problem. (I can always provide other parts of my code which would be relevant to my question)
I am using Visual Studio to create my web application with ASP.NET MVC Core. All is good with the project and I can make it work on my localhost.
I bought a third party hosting service with Windows hosting (Plesk) and as far as I've asked them, they said their hosting plan supports ASP.NET Core.
For the deployment part, I've literally searched each and every source and tried various different methods but could not properly upload my files on ftp. Trying ASP.NET Core 1.0.0 version worked well and I uploaded a sample website, but since I am working with ASP.NET Core 1.1.0 now, I am unable to find a solution.
Here is what my publish profile looks like before hitting publish button:
I'm not really sure if I filled all the information correctly, but validation seems to work well.
And here is the log which I get after trying the publish via ftp method in visual studio:
Even though it seems to succeed, when I look at my ftp directory after this process, the files in visual studio project were never uploaded in the directory.
Any help is appreciated, thanks.
I have deploy the same on my server and it is working fine see the attached screenshot.
This is my first question here. I'm working on a Windows 8.1 with Visual Studio Community (Update 2). I'm building a small service in C# for my company that parses emails from an Exchange web service. In my solution, there are 2 projects: one built from scratch where I create the service and deal with emails, and the other one is a "Visual Studio Installer" that creates a small .exe to install the service with with all its dependencies.
The first project uses Microsoft.Exchange.WebServices.Auth and Microsoft.Exchange.WebServices libraries to communicate and parse emails from an exchange web service. These two dependencies are coming from NuGet. Both projects are built with the 4.5 .Net Framework. The installer has one main output which is the service project and has 4 dependencies:
Microsoft .NET Framwork.dll
Microsoft.Exchange.WebServices.Auth.dll
Microsoft.Exchange.WebServices.dll
System.net.HTTP.dll
The service works pretty well and I'm happy with it. I tried to update my code this week to see how I can write in the Windows journal. The issue is that since this week (30/05/2016) I can't regenerate my solution. I can build the first project (service one) and there are no issue but for the second one (installer), 4 warnings show up (both appear twice in DEBUG mode and 3 times in RELEASE mode):
WARNING: Unable to find dependency
'MICROSOFT.IDENTITYMODEL.EXTENSIONS' (Signature='69C3241E6F0468CA'
Version='2.0.0.0') of assembly
'Microsoft.Exchange.WebServices.Auth.dll'
WARNING: Unable to find dependency 'MICROSOFT.IDENTITYMODEL'
(Signature='31BF3856AD364E35' Version='3.5.0.0') of assembly
'Microsoft.Exchange.WebServices.Auth.dll'
These warnings explain the fact that the installer don't appear anymore in the DEBUG and RELEASE folder. I reverted the code I wrote and the error is the same. I also tried to create a new solution with the same project as 4.5 Framework basis and with an empty project but with the same dependencies I have the same warnings.
Do you guys have (had?) the same warnings?
I found a solution to my problem. My solution was saved directly on a remote hard drive. When I built the soution, .net framework was not found (my error). I re-create localy my solution and it works. Hope it will helps others.
Perhaps, I don't know why from one day to another .net was not found. Maybe Windows update has crashed during an update.
We have a C# .NET website which was developed and maintained by a third party. I'm due to take over the general upkeep soon, so am trying to get a system going where I can maintain a local copy and deploy updates to the website. We need to make it work for two of us to work on for at least another month, after that I'm on my own.
We have an SVN of source, and an SVN of production published code. I can pull the solution and after some faffing I can make it build and run without problems locally. I'm using Visual Studio 2015, the target framework is 4.0.
I can update cshtml files, build, publish locally, and then copy these files over the website published version and it runs fine.
However, the bin/dlls that are produced, if copied into the website version, produces this fabulous error:
http://website.com/Error/InternalServerError?aspxerrorpath=/
Server Error in '/' Application. Runtime Error.
Description: An exception occurred while processing your request.
Additionally, another exception occurred while executing the custom error page for the first exception.
The request has been terminated.
If I copy back the dlls from the original, it works fine.
If I don't modify the code, but just build and publish the project, my dlls are still different sizes from the website versions.
The developers are using Visual Studio 2012, is this a factor? Why are the dlls for my local version (that runs fine) different, if I download the source and build/publish it with no changes?
The dlls in question by the way are a single one for the website itself, website.dll say, and one for 'objects' that they've dumped a load of functions into for doing various things, objects.dll, these are the only two I'm trying to copy over - all the other dlls match in size between my and the website versions.
I'm pretty new to this so may be making some fundamental mistakes here, but if I am, then our developer isn't picking up on them. I mean, I'm kind of not surprised that they're different, surely you need to deploy the whole project, and not just drop some dlls into an existing published folder? My developer is saying that's the only way we can do it...
Any tips of things I can try?
Thanks in advance.
Well, after a LOT of trial and error, I finally found a solution that works for me, for the moment:
Using nuget package manager, I reverted to Microsoft.AspNet.Mvc version 4.0.40804 for the project in question. This seems to have updated all the references and runtimes back to the 4.0.0.0 that the project was built using.
When I build, publish, and copy across the main dlls, the site now runs, rather than showing the 'Server Error in '/' Application. Runtime Error'
One thing, are there security implications for running such an old version? Maybe that needs to be a new question...
Thanks for all the help.
I have my project created in Asp.Net 4.5 Mvc 5 C#. I'm using Asp.Net Identity for login and signup. I published this app from visual studio. soon after i'm getting this error whenever i try to login or register. all else is working fine.
What have i tried -
I try to clean build rebuild solution many times
I try to restrat visual studio.
I try to clean release debug solution many times.
deleting all dll from bin folder and build solution again.
but none of these solution seems to be working. Any help will be appiciated.
Ok this looks like you are referencing different versions of assemblies.
One reason could be that .Net picking wrong referenced assembly version
If you are using a layered architecture then make sure that your main project and other projects referencing Entity Framework are using the same version.
Dont know why but changing database works for me. I just changes connection string to connect another backup copy of database and it starts working fine.