.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Trouble deploying Winforms application that accesses com components

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Windows Application
Using VS2008 Framework 3.5. I have a Winforms application (exe) that uses a Winforms user control (dll) that uses a VB6 user control (ocx) that connects to a VB6 ActiveX EXE. All of this runs on a single Windows XP workstation, no networking involved. I have verified that the VB6 components are installed and working properly. When I run the Winforms exe on my development machine, it runs correctly. When I copy the Winforms exe, dll, and interop dlls to another developers workstation, it too runs correctly. When I copy the same files to a non-developer workstation, it does not run. I get an error that says the application encountered a problem and needs to close. The error signature refers to an Event Type:clr20r3 and a system.invalidoperationexception. The workstation has Framework 3.5 and the VB6 components are installed properly. I looked at the CAS and it appears everything is running with fulltrust. I also tried building the assemblies with strong names. And I tried installing them to the GAC... no change. It seems like I must be missing something easy. Can anyone point me in the right direction? Thanks

View Complete Post

More Related Resource Links

.NET CLR Profiling Services: Track Your Managed Components to Boost Application Performance


The Microsoft .NET platform provides you with a rich set of services for building profilers and application monitors for applications targeting the Common Language Runtime (CLR). These services expose runtime events that occur during the execution of a .NET application. They can be used to obtain information about managed code being executed under the runtime. This article describes the .NET CLR Profiling Services and shows how to use the services to build a simple profiler that will provide hot spot information for any .NET application. The sample profiler can easily be modified to suit other profiling and monitoring needs.

Anastasios Kasiolas

MSDN Magazine November 2001

Having trouble starting my very own MVC tutorial-sans web application.

I'm having trouble trying to understand what to do here. My objective isn't as simple as a regular old CRUD form to create a new entity, but rather a browse index page that will list all of the Evaluations in my database. Each evaluation is attached to a RegisteredCourse which in turn has a Teacher attached to it. Here is how I'd like to present the information:My table structure doesn't allow me to just invoke it simply, so I know I have to create a ViewModel to have my controller give my View something nice and useful. My question is how to create this ViewModel. I'm stumped because I've never tackled this sort of problem before. Thanks. Below is SQL schema if that helps.create table Grado( ID int identity(1,1) primary key, Nombre varchar(64) ) create table Jefe( ID int identity(1,1) primary key, Nombre varchar(128), Apellido varchar(256) ) create table Area( ID int identity(1,1) primary key, IDJefe int foreign key references Jefe(ID), Nombre varchar(64) ) create table Carrera( ID int identity(1,1) primary key, IDArea int foreign key references Area(ID), Nombre varchar(64) ) create table Docente( ID int identity(1,1) primary key, IDCarrera int foreign key references Carrera(ID), IDGrado int foreign key references Grado(ID), Nombre varchar(128), Apellido varchar(256), Carnet varchar(20), FechaNacimiento datetime ) create table Materia( ID int

C# Winforms Application Permission

Hello, I am trying to write a C# application that needs to run on multiple server OS, including 2008. My application stores information in the registry (for now) and needs to write to both local drives (on the server) and remote shares. Text files are used to write logs on the server, but I also need to record events in the event log. The application works fine on 2003, but when I run it on 2008, I am facing issues. It's able to read/write to the registry on 2003 & 2008. It can even write to text files (as long as its not the root of the C drive) without any elevated privileges. When it comes to event logs, the program can easily write to application log on 2003, but on 2008, security exception is thrown. I know this is because it parses through the securtiy log as well, which creates the problem. I can live with not being able to write to the event log, though I would appreciate it if some one could tell me how to do it on 2008 as well. Now to my question: Can I run my Winforms application on 2003 or 2008, automatically giving it elevated permissions (full admin rights) with out having to use the UAC prompt or an Administrator Command Prompt window. The application needs to run without any user interaction, part of the requirements. If someone could help me, I would really appreciate that. Thanks. Sri

JS script file path screwed up after deploying MVC application

Hi,  I am relatively new to MVC, after deploying my MVC application as per Haack http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx i seem to have got a new problem. My Jquery doesnt seem to get recognized. I get "object doesnt support this property or method " at this line "jQuery(document).ready(function() {" i have tried all sort of things including changing the js script file path to relative and absolute, setting base tag etc. Kindly advice if the above method of deploying is right and if that is what is causing the issue and if there is some other way to handle the .mvc requests.   Thanks and Regards, Muzammil Ahmed

Error while Deploying WebMatrix Beta Application having SQL Database on Remote Server


Hello All,

I have created "DotNetNuke SQL Database Application" from the WebMatrix Gallery.

Now I want to deploy it on the remote server using Web Deploy method.

Without selecting SQL database, application is deployed successfully but when I select SQL database it gives following error:

Publish : Error - Make sure the database connection string for the server is correct and that you have appropriate permission to access the database. (Web Deploy provider is dbFullSql).

Can anyone have the solution of this error?

Thanks in advance....

Error - Two components with the same id can't be added to the application



    I am using the AJAX Control toolkit version 4.1.40412.0 in a C# web application that is using .NET 4.0.
I am programming with Visual Studio 2010.  Most of the time, the AJAX Control toolkit works properly.  However,
in one instance, the AJAX Toolkit generates this error message:

Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id
'ctl00_ContentPlaceHolder1_FormTemplateCtl7_UpdateProgress1' can't be added to the application.

The error is generated here:

function Sys$_Application$addComponent(component) {
        /// <summary locid="M:J#Sys.Application.addComponent" />
        /// <param name="component" type="Sys.Component"></param>
        var e = Function._validateParams(arguments, [
            {name: "component", type: Sys.Component}
        if (e) throw e;
        var id = component.get_id();
        if (!id) thro

Exception when deploying .net remoting application over internet

Hi everyone,

I'm trying to make a .net application works in a computer outside my intranet, using a web service created with .Net remoting and
hosted in my intranet.

This application works well in any computer in the intranet, but not in the computer
that accesses the web service over the internet.

My .net remoting web service is configured in IIs and uses http channel.

I'm using interfaces and i'm implementing this interfaces each one
being a subclass of the MarshalByRefObject, like this:
    public interface IClassMain
      int GetSum(int a, int b);
      IClass1 Class1 { get; }

    public interface IClass1
      String GetFormattedName(string firstname, string lastname);

    internal class ClassMainImplementation : MarshalByRefObject, IClassMain
      private Class1Implementation m_class1Implementati

'Unable to load native components' error after deploying SQL CE 3.5 app with VS 2010


Dev environment is VS 2010 on Win7 Ultimate 64-bit. Build configuration is x86 (32-bit). App runs fine in dev.

Then I build a Setup project for testing on a target machine. The target machine is a clean Windows XP Mode VM which (I believe) is 32-bit.

The app installs and starts fine on target machine, but then throws this error when it attempts to access the sdf database:

"Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8080. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details."

That KB article refers to 64-bit scenarios, which does not apply to my 32-bit Windows XP Mode target machine (my understanding is that Windows XP Mode is 32-bit even on 64-bit hosts).

In VS, the Setup and Deployment project seems to correctly include the .DLL as a detected dependency, and is including C:\Program Files (x86)\Microsoft SQL Server Compact Edition\v3.5\Desktop\System.Data.SqlServerCe.dll in the msi package. On the target machine, I've verified that this file is being installed into the target directory, along with the main executable. If I remove the file, I experience the expected error of being unable to load an assembly that can't be found, and then if I put it back, the "unable to load native components"

How make setup of a winforms application

I am making a winforms application. I would like to about how to make a setup of my winforms application after its completion ?? secondly i have 3 computers at home with windows XP professional SP2, whenever i try to install .net framework it fails and gives some SUIT TOOLKIT error....m worried whether it will work on my client's machine or not.... Your opinions are requested.. Thanks n Regards

Having Trouble deploying first report, I think it is permissions problem


I think I got SSR installed ok.  From the Configuration Manager when I click on Web Service URL and Report Manager URL, IE opens and returns the correct pages.  I see report manager screen etc.

In BIDS I created a solution and a report that previews fine.  The properties page of the solution has a targetServerURL the same as what is in the Configuration Manager, web service URL tab; " http://IMB-T22:8080/ReportServer ".  IBM-T22 is the name of my computer.  8080 is the port it is using.  Port 80 is used by IIS and not running.

The TargetFolder was created ok...AdventureWorks, but the report does not deploy correctly.  If I deploy it times out.  If I debug I get I get the name of my report can't be found or a permissions error. 

In the solution property page I have tried various differnt TargetServerURLs..Localhost/ReportServer...ibm-t22/ReportServer...ibm-t22:8080/ReportServer...Nothing seems to work.  Please help

I belive I am having permissions problem.  I can connect to database from BIDS and preview data in my report.

When I installed SQL Server 2008 SR2, I used an account name "NT Authority/Sytem"   I used this because it was in drop down and was having problems with "Owner"

In Reporting Services Configuration Manager I have the foll

Deploying Web Application from VS.Net 10 to Windows Server 2003



I have built my site using VS.Net 2010 on my XP machine. I would like to deploy it to my server which is a Windows 2003 Server. I have tried to do it with FTP, but it keeps failing with the error that "Front Page Extensions are not installed on the web server". When I check the server the extensions were installed and I also checked IIS and the service for the extension is allowed. How can I get this done? I need to deploy my site urgently.

Your advise is welcome.



Deploying only specific components of an analysis project



I have an analysis project in Visual Studio and I was wondering if it's possible to deploy only parts of it to the server because there are parts that I don't want to be overridden, for example partitions.



Deploying an application using Windows Bootstrapper... localization issues in the bootstrapper itsel


First off, apologies if this isn't the correct way to post this question. It IS connected with deploying a .NET application using Windows Bootstrapper and installing the needed prerequisites.

The thing is, despite asking Visual Studio to publish a localized package, the Microsoft Bootstrapper has some strings hard-coded into the setup.exe, such as "For the following components", and these strings are always in English. So despite having created localized packages for the .NET installation (which work... mostly... I'm still new at this :P) the ClickOnce installer is still not entirely localized to my liking.

So far the only solution I found was to fire up a HEX editor and start manually changing the strings in the .EXE, which is a whole lot of painful work, especially if you need to publish some changes to your application.

Any hints or tips as to how fix this issue would be appreciated.

Permissions issue when deploying a VB.NET application


I have developed an app in VS 2010 and deployed it on a Windows 2003 server.  Now I'm attempting to deploy it on a Win 2008 R2 server. 

I am getting the following error message:



	Below is a summary of the errors, details of these errors are listed later in the log.

	* Activation of \\Asiapp1\applications\OnlineClaimsImageProcessing\OnlineClaimsImageProcessing.application resulted in exception. Following failure messages were detected:

		+ Configuration system failed to initialize

		+ An error occurred loading a configuration file: Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config)

		+ Access to the path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config' is denied.


This is a VB.Net Console app, NOT an ASP.Net web app. 

What account(s) must have what permissions on the above-referenced machine.config file for this to work?

Need help deploying a WCF SilverLight application


I'm new to WCF programming and need help.

Here's what I've done:

1. Created SilverLight app
2. Added SilverLight-enabled WCF Service to Web project
3. Added Web reference to SilverLightproject
4. Call my simple service from MainPage.xaml.cs

This all works fine on the localhost.

Now the two (probably related) questions that are confusing me:

1) How do I deploy my new application and service to my Web site? For a simple SilverLight application with no Web service, I have simply copied the following files and everything worked:
* [my app].aspx
* silverlight.js
* clientbin/[my app].xap

However, when I try that with the SilverLight app that includes a Web service, it doesn't work. Is there something additional that I need to copy to my Web site or edit before deploying?

2) I would think that I would have two binaries to copy - one being the xap package (that contains my SilverLight app and gets downloaded to the client) and the other being a dll (that contains my web service that will run on the server). Is that not the case? I only see a xap file in the clientbin. How do I define a WCF service that runs on the server?

I know these are newbie questions and appreciate any help.

DPI Aware Winforms Application


Hi Everyone,

I have been busy developing my application completely oblivious to DPI problems with a setting of 125%.  Of course my application looks awful on 100%.  Things such as images in buttons are now to big as the button itself has been reduced in size.  Images have been cut off on the right side as the image area has been reduced.  Fonts are also smaller and hard to read.  I have read the white paper on this and various aritcles but I would appreciate some more guidance.  So I have a few questions on this topic.

Should I actually be developing on a development machine with the default as 100% DPI and then work towards making my application high DPI aware?

What is the best way to go about fixing my application now that I have developed it with a DPI setting of 125%

As the problem occurs when the DPI is reduced not increased - setting the DPI aware = true does not stop windows scaling the application down.  Is there anything else I can try? 

merge replication: suggestion on deploying on my application


Hello all,

We have an aplication in .net which we are planning to deploy on our workers laptop so that they can work offline with their own copy of database.

We planned to do merge replication and have database replicated across workers machine.

We have tables, procedures and triggers to be replicated. Tables are around 330.

1. Will the application work perfectly on workers machine on replicated database as it is working on our office db. Would it require any structural change.

2. What flavor would be perfect to have at workers laptop because we have procedures and triggers.


1. please suggest things in terms of long term considerations which we must consider in advance which are really worth.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend