Serving custom user controls on webpages: How come all of my DLLs aren't making it to the client? - vb.net

I have a UI hosted on a webpage. I'm able to run the control on the server hosting it, but when I attempt to run it from other machines on the intranet, only some of the required DLLs make it to the client.
What direction can I take to investigate why this is happening?

I don't think an ActiveX control copies DLL's to the client. More likely the clients already had some of the DLLs. You'll need to install the additional DLLs somehow (as a downloadable installer or using custom code). You may run into permissions issues trying to install DLLs via a web page.

Related

Deploying an application server to a server

I am building a client-server application, this is all running locally on my computer whilst I am developing the system. However, eventually I would like to deploy the server-side part of the application to a server to run 24/7, enabling client applications to connect and consume the service at will. What I would like to know is, when I come to doing this would I simply just install the server-side application on the server, hit run and that's it? That just seems... well not right (to me), is this the way it is done? or is there a lot more to it? I imagine there is, but I can't seem to find any content on this subject.
FYI - the server is a self hosted WCF application.
You'd want to take your program's executable, support dlls and config files and drop them into a folder. Then create a Windows Service to run the program; if you don't use a Windows Service, the program will only run while you're logged on, which isn't good. As a Windows Service, a reboot of the server will bring the program back online even if you're not logged on.
Here's a knowledge base article from MS on how to make a windows service.
http://support.microsoft.com/kb/251192
If you're program is compiled as a DLL, then create a small .exe program to run it (a wrapper) then deploy the program as described in the article.
Good luck.

Using User-Downloaded DLLs In Windows Phone 8 Application

Short question:
Does the Windows Store allow applications that obtain DLLs or other low-level resources not packaged at compile time? Is there a requirement either by Windows Phone or Microsoft that requires DLLs to be signed? If so, can I use a DLL in my application that is signed by another developer?
Why I'm asking/explanation:
I'm working an an application for Android that allows users to download extensions (like themes), and I'd like to port this to Windows Phone.
I have determined that it's not possible for my app to utilize libraries or other resources of other applications downloaded from the Windows Store. (Please correct me if this is not always the case)
The workaround I'm considering is an in-app download center for other resources specific to this application. I'm wondering if a downloads for this app, specifically DLLs, can be used in my application. These DLLs would be developed by 3rd party developers, so I see that signing might be an issue.
The store specifically prohibits any additions / modifications after the app has been purchased. So although it may technically be possible, they won't certify it.
This makes sense if you think about certification . If they would allow this, it would make certification a moot point, since you would just publish a basic app, and afterwards side-load the uncertified part.

Fresh XP +click once +cannot connect

Greetings,
we have to following problem.
Our application is deployed using ClickOnce. Everything is running fine and application is able to connect to the wcf service. The problem occurs when application is installed on FRESH XP machine without .net Framework and Windows Installater (that were selected in ClickOnce prerequities).
Application downloads .NET Framework 3.5SP1 and windows installer but then it cannot connect the the server. Reboot after install does not help.
The strange is that this application has been installed on 10 xp machines and 4 of them can connect to the service without a problem
Are there any dlls referenced in your application? You might want to check them (Under project's Properties\Publish tab\Application Files button) see if you missed to include the needed dlls or files.
alt text http://www.freeimagehosting.net/uploads/e8ff221e20.jpg
We ran into this and were forced to reinstall .net on some machines no idea why though.
This is a shot in the dark but have you tried depends.exe and see if it can profile what is happening.
Also Take a look at this blog and get a crash dump and see if you can use it to at least tell you what is complaining the loudest.
What do you mean when you say 'cannot connect to the server'?
a. The machine cannot connect to the install location and therefore the clickone app is not installed?
b. The app installs (along with the pre-requisites) and starts fine. Then it is unable to connect/communicate with your WCF services.
I presume (b) I just wanted to clarify.
What happens when you ping the machine the services are on from one of the failed install machines? Also what happens when you put the service url into a browser on one of the failed install machines? Can you see the wsdl?
Obviously your deployment package works because it works on those other machines (I assume it IS the same package all machines are installing?), therefore I doubt you are missing any dll's as a ClickOnce app should include all dll's it needs (sometimes you do need to tell ClickOnce explicitly to include).
Last question is, when the app tries to call the service, exactly what exception is it getting back?
I just remembered something which has caught me out in the past with some machines being unable to connect but others can...especially 'new' machines.
Check this file:- C:\WINDOWS\system32\drivers\etc\hosts
Check the contents on a machine that works and one that doesn't. We have some IP to machine name mapping going on that on new machines is not set and so the new machines cannot find the servers.

WCF Client DLL Internet Delivery Problem

We are creating a WCF service with a companion client DLL (.Net) that we will be delivering to a user's GAC via a web page. The DLL knows how to communicate with and how to interface with the service, and will allow the web page to communicate with the WCF service via client-side Javascript calls. The user's machine will be executing the DLL's functionality, not the server. With it data will be transferred to the target server.
This works in theory (and practice) over our internal network. The network is, of course, in a trusted zone so there are no problems with delivery, GAC install and DLL utility. The client-server pair works as expected. We can download the .Net DLL with an object tag, install it in the GAC and use it easilly.
In order for an internet user to be able to download the client .Net DLL however there are security procedures that need to be put in place. We do not have the expertise yet to know exactly what they are, but we are aware that we will need to at least sign the DLL with a trusted certificate. Beyond that, we are unsure.
The question then is what do we do from here?
Give the assembly a strong name (sn.exe - etc)
Create a Windows Installer Project from Visual Studio that will add your custom assembly to the target machine's GAC. (Right click File System on Target Machine | Add Special Folder | Global Assembly Cache folder). Let users download your installer from your web page, probably the most painless way instead of forcing something via the browser.

WCF Automated Deployment

I am in the process of setting up some IIS hosted WCF projects for continuous integration and am stuck trying to find the best and simplest way to get deployment automated.
Right now, I have the build and deploy working with CC.NET, MSBUILD and a batch file that copies the necessary files to the deployment folder, but I think there must be a better way.
Ideally, I'd like something like web deployment projects, but for WCF.
I would settle for a nice Power Shell script to copy all the necessary files and exclude all the fluff.
Well, there isn't anything stopping you from using a web deployment project for hosting your WCF class library. The SVC file will be picked up by IIS and routed appropriately. We use a standard deployment project and a custom action to create the IIS vroot so that we have a finer control over the settings but a standard web deployment project will do the job as well.
Unless you are running under IIS7 then as far as IIS is concerned it's just standard content that has it's own handler. When you get to Windows 2008 / Windows 7 Beta then things can change a bit as those versions have a very different handler model.
I've found this post to be really helpful: http://msdn.microsoft.com/en-us/library/bb332338.aspx
This depends very much on the technologies you are using. On a previous project, we used TFS, with Team Build. The result was that the WCF projects were built into a folder structure that matched their deployment structure. Additional tasks in the MSBUILD script triggered a deployment script (written in PERL, I think). This took care of all deployment tasks, from deleting old folders, creating the new, creating databases and populating with reference data, then deploying the service and web sites, and finally running Installation Verification scripts and publishing the results to a web site.
On the other hand, if all you've got is a hammer, then hammer away.