dll is not updating in production server - c++

I have a Visual Studio project developed in asp.net that calls a .dll developed in C++. I modified the .dll file and replaced the old file located in the bin folder. Locally, the website worked fine. I did the same in the production server, but the change was ignored, the web site behaved like the previous file. Why?
I did a test leaving the message “new version” in .cs file to check if it is updated in the production server. And it is indeed.
I did another test cleaning the history browser, but the problem remained.
In another test, I removed the dll file from the bin folder, and the website continued to work normally. How is that possible?
I read from a forum (link) that asp.net makes a "shadow copy" of the files and loads them from the copy. But it should not be a problem.

Related

Codename One: Webservice not available

I used the CN1 Webservice Wizard to add a the webservice proxy to my mobile app and to generate all the server side code. I have a local XAMPP installation with a tomcat linked within my Eclipse IDE. Also, I imported the server generated code as a new Java Project and added the "Dynamic Web Module" project facet to it so that I could launch it not as a local Java application but rather on the Tomcat server.
When starting my client, I noted that I get HTTP 404, resource not found errors. I traced the error back to the URL, where the server is hosted to.
I know I have to adapt the urlPatterns parameter in the generated class CN1WebServiceServlet, which I did. Also, I checked the context of my app in the Web project settings and defined the value for context root. So, in my client app, the URL to call the service should be
http://localhost:8080/< context root>/< urlPattern>
However, even when calling that in the browser, I should get the result of the doGet method of the server generated code, showing the message "Webservice access only". Instead, I get 404 errors all the time.
Is there some problem to importing the server generated code as a plain Java project and adding the web parts to it afterwards? How would that be done in the ideal case?
And what other problems might be hindering the URL from properly being published on the server side?
Thanks and best regards
EDIT
I stripped everything from the project to limit the options and I found the cause: when using the web service wizard to dump the source files into a new directory, adding that with the Eclipse import wizard, it will be looked at as a plain java project without any web components. Using the project settings to add the dynamic web piece to it (Eclipse calls those project facets), the CN1 webservice will NOT work.
If instead you create a "Dynamic Web Project" first and then use the CN1 Webservice Wizard to dump the server source files into the "src" folder of that project, it works without any issues.

Visual studio 2017 Publish web project to folder fails

The following errors pop in the log when publishing web project to folder.
....
Publishing folder /...
Publishing folder bin...
Publishing folder bin/es...
Publishing folder bin/roslyn...
Unable to add 'bin/roslyn/System.IO.FileSystem.dll' to the Web site. Unable to add file 'bin\roslyn\System.IO.FileSystem.dll'. The process cannot access the file because it is being used by another process.
Unable to add 'bin/roslyn/System.IO.FileSystem.Primitives.dll' to the Web site. Unable to add file 'bin\roslyn\System.IO.FileSystem.Primitives.dll'. The process cannot access the file because it is being used by another process.
Unable to add 'bin/roslyn/System.Reflection.Metadata.dll' to the Web site. Unable to add file 'bin\roslyn\System.Reflection.Metadata.dll'. The process cannot access the file because it is being used by another process.
Unable to add 'bin/roslyn/System.Security.Cryptography.Algorithms.dll' to the Web site. Unable to add file 'bin\roslyn\System.Security.Cryptography.Algorithms.dll'. The process cannot access the file because it is being used by another process.
Unable to add 'bin/roslyn/System.Security.Cryptography.Primitives.dll' to the Web site. Unable to add file 'bin\roslyn\System.Security.Cryptography.Primitives.dll'. The process cannot access the file because it is being used by another process.
Unable to add 'bin/roslyn/System.ValueTuple.dll' to the Web site. Unable to add file 'bin\roslyn\System.ValueTuple.dll'. The process cannot access the file because it is being used by another process.
Unable to add 'bin/roslyn/VBCSCompiler.exe' to the Web site. Unable to add file 'bin\roslyn\VBCSCompiler.exe'. The process cannot access the file because it is being used by another process.
Publishing folder bin/zh...
...
Publishing folder Views/WFDefs...
Publish failed. Target file://machine/d$/PATH.
If i publish using web publish it works, but the real target doesn't support web publishing.
Note: VBCSCompiler is not running.
I had the same problem with my application with Visual Studio community 2017. In my case the solution was simple, I only deleted all the files inside the directory bin (C:\Projects\DotNet\ApplicationName\bin) and after I recompiled the application.
I hope it can help you.
Had this same issue in Visual Studio 2017 Community Edition. As your question came up in Google but no answer, I thought I'd add to it.
I found Process Explorer from Sysinternals helped me a bunch.
Open sysinternals and go to Find -> Find Handle or DLL... or (Ctrl + F) and search the file that's being held open. In my case "System.IO.FileSystem.dll"
The search results showed two instances of MSBuild and one VBCSCompiler was hanging onto the files. Worst case, I just killed the process tree, built the project and all was well again.
Related answer: https://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows
If you try to publish asp.net web app in Azure and getting above error then try to UPDATE the Microsoft.CodeDom.Providers.DotNetCompilerPlatform package to V1.0.7 or later. Initially, in your application, there will be Microsoft.CodeDom.Providers.DotNetCompilerPlatform version 1.0.5 then uninstall and then install the latest version V 1.0.7 or later of it. Clean your solution and build. Now you will be able to publish your web app in Azure using Visual Studio 2017.

How to "Run" a .svc WCF Web Service

I am working on a project that was last worked on by someone who hasn't been on the team in some time. Having gotten a hold of him to ask him questions about the project and next steps in general, I was told I need to run a Java web service. After not being able to find any .jws files in our network, I asked if a particular .svc (WCF Web Service) file was the right service and was told to "run [filename]" which is the .svc file. This file is in a directory with some relevant Java class files that appear to have been part of an eclipse project (which I am unable to open).
Now I've looked around and all tutorials I can find about running a .svc file involve a visual studio project and creating the project from scratch, not just running a single .svc file as a web service. I'm new to Windows in general and haven't seen a .svc file. Does it make since to say to simply "run" a .svc WCF Web Service? And does it make since that a .svc file would be created from a Java project? If so, how would I simply run that service?
I hope this question made sense. Thanks for any help!

Coldfusion Server Standalone server displaying source code

I needed to install Coldfusion 8 on my local Windows 7 PC, to do some testing. I took the easy route and installed the Standalone server, which included a built in web server. I didn't really need a fully fledged web server, just needed to test.
So after some time of Coldfusion working fine. It started displaying the source code of the page. In other words, Coldfusion was not parsing the page. Merely displaying the source code.
I've worked out that the following line will make the page display source code
<?xml version="1.0" encoding="utf-16"?>
Even if I remove this line from the source code, the source code is still displayed. So I have to make another .cfm file with all the code except the above line, for it to run.
My question is, how do I clear the Coldfusion Standalone Web Server's cache? I've tried the usual restarting of Coldfusion to no avail.
Update: I eventually used a workaround of just renaming the files ie: testing1.cfm, testing2.cfm. For anyone else getting this issue, just use a standalone web server like Apache.
Have you tried restarting ColdFusion?
Have you tried clearing the cache in your browser?
For what it is worth, I prefer to use a web server even when doing development. I have found that using the CF web server and having all my projects under the CF web root can lead to pathing issues in production.
Not sure if you have already fixed this issue but there is an option in the ColdFusion administrator under the Settings > Caching option. At the bottom is a button named Clear Template Cache Now. Clicking that button will empty (remove) any templates that ColdFusion has cached. The next request to that template will force ColdFusion to recompile it if it has been modified.

Wsdl never updates

No matter what I change in an asmx service in Visual Studio, the WSDL file stays always the same. Deleting methods, changing method signatures don't have any effect when I browse to service definition.
I have had a simular problem.
When removing an enum and replacing it by a string, the enum wouldn't go away from the wsdl. No matter what I tried (clean, rebuild, clear browser cache, other browser), it kept returning the enum as a complex type within the WSDL.
The solution in my case was remove the local folders of the project via windows explorer, then perform a get latest from TFS. After this the problem was solved.
Of course this solution only aplies when using a sourcecontrol system.
After changing your service, you must build it and ensure that the new version is running. One shortcut would be to build it (and make sure there are no errors), then right-click the .ASMX file and choose "View in Browser".
Also, although I'm sure you're aware of it, you should not be using ASMX web services for new development. Microsoft now considers ASMX to be a legacy technology. Use WCF instead.
I have encountered this problem and have a solution.
Cause: When you create a new "Web Service" project in Visual Studio, it automatically adds a "Service1.asmx" file to your project. You rename this file and change the class declaration inside of it, but Studio still thinks it's "Service1" wnd will only ever display the web service definition for "Service1".
Solution:
Delete all "bin" and "obj" folders in your project.
Copy the methods from your existing asmx file to notepad.
Remove the service from your project.
Add a new service to your project, with the name you want.
Paste the code from Notepad into the new service.
Rebuild All
Your asmx should now accurately reflect your web service and update normally on future builds.
I had today the very same issue. It was caused by a GACed version of the assembly that contained the type definitions exposed by the web service. I had to remove the assembly from the Global Assembly Cache first, like:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /u YourAssemblyNameWithouthDllExtebsion /f
Be sure to restart the web server hosting the web service to reload the new version of the assembly, for example, in case of IIS Express, you can kill the former process instance by PowerShell:
(Get-Process -Name iisexpress).Kill()
After that, the updated WSDL version was displayed as expected.