I'm having a bit of a problem running an AWS Console Application created in VS2010, on the cloud, on the EC2.
When ran on my desktop, it poses no problems, but, when moved to the cloud, it thrown an error saying that it cannot find the AWSSDK.dll.
I changed the path of the references, so that it would mimic the folder structure on the cloud, but that didn't work.
I tried to put another copy of the dll in the application folder and hoped for a miracle, but that didn't work either.
The last thing I tried was to load the dll manually with the AssemblyResolve, but that didn't work either.
Thanks, Catalin
you may visit here
http://aws.amazon.com/sdkfornet/
stick with the style of the code sample
i was tried previously and success =D
Related
We're trying to run R.net from an ASP.Net webpage in IIS, but encounter the problem that the R engine can't access external libraries. I know this is a common problem, but the typical solutions haven't worked when it comes to IIS (only IIS express from inside VS).
For example, when trying to use 'colorRampPalette' in R which relies on a DLL, the following error message appears:
"Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Program Files/R/R-3.4.2/library/stats/libs/x64/stats.dll': LoadLibrary failure: The specified module could not be found."
It is not the stats.dll that is the problem, but rather another DLL it references.
Now, using the function in R works fine. Using the function from R.net in VS debugging works fine. However, running it from IIS does not work. Normally, it's just a path variable missing to get it to work, but this doesn't seem to be the case here.
What we've tried:
Ensured that the PATH variable has the necessary folders (i.e. C:\Program Files\R\R-3.4.3\bin\x64 etc). If this was wrong then R.net wouldn't work locally, and I've also verified that IIS doesn't reset the PATH variables which has been pointed out in other sources. When I check the PATH variable from inside IIS the necessary folders are listed.
Checked that the library, home and bin path in R.net is correct when running under IIS.
Ensured that the IIS_IUSRS user has read/write access to the necessary folders and files.
Verified that the R code is correct.
It seems that this is a common problem, but most solutions refer to making sure the PATH variable is correct, which simply isn't enough in this case.
We're running (Amazon web service):
Windows Server 2016 x64,
IIS 10,
R.NET 1.7,
C# 4.5.2,
R 3.4.2
I've also tried on another (non-AWS) server with a similar setup.
Any ideas of what can cause this? Since a lot of people have issues with R.Net and IIS I suspect someone encountered the same problem where the PATH variable wasn't enough?
As mentioned by user2967150, It is not the stats.dll that is the problem, but rather another DLL it references.
After doing lot of research I found that It try to find Rlapack.dll in 'C:/Program Files/R/R-3.4.2/library/stats/libs/x64/ path.
so you just have to copy Rlapack.dll from 'C:\Program Files\R\R-3.4.4\bin\x64 \Rlapack.dll'
to 'C:/Program Files/R/R-3.4.2/library/stats/libs/x64/ .
After this the web Application can access external R libraries.
Note: I assume that your web Application Run locally but creates a problem when you try to run it on IIS.
I was solving same issue. For IIS I did not find the solution. I was also debugging the R.NET code, but solution by setting correct path to R folder did not work.
The solution is created additional layer, which cover running R project (actually create own R server). I used self hosted WCF service,
https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-host-a-wcf-service-in-a-managed-windows-service
which is practically console application and has benefits application running not in IIS application pool. This solution also cover singleton REngine problem. In case you run the instance or REngine in IIS, there is no posibility dispose it, only by stop application pool. For self-hosted service you can set trigger for restarting application in case memory leak.
During this implementation I discover problem run R.NET again R 3.4.3 in debug mode on console application I get error "The library "..." could not be load", so I used the R 3.4.2. which work nice. 86x installation is required - independent the your application run in 64x/ANYCPU environment.
Have you found any other solution for that?
I am working on a Service Fabric application that contains a number of stateless services and a single stateful service. When I publish the first time, everything is fine and it's deployed to my local cluster. After this, if I try to package or publish the app without explicitly stopping it first, I get the following error:
CSC : error CS2012: Cannot open 'C:...\ProjectFolder\obj\x64\Debug\ProjectName.pdb' for writing -- 'The process cannot access the file 'C:...\ProjectFolder\obj\x64\Debug\ProjectName.pdb' because it is being used by another process.'
According to process explorer, the PDB is locked by my own ProjectName.exe. This is the single stateful service in my application.
Why would my exe lock its own PDBs? I could understand if it was Visual Studio doing it.
I see nothing in my own code that should cause this, so I'm assuming it's something in the Fabric code I'm calling.
The PDBs are deployed with the application, but it's the files in the original source directory that are locked - why not the PDBs adjacent to the running code?
Why do I only see this error relating to the stateful service, and not the stateless services?
I suspect this has something to do with the stateful service generating lots of errors on startup, which Fabric may need symbols to properly display.
How can I stop it happening - either using the correct PDBs or not using them at all unless I'm debugging through Visual Studio?
Edit: Raised on github. Current workaround for this:
A current workaround at this point in time would be to restrict the Network Service access to the pdb in the build folder (obj\x64\Debug).
Based on the issue that was raised, it looks like this is now fixed.
"Going to close the issue as we believe both issues have now been addressed by the 5.6 runtime and the 1.6 tooling."
Seems upgrading is now the answer to point 4. If anyone can answer 1-3 I'd be very happy to move the big green tick.
NOTE: I have done exhaustive research on this question, there are many supposed solutions out there, none of which have actually worked for me.
After successfully installing a windows service onto a clients computer, I notice that it doesn't start automatically as it is supposed to. When I try to start it manually, I get the error above. I took a look at the Events Viewer log, and here is the error logged there: "Service cannot be started. System.IO.FileNotFoundException: Could not load file or assembly "assemblyname.dll" or one of it's dependencies. The specified module could not be found"
It turns out that my .dll, even though I can see it in the installation folder (I did the side-by-side), the system is not able to connect to it. Someone suggested making sure the application file name and the config file name match, mine already did, and my service is set to run on the Local System Account. NOTE: Everything works fine on the dev box, and the client machine has the requisite 4.5 .NET framework for the service to run.
QUESTION: How can I correct this? How can I make sure the system on the client machine is able to see the .dll file that the service uses?
Any help is appreciated here. Let me know if further clarification is needed.
Thanks
Possible solution
Try compiling it in x86, could be a 64-bit dll, make sure you have the 32-bit version.
OK guys I finally solved my problem. I ran dependency walker and It gave me a list of dlls that were missing, but it turned out they had nothing to do with the dll I was using. But I decided to install Windows SDK for Win 7 with the redistributables, and this solved the problem i was having. There you have it folks, hope this helps someone else going forward. Cheers!
I have got setup project working with database and wpf on my machine, but when I try to install on other machine I can successfully install and run. When I try to run any function with datagrid just stops working but Can see is adding this to database, but on my machine with the setup runnig doesnt do that, displays without any problem. Havent got any idea of what can be.
pls helpppppp .
I think, that problem is in references: maybe on your development pc is installed some control which is used in your project. So when you try to run on other pc, where application can't find right dll in GAC, you get exception. Try to read exception carefully and you will find information about what is missing (some exception details can get to event log of pc).
EDIT
Other possibility is connection string in config file.
I'm working on a moderately sized WebForms project. Due to the peculiarities of management here, I have to upload the site to a remote server in order to test (no localhost testing). I'm using the 'Publish' command in Visual Studio 2008. Sometimes, it even works. Most of the time, I inexplicably get a "publish failed" in the bottom left corner, with no further details.
The few googled articles/forum posts I read suggested making the target local folder for the publish operation readable/writable for everyone. Doesn't help.
Is there are way to get further details as to WHY a publish fails in VS2008, and if not, is there a better way of doing these deployments? I'm spending more time building/pushing to the web server than actually debugging.
It's worth checking the output window. I've just had a publish fail because I had deleted an image outside of VS so VS was complaining that the image couldn't be found, but this information was only displayed in the output window.
See this link for more information:
http://ericfickes.com/2009/08/find-out-why-visual-studios-publish-fails/
It happens to us when there is an error in markup (!). Bad thing is that VS will just swallow the error and just tell you Failed.
What I suggest is to run your publish from command line using MSBuild. It's not that straightforward but it works (once you get into it).
I've since discovered that the reason for these particular publish failures was due the "Delete Existing Files" option being checked. Using Visual Studio 2008 under a non-administrative account on Windows Vista could cause a permissions error while attempting to delete the existing files. The publish would fail silently after encountering a file that Visual Studio had insufficient access to delete. Once the files were deleted manually outside of Vidual Studio, the publish functioned normally.
I have not had this issue with Windows 7; I assume the UAC changes in Windows 7 fixed the problem.
I mostly work with Web Forms, and I encounter this problem daily.
It seems to me that publish fails when it fails to delete a file it is trying to replace. Even if I don't have any files open, it still fails sometimes. Not sure why.
Not only VS publish fails very often, it is painfully slow as well.
I just publish to empty local directory and use separate FTP client to upload files. It's more work, but works.
This is probably not the case for you, but I've seen this happen when I'm publishing a web site. If the app_offline.htm file is not excluded from your project (if you use this file), the publish will fail.
Same happened to me.. what I did was include images files that was not included in the project and delete images that were not used.
After struggling with a similar issue for about 30 mins with no clue as to what was causing it closed down VS and reopened my project. Started working fine. No idea why but it worked.
You should always stop the IIS instance running on the machine your are publishing to. Google the word "iisreset". Other hosting providers like DiscountAsp and Arvixe offer you tools to "Stop" and "Start" your app pool on their IIS remotely. This is very necessary because IIS may have locked some files as "in use", so your publish fails when it tries to write over them. When your publish is complete, then just restart IIS (or press "Start" from a web tool if you're using a 3rd party hosting provider).
When all else fails, check your "Output" window (the tab to the right of your "Error List" at the bottom of Visual Studio). Scroll through all of it after a failed publish and look for anything that says "Unable to add". If you keep seeing the same "Unable to add" errors on the same publish, then ftp into the folder, delete the the problematic files manually, and try publishing again.
I got this when my ProjectName.Publish.xml file was read-only. Once I checked the file out of source control, I no longer got the error and could publish.
Just to add to this thread, I found that, for some bizarre reason, only the Mercurial files were being published to the server, everything else just wasn't being copied across.
Another strange thing was that only the Debug configuration was available; Release was nowhere to be seen.
After reading other threads around S.O., I found that there were many for VS 2010 and 2012, but not much to cover the same problem with 2008.
The fix, I found, was to delete the [solution].suo file and then attempt a publish. That seemed to do the job, though it took a long time to complete.
What I found and work in my case. It is to use a different version of VS.
I recently had the problem, the solution works perfectly in VS2015 build, compile and tested.
However, when I try to publish was failing silently.
So, I closed the solution and open it with VS2017 that use the same file structure for the projects/solutions. Then rebuild it and publish without any problems.
I believe it could be VS related and it is complicated to debug.
This is a workaround if you work with multiple Vs instances in your local machine.