I have a third-party .net DLL that I installed and registered, and appears in the GAC (c:\windows\assembly). I am able to successfully access the GAL in my development and my test environments, but not in production.
My web service is written in C#.Net, .Net 2.0 framework. I can only assume that the problem occurs during the line where Assembly.LoadWithPartialName() is called
My development environment is Windows XP Pro; test is Windows Server 2003; and production is Windows Server 2003. The only difference between test and production is that production is running over https, whereas test is in http. Is it possible that there is some other permissions error?
I've even tried importing the DLL into the project, but with no luck of success.
Any help or insight is much appreciated!
Ok, here it is: for some reason on the server, when I installed the component, it was running as a "Server application" instead of a "library application"
Administrative Tools --> Component Services
Console Root --> Component Services --> Computers --> My Computer --> COM+ Applications
Right click the utility in question, and select properties. Under activation, select library application; then restart.
Related
At the moment I have a Windows Service and App (Desktop Tray Win Form App with Stop/Start buttons to stop the service and a PING to check the 3rd party API it uses it working and obtain the current balance - It's a Betfair Betting app)
At the moment I am running this off my Win 7 64 bit Desktop but we are moving to a dedicated server Win 2012.
Both the Win Service/Form are in the same project and they reference a DLL which I made that has all the code inside (connects to the DB, 3rd party Betfair API, gets runner/winner info, renews session info etc).
The Windows Server does NOT have Visual Studio on it.
Can I just copy my DLL up to the server, put it in Windows/System32 and Regsvr register it and then copy the .EXE for my Form and Service up to the server?
Also without having the VS Toolset to register a Win Service on a machine what commands do I need to run to install the Windows Service on the Server.
These are 2 distinct solutions, one with the DLL code, one with the Service Project and Win Form Project.
I just want to know the best/quickest/easiest/proper way of getting it to work on the new server without having VS on it to register the service.
Can I just copy the code up to a folder (should it go in a specific folder on the server - the log files are piped out into it's own sub folder of /programdata) and run installutil [PATH TO EXE] to install the Service or is there something more I need to do.
As there are two solutions I can't (or don't know how to) create a deployment package with all the right links and references in across solutions.
However should it be more complicated than..
-Copy DLL to System32
-Regsvr my DLL
-Build the service/win form project on my computer then copy the .EXEs up somewhere
-Run installutil [PATH TO EXE] to register the service
-Double click the windows form to open it (should auto start on reboot and sit in desktop tray)
All in .NET 4.5, Was built in vs 2012, 64 bit, C#
Thanks for any help in advance
Creating a deployment package is the better option, but, because it's not a option for you, the regsvr32 and installutil option should do the job.
Hope it helps!
I have no prior experience working in the .NET stack. Not sure if this is a common requirement. I have developed a simple .NET web service which accesses the COM library provided by a label printer SDK to send print jobs to the printer connected to my machine.
I need to distribute the web service to clients so that it can be hosted on their machines locally. Set up should be minimum - something like an installer which will do the needful to deploy the web service locally.
I assume that any windows machine comes with .NET bundled.
I understand that IIS is the windows equivalent of apache-tomcat. Does is it come bundled with all windows machines? If it does, I figure I can write some scripts to deploy the web service to IIS using the ".deploy" file generated by Visual Studio.
Are there any betters way of doing this ?
So my question is :
How do I distribute a web service that should be be hosted and run locally on the client's machine without forcing the user to download and install a web server and deploy the package?
Edit:
So, I gather IIS is not supported by home editions.
Running Windows 7 Enterprise. VS2013 installed.
I am unable to run any WCF Data Services applications. (e.g. http://code.msdn.microsoft.com/WCF-Data-50-for-OData-v3-53074189)
I receive the following exception:
Configuration endpoint extension 'standardEndpoints/webHttpEndpoint' could not be found. Verify that this endpoint extension is properly registered in system.serviceModel/extensions/endpointExtensions and that it is spelled correctly.
I had a coworker try and they were able to run the sample immediately with no exception.
I feel like this means some sort of WCF component is missing, but Google is of no help on this one.
Can anyone help?
From MSDN - Deploying an Internet Information Services-Hosted WCF Service
Ensure That IIS, ASP.NET and WCF Are Correctly Installed and
Registered
WCF, IIS, and ASP.NET must be installed for IIS-hosted WCF services to
function correctly. The procedures for installing WCF (as part of the
WinFX), ASP.NET and IIS vary depending on the operating system version
being used. For more information about installing WCF and the WinFX,
see Microsoft .NET Framework 4 Web Installer. Instructions for
installing IIS can be found at Installing IIS.
The installation process for the WinFX automatically registers WCF
with IIS if IIS is already present on the machine. If IIS is installed
after the WinFX, an additional step is required to register WCF with
IIS and ASP.NET. You can do this as follows, depending on your
operating system:
• Windows XP SP2, Windows 7, and Windows Server
2003: Use the ServiceModel Registration Tool (ServiceModelReg.exe)
tool to register WCF with IIS: To use this tool, type
ServiceModelReg.exe /i /x in the Visual Studio command prompt. You can
open this command prompt by clicking the start button, selecting All
Programs, Microsoft Visual Studio 2012, Visual Studio Tools, and
Visual Studio Command Prompt
• Windows Vista: Install the Windows Communication Foundation
Activation Components subcomponent of the WinFX. To do this, in
Control Panel, click Add or Remove Programs and then Add/Remove
Windows Components. This activates the Windows Component Wizard.
• Windows 7:
Finally you must verify that ASP.NET is configured to use the .NET
Framework version 4. You do this by running the ASPNET_Regiis tool
with the –i option. For more information, see ASP.NET IIS Registration
Tool
I've seen this issue before with configuring WCF services to run on newly stood up servers and dev/staging environments that I've stood up from scratch. The information on this link has assisted multiple times with this.
I figured it out.. the problem was that I was somehow missing the extension definition for webHttpEndPoint in my machine.config.
e.g.
<system.serviceModel>
<extensions>
<endpointExtensions>
<add name="webHttpEndpoint" type="System.ServiceModel.Configuration.WebHttpEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</endpointExtensions>
</extensions>
<system.serviceModel>
I develop a web application on Microsoft .Net 4 and Entity Framework 5. When I upload the project on my web farm it doesn't work. I believe that Entity Framework is not installed on my web farm. So I contacted my host to support this particular issue.
They said:
Send us a download and installation instructions, with any
requirements to install Entity Framework.
Except we utilize a link from directly within Visual Studio through Nuget.
How do you load the proper deployment information onto a server, since you can't directly deploy with Nuget since they don't have Visual Studio installed?
Server Information:
Windows Server 2008 R2 64 Bit
Nuget link I used to install Entity Framework.
If possible please guide me or reference a place where I can solve this deployment issue. Any help would be greatly appreciated. Thank you for your assistance.
In order to successfully launch your project on a deployment server you should ensure that your application has a Deployment Package to be installed on the server.
Deployment Considerations can be found here:
You have a lot of things you need to consider, but Entity Framework does have a lot of choices and flexibility. Some of your choices:
Click Once Security and Deployment
Windows Installer Deployment
What Is a ClickOnce Application?
A ClickOnce application is any Windows Presentation Foundation
(.xbap), Windows Forms (.exe), console application (.exe), or Office
solution (.dll) published using ClickOnce technology. You can publish
a ClickOnce application in three different ways: from a Web page, from
a network file share, or from media such as a CD-ROM. A ClickOnce
application can be installed on an end user's computer and run locally
even when the computer is offline, or it can be run in an online-only
mode without permanently installing anything on the end user's
computer. For more information, see Choosing a ClickOnce Deployment
Strategy.
ClickOnce applications can be self-updating; they can check for newer
versions as they become available and automatically replace any
updated files. The developer can specify the update behavior; a
network administrator can also control update strategies, for example,
marking an update as mandatory. Updates can also be rolled back to an
earlier version by the end user or by an administrator. For more
information, see Choosing a ClickOnce Update Strategy.
Because ClickOnce applications are isolated, installing or running a
ClickOnce application cannot break existing applications. ClickOnce
applications are self-contained; each ClickOnce application is
installed to and run from a secure per-user, per-application cache.
ClickOnce applications run in the Internet or Intranet security zones.
If necessary, the application can request elevated security
permissions. For more information, see Securing ClickOnce
Applications.
How does a Windows Installer Deployment work?
Windows Installer
deployment enables you to create installer packages to be distributed
to users; the user runs the setup file and steps through a wizard to
install the application. This is accomplished by adding a Setup
project to your solution. When built, the project creates a setup file
that you distribute to users; the user runs the setup file and steps
through a wizard to install the application.
That is a brief description of a few ways, you can find examples here: Once you actually have your host load your deployment package it should run without any issues. Hopefully this points you in the correct direction.
I had windows application and I published it and I installed it in other pc and when I was installing in this error apeared(you cannot run application that require that assembly microsoft sql server.connection info 9.0.242.0 ......)
Random guess...
You need with either SQL Server native client or SQL Server SMO. or both
You say "published" so I'm guessing it's a ClickOnce deployment.
One gotcha of the automated ClickOnce deployment (at least, it was as of VS2008) is that it doesn't automatically pick up the dependencies of any projects you reference in the project you publish from - you have to add the references into your main project by hand, then they will be added to the manifest, and then deployed to client machines upon installation.
Hope this helps.