Running Installutil to install a windows service on a shared folder - windows-services

-Hello,
I am trying to install a windows service from a shared folder like this:
installutil "\\\10.1.5.120\Path1\Path2\MyService.exe"
And having this error:
Exception occurred while initializing the installation:
System.IO.FileLoadException: Could not load file or assembly 'file://\\10.1.5.120\Path1\Path2\MyService.exe' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515).
There is no log at installutil log file and when i try to install service from a local path it installs successfully.
So i wonder is it possible to install a windows service on a pc from a shared path?
Thanks for your help.

Have you tried adding
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
in the installutil.config where the installutil.exe is at?
You can also try rightclicking the dlls and service exe -> properties -> unblock.

Related

MvcRazorToPdf installation issues

I am trying to check out MvcRazorToPdf. I'm installing it from Nuget Manager.
When I attempt to build the project I get this error message:
Error 5 Assembly 'MvcRazorToPdf, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' uses 'itextsharp, Version=5.5.3.0,
Culture=neutral, PublicKeyToken=8354ae6d2174ddca' which has a higher
version than referenced assembly 'itextsharp, Version=5.5.0.0,
Culture=neutral,
PublicKeyToken=8354ae6d2174ddca' d:\PROJECTS\Crowdiet\packages\MvcRazorToPdf.1.0.2\lib\40\MvcRazorToPdf.dll Crowdiet
In order to solve it I installed the latest version of iTextSharp from Nuget. Version 5.5.7
Now I'm building and so it runs.
However, when trying to execute MvcRazorToPdf code I get the following error message:
Could not load file or assembly 'itextsharp.xmlworker,
Version=5.5.3.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or
assembly 'itextsharp.xmlworker, Version=5.5.3.0, Culture=neutral,
PublicKeyToken=8354ae6d2174ddca' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
Any ideas how to deal with this? Thanks.
DSB I've written this as theres too much to place in a comment.
This link should help address your azure query SO.
In regards to what I had said about updating your wkhtml files you need to click this link wkhtml download (this is a link for the site wkhtml page) as this will provide you with the 3 updated files you need for rotativa. There's 2 things that you can do when the download has finished in order to get these new files into your solution. This download will save a setup program to your computer which contains the 3 files. When you are saving the files make a note of where you are saving them to.
Download 7 zip found at 7zip or any file extracting tool if you don't already have one. Right click on your download and use the extraction tool to extract and save the 3 updated files.
If you can't download or don't have an extraction tool then run the setup of the downloaded file. This should save into your program files in your standard drive. Navigate through program files to the wkhtmltopdf folder, click on it, then click the bin folder and inside this you'll find the 3 updated wkhtml files.
When you've got these three files add these to your existing rotativa folder inside your solution. Do a rebuild of the soultion if necessary just to update it. Hope this helps!!

Windows Service Installation .NET-4.5 Cannot load the exe file

I am trying to install a windows service with installutil in cmd and this is the msg I get:
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///D:\inst
all\DemoWinProject.exe' or one of its dependencies. The module was expected to contain an
assembly manifest..
Can you help me out whats the prb ???
I have not seen that problem directly, but a very brief search found this link that may have the answer you seek. In a nutshell, make sure you're using the right version of InstallUtil.exe for the .NET framework targeted by your application and that you do not have any x86/x64 inconsistencies within your assemblies.
FWIW, I personally do not like using InstallUtil.exe to install my Windows service; I prefer the Windows service perform its own installation/uninstallation. This is a fairly straightforward thing to do, as I've shown here.
HTH.
I fixed this problem by writing the path where my InstallUtil.exe is and then Write the command InstallUtil and then write the path where my exe file that needs to be install is.
Note : Make another copy of debug folder in another place and install the exe file from that path. This is because anytime you make a built the exe file changes.So to prevent the changes of the installed .exe make a copy of it in another place and install it.
ex.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>installutil c:\Documents\Debug\WindowsService.exe

Unable to run grails 2.3.0 M2 through command line

I just downloaded the milestone edition grails 2.3.0 M2 .zip from the grails page and extracted in the c:\ directory after which it created the folder : C:\grails-2.3.0.M2.
Then I added C:\grails-2.3.0.M2\bin to the path system variable. After that when I try to run grails from command line (using C:\grails-2.3.0.M2\bin>grails), it gives me the following error:
Error opening zip file or JAR manifest missing : C:/grails-2.2.1/lib/org.springs
ource.springloaded/springloaded-core/jars/springloaded-core-1.1.3.jar
Error occurred during initialization of VM
agent library failed to init: instrument
It is interesting to note that the Jar belongs to the grails-2.2.1 installation folder and not the 2.3.0-m2.
I feel it worth mentioning that I already have grails 2.2.1 in my C drive (C:\grails-2.2.1) and before installing this new version, I was using this version. Also I have removed the old grails bin folder address (C:\grails-2.2.1\bin) from system variables. So anyone can guess what is causing the error?
Check you don't have a %GRAILS_HOME% variable set pointing to the old folder

Installutil keeps telling me "No public installers found". Any ideas?

I am trying to install a Windows service just created in Visual Studio 2008. The Install.log file tells me the following again and again:
No public installers with the RunInstallerAttribute.Yes attribute could be found in the [correct path to my assembly] assembly.
My service has an installer "serviceInstaller1" which is Public and has the correct service name. It also has a serviceProcessInstaller1 that is also Public.
Why can't InstallUtil find the installer in my service assembly?
Turns out everything works when the service.exe is on the C drive.

Msbuild error: failed to start monitoring file changes

when i run Msbuild web.csproj i get the following error:
AfterBuild target> -> C:..\web\obj\debug\csautoparameterize\original\web.config
: error ASPconfig: an error occurred
loading a configuration file:
Directory C:..\web\obj\debug\csautoparameterize\original\Configs'
does not exist. Fail to start
monitoring file changes.
if i open visual studio (2010)..clean solution and rebuild, its fine. if i try to do publish via visual studio, this error returns and i cant build again (until i clean solution).
any ideas?
thanks
Is that a network drive? I was getting a similar error when I had my SVN working copy on a network drive, apparently the folder monitoring service for the test server completely freaks out when it's not a physical drive.

Resources