It depends how you want to distribute your application. You
can simply distribute the installatoin file and perform the
installation in the users machines. This will put all the
assemblies in the GAC and make Mpm available globaly on the
machine.
If you do not want this, simply ship your application with
the assembliy Mimer.Mpm.Data.dll where the runtime part is.
If you want to be able to create and manipulate DataSources
from within your program you also need to ship the
Mimer.Mpm.Data.Admin.dll. Both assemblies are located in
your installation directory of Mpm. You do not need the
MpmAdmin.exe, you can manipulate the DataSource
programatically. If you want you can start the
MpmAdministrator from within your application with the
following code:
Mimer.Mpm.Data.Admin.AdminForm adminForm = new
Mimer.Mpm.Data.Admin.AdminForm();
adminForm.ShowDialog();
You do not have to put the assemblie into the GAC, just put
them together with your other assemblies.
Another thing you should do is to put the Mpm configuration
(DataSources, Plugins, and Filters) in your application
configuration file. This way they are only visible to your
application.
If it is a ASP.NET application, simply put the assemblies in
the <web app home>/bin directory.
Does this help?
/Fredrik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The application is a windows application and I am
experiencing this on the same machine that I am developing
i.e. all the assemblies are already in the GAC.
I have installed all the assemblies to the directory and to the
GAC and this does not make any changes.
How do you use the configuration file? I can not find any
information on it. At present I am using the registry as I have
to dynamically set the datasources up at runtime.
Sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The manual cover how you use the configuration file, but
there is an error in the documentation for Mpm 1.2.3. See http://sourceforge.net/tracker/index.php?func=detail&aid=1022378&group_id=101700&atid=630243
for information about this. Basically, if you use Mpm 1.2.3
and create a configuration file, change
"MpmSqlFilterSectionHandler" to
"MpmSqlFilterDescriptorSectionHandler".
Mpm uses the standard application configuration file
(App1.exe.config for the application App1.exe). If you have
a configuration file you can simply open it in
MpmAdministrator, open a new instance of the
MpmAdministrator that uses the registry and drag and drop
you Plugins, SQL Filters and Data Sources. When you have all
parts you need, simply save the config file.
If you do not have a configuration file, simply open
MpmAdministrator and choose File/Save as and save the file
as <your appname>.exe.config. This will create a
configuration file with all Mpm parts in it.
But remember, if you use Mpm 1.2.3 you have to manually
change "MpmSqlFilterSectionHandler" to
"MpmSqlFilterDescriptorSectionHandler". Or even better, use
Mpm 1.2.4.
/Fredrik
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think we have managed to get our wires crossed here.
I am trying to find exactly how to redistribute Mpm as part of
my application as I believe I am missing something as I am
getting an error when I run my application outside of the IDE,
see below.
"Object reference not set to an instance of an object."
This is raised by the following line of code:
if (conn.DataSourceDescriptor.DbmsType ==
MpmDbmsTypes.Oracle)
This works fine when running from within Visual Studio IDE
but gives me this error when trying to run from the same
machine after I have installed the application.
I have tried installing all the files from the redist folder into the
application directory and the GAC without success.
I am using the registry to store information about the Data
Sources as I do not know what the database set-up for the
clients will be i.e. the name of the server and database in the
case of SQL Server. Therefore we have a small application
that allows them to set these values and then I update the
registry with these values and the default set-up for a
particular database type.
I hae tried to use the configuration file without any success,
but as this is not designed to be written to I am not
particularly keen to go down this route.
Sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I thought this was resolved in the Bug 1207703.
I have tried this with Mpm 1.2.3 with Mpm installed in the
GAC (using the Mpm installer) and without anything in the
GAC (putting all files in the Redist folder together with
the applications .exe file). I have also tried this using
the registry and using config files (with and without Mpm in
the GAC) without any problems. I have tried all combinations
withing VS.NET and outside VS.NET.
If you write your data sources in the registry by your self,
are you sure all parts are correct? You cannot simply put
the data sources there, you have to have the plugins and sql
filters there as well and with the correct versions. Are you
sure you are using the same versions of the assemblies as
you have specified in the registry?
I have attached a simple example that does if
(conn.DataSourceDescriptor.DbmsType ==
MpmDbmsTypes.Oracle). It includes all files in the redist
folder and a configuration file. It also include the
registry settings for the applications.
What kind of problems have had using config files? Have you
tried to uninstall Mpm (so you don't have anyting in the
GAC) and use the files in the redist folder together with
your application.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My example uses a Data Source for Mimer SQL. To use it you
have to install Mimer SQL and Mimer Data Provider 9.2
(available at http://developer.mimer.com\). I have attached a
new configuration file using Microsoft SQL Server instead.
When you are talking about Mimer I suppose you mean Mpm
(Mimer Provider Manager). Mimer SQL (called Mimer as short
name) is our RDBMS that is available for practically all
operating systems.
Try the application with the new configuration file instead.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry in the delay in getting back, but Visual Studio decided
it would corrupt my install project and then delete it.
The good news is that after rebuilding the install project my
application now works fine. I do not know if it was the
problem with the install or the changes I did to try and get
around any problems caused when we obsfucate the
assemblies.
Sean
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=897766
It depends how you want to distribute your application. You
can simply distribute the installatoin file and perform the
installation in the users machines. This will put all the
assemblies in the GAC and make Mpm available globaly on the
machine.
If you do not want this, simply ship your application with
the assembliy Mimer.Mpm.Data.dll where the runtime part is.
If you want to be able to create and manipulate DataSources
from within your program you also need to ship the
Mimer.Mpm.Data.Admin.dll. Both assemblies are located in
your installation directory of Mpm. You do not need the
MpmAdmin.exe, you can manipulate the DataSource
programatically. If you want you can start the
MpmAdministrator from within your application with the
following code:
Mimer.Mpm.Data.Admin.AdminForm adminForm = new
Mimer.Mpm.Data.Admin.AdminForm();
adminForm.ShowDialog();
You do not have to put the assemblie into the GAC, just put
them together with your other assemblies.
Another thing you should do is to put the Mpm configuration
(DataSources, Plugins, and Filters) in your application
configuration file. This way they are only visible to your
application.
If it is a ASP.NET application, simply put the assemblies in
the <web app home>/bin directory.
Does this help?
/Fredrik
Logged In: YES
user_id=684148
The application is a windows application and I am
experiencing this on the same machine that I am developing
i.e. all the assemblies are already in the GAC.
I have installed all the assemblies to the directory and to the
GAC and this does not make any changes.
How do you use the configuration file? I can not find any
information on it. At present I am using the registry as I have
to dynamically set the datasources up at runtime.
Sean
Logged In: YES
user_id=897766
The manual cover how you use the configuration file, but
there is an error in the documentation for Mpm 1.2.3. See
http://sourceforge.net/tracker/index.php?func=detail&aid=1022378&group_id=101700&atid=630243
for information about this. Basically, if you use Mpm 1.2.3
and create a configuration file, change
"MpmSqlFilterSectionHandler" to
"MpmSqlFilterDescriptorSectionHandler".
Mpm uses the standard application configuration file
(App1.exe.config for the application App1.exe). If you have
a configuration file you can simply open it in
MpmAdministrator, open a new instance of the
MpmAdministrator that uses the registry and drag and drop
you Plugins, SQL Filters and Data Sources. When you have all
parts you need, simply save the config file.
If you do not have a configuration file, simply open
MpmAdministrator and choose File/Save as and save the file
as <your appname>.exe.config. This will create a
configuration file with all Mpm parts in it.
But remember, if you use Mpm 1.2.3 you have to manually
change "MpmSqlFilterSectionHandler" to
"MpmSqlFilterDescriptorSectionHandler". Or even better, use
Mpm 1.2.4.
/Fredrik
Logged In: YES
user_id=684148
I think we have managed to get our wires crossed here.
I am trying to find exactly how to redistribute Mpm as part of
my application as I believe I am missing something as I am
getting an error when I run my application outside of the IDE,
see below.
"Object reference not set to an instance of an object."
This is raised by the following line of code:
if (conn.DataSourceDescriptor.DbmsType ==
MpmDbmsTypes.Oracle)
This works fine when running from within Visual Studio IDE
but gives me this error when trying to run from the same
machine after I have installed the application.
I have tried installing all the files from the redist folder into the
application directory and the GAC without success.
I am using the registry to store information about the Data
Sources as I do not know what the database set-up for the
clients will be i.e. the name of the server and database in the
case of SQL Server. Therefore we have a small application
that allows them to set these values and then I update the
registry with these values and the default set-up for a
particular database type.
I hae tried to use the configuration file without any success,
but as this is not designed to be written to I am not
particularly keen to go down this route.
Sean
Logged In: YES
user_id=897766
Ok, I thought this was resolved in the Bug 1207703.
I have tried this with Mpm 1.2.3 with Mpm installed in the
GAC (using the Mpm installer) and without anything in the
GAC (putting all files in the Redist folder together with
the applications .exe file). I have also tried this using
the registry and using config files (with and without Mpm in
the GAC) without any problems. I have tried all combinations
withing VS.NET and outside VS.NET.
If you write your data sources in the registry by your self,
are you sure all parts are correct? You cannot simply put
the data sources there, you have to have the plugins and sql
filters there as well and with the correct versions. Are you
sure you are using the same versions of the assemblies as
you have specified in the registry?
I have attached a simple example that does if
(conn.DataSourceDescriptor.DbmsType ==
MpmDbmsTypes.Oracle). It includes all files in the redist
folder and a configuration file. It also include the
registry settings for the applications.
What kind of problems have had using config files? Have you
tried to uninstall Mpm (so you don't have anyting in the
GAC) and use the files in the redist folder together with
your application.
A simple application that works without anything in the GAC or the registry
Logged In: YES
user_id=684148
OK, I ran your application and got the following error:
"An unhandled exception of
type 'System.IO.FileNotFoundException' occurred in
mimer.mpm.data.mimerplugin.dll
Additional information: File or assembly name
Mimer.Data.Client, or one of its dependencies, was not
found."
I get this error with Mimer installed in the GAC and removed
from the GAC
Sean
Logged In: YES
user_id=897766
My example uses a Data Source for Mimer SQL. To use it you
have to install Mimer SQL and Mimer Data Provider 9.2
(available at http://developer.mimer.com\). I have attached a
new configuration file using Microsoft SQL Server instead.
When you are talking about Mimer I suppose you mean Mpm
(Mimer Provider Manager). Mimer SQL (called Mimer as short
name) is our RDBMS that is available for practically all
operating systems.
Try the application with the new configuration file instead.
A new configuration file using SQL Server instead.
Logged In: YES
user_id=684148
Sorry in the delay in getting back, but Visual Studio decided
it would corrupt my install project and then delete it.
The good news is that after rebuilding the install project my
application now works fine. I do not know if it was the
problem with the install or the changes I did to try and get
around any problems caused when we obsfucate the
assemblies.
Sean
Logged In: YES
user_id=897766
Perfect, then I'm closing this issue. It is hard to tell
what went wrong, but at least it is working now.
/Fredrik