First thanks to mono team, this innovation fullfill my deplyment requirements, I developped project using VS2005 Framework 2.0 and Sqlite seems to work perfectly in windows and Linux debian.
My aim is to subsitute SQLite with Postgresql and then the hell starts.
Here is the steps pursued:
1. Download the mono 3.2.3 last release
1. Downloaded from the offical web site the last release Npgsql-2.1.2-net20.zip Npgsql library
2. Unzipped the Npgsql-2.1.2-net20.zip in the d:\Npgsql-2.1.2-net20
Npgsql.dll
sn -T Npgsql.dll
Public Key Token: 5d8b90d52f46fda 7
monodis Npgsql.dll
Version: 2.1.3.0
Mono.Security.d ll
sn -T Mono.Security.d ll
Public Key Token: 0738eb9f132ed75 6
monodis Mono.security.d ll
Version: 2.0.0.0
3. Using VS2005 wich support the Framework 2.0 only, created a sample website d:\Samples\WebS iteHelloFromMon o displays default.aspx "Good morning from Mono"
4. Compiled and browsed the website from VS2005 it displayed the expected message
5. using mono mcs command to build the project , then again it displays the expected message.
mcs /t:library /out:./../bin\WebSiteHell oFromMono.dll -r:System.Data -r:System.Web.Se rvices -r:System.Web -r:System.Web.Ex tensions *.cs
6. Back to VS2005, I deleted the bin\WebSiteHell oFromMono.dll, because if I do not remove this build result then, I get the following error message .net comiler:
"ASP.NET runtime error: Could not load file or assembly 'WebSiteHelloFr omMono' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
D:\Samples\WebS iteHelloFromMon o\Default.aspx"
This bug is resolved when I delete the module VS2005 generate it's won building and do not rely on Mono result.
7. Back to Mono, using mcs command, I compiled with success again the project adding Npgsql.dll to the libraries as mentionned below:
mcs /t:library /out:./../bin\WebSiteHell oFromMono.dll -r:System.Data -r:Npgsql.dll -r:System.Web.Se rvices -r:System.Web -r:System.Web.Ex tensions *.cs
8. I've launched the following commands to register the Npgsql.dll and Mono.Security.d ll (Even I dot not believe on this action, just I executed the googlizers adivses))
d:\mono3.2.3\bi n\gacutil -i d:\Npgsql-2.1.2-net20\Npgsql.dl l
d:\mono3.2.3\bi n\gacutil -i d:\Npgsql-2.1.2-net20\Mono.Secu rity.dll
10. From the WebSiteHelloFro mMono root I launced the following command :
%MONO_PATH%\bin \xsp2 --root . --port 8080 --applications /:.
This error message displayed below is due only to the Npgsql adding reference.
I Googlized hours and days, learned a lot about mono since but Dr I'm still suffering, Please give an urgent help, thanks
------------------------------------Error message at runtime ----------------------------------
Missing method Mono.WebServer. XSPWebSource::. ctor(IPAddress, int,SecurityPro tocol
Type,X509Certif icate,PrivateKe ySelectionCallb ack,bool,bool,b ool) in assembly D:\Mono-3.2.3\lib\mono\ gac\Mono.WebSer ver2\0.2.0.0__0 738eb9f132ed756 \Mono.WebServer 2.dll, referenced in assembly D:\Mono-3.2.3\lib\mono\ gac\xsp2\2.10.2 .0__0738eb9f132 ed756\xsp2.exe
Handling exception type MissingMethodEx ception
Message is Method not found: 'Mono.WebServer .XSPWebSource.. ctor'.
IsTerminating is set to True
System.MissingM ethodException: Method not found: 'Mono.WebServer .XSPWebSource.. ctor'.
Server stack trace:
at (wrapper managed-to-native) System.Runtime. Remoting.Remoti ngServices:Inte rnalExecute (System.Reflect ion.MethodBase, object,object[],object[]&)
at System.Runtime. Remoting.Remoti ngServices.Inte rnalExecuteMess age (System.Marshal ByRefObject target, IMethodCallMess age reqMsg) [0x00000] in <filename unknown>:0
Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke (System.Runtime .Remoting.Proxi es.RealProxy rp, IMessage msg, System.Exceptio n& exc, System.Object[]
& out_args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingM ethodException: Method not found: 'Mono.WebServer .XSPWebSource.. ctor'.
Server stack trace:
at (wrapper managed-to-native) System.Runtime. Remoting.Remoti ngServices:Inte rn
alExecute (System.Reflect ion.MethodBase, object,object[],object[]&)
at System.Runtime. Remoting.Remoti ngServices.Inte rnalExecuteMess age (System.Mar
shalByRefObject target, IMethodCallMess age reqMsg) [0x00000] in <filename unknow
n>:0
Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke (System.Runtime .Rem
oting.Proxies.R ealProxy rp, IMessage msg, System.Exceptio n& exc, System.Object[]
& out_args) [0x00000] in <filename unknown>:0
--------------------------------------------------------------------------------------
My aim is to subsitute SQLite with Postgresql and then the hell starts.
Here is the steps pursued:
1. Download the mono 3.2.3 last release
1. Downloaded from the offical web site the last release Npgsql-2.1.2-net20.zip Npgsql library
2. Unzipped the Npgsql-2.1.2-net20.zip in the d:\Npgsql-2.1.2-net20
Npgsql.dll
sn -T Npgsql.dll
Public Key Token: 5d8b90d52f46fda 7
monodis Npgsql.dll
Version: 2.1.3.0
Mono.Security.d ll
sn -T Mono.Security.d ll
Public Key Token: 0738eb9f132ed75 6
monodis Mono.security.d ll
Version: 2.0.0.0
3. Using VS2005 wich support the Framework 2.0 only, created a sample website d:\Samples\WebS iteHelloFromMon o displays default.aspx "Good morning from Mono"
4. Compiled and browsed the website from VS2005 it displayed the expected message
5. using mono mcs command to build the project , then again it displays the expected message.
mcs /t:library /out:./../bin\WebSiteHell oFromMono.dll -r:System.Data -r:System.Web.Se rvices -r:System.Web -r:System.Web.Ex tensions *.cs
6. Back to VS2005, I deleted the bin\WebSiteHell oFromMono.dll, because if I do not remove this build result then, I get the following error message .net comiler:
"ASP.NET runtime error: Could not load file or assembly 'WebSiteHelloFr omMono' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
D:\Samples\WebS iteHelloFromMon o\Default.aspx"
This bug is resolved when I delete the module VS2005 generate it's won building and do not rely on Mono result.
7. Back to Mono, using mcs command, I compiled with success again the project adding Npgsql.dll to the libraries as mentionned below:
mcs /t:library /out:./../bin\WebSiteHell oFromMono.dll -r:System.Data -r:Npgsql.dll -r:System.Web.Se rvices -r:System.Web -r:System.Web.Ex tensions *.cs
8. I've launched the following commands to register the Npgsql.dll and Mono.Security.d ll (Even I dot not believe on this action, just I executed the googlizers adivses))
d:\mono3.2.3\bi n\gacutil -i d:\Npgsql-2.1.2-net20\Npgsql.dl l
d:\mono3.2.3\bi n\gacutil -i d:\Npgsql-2.1.2-net20\Mono.Secu rity.dll
10. From the WebSiteHelloFro mMono root I launced the following command :
%MONO_PATH%\bin \xsp2 --root . --port 8080 --applications /:.
This error message displayed below is due only to the Npgsql adding reference.
I Googlized hours and days, learned a lot about mono since but Dr I'm still suffering, Please give an urgent help, thanks
------------------------------------Error message at runtime ----------------------------------
Missing method Mono.WebServer. XSPWebSource::. ctor(IPAddress, int,SecurityPro tocol
Type,X509Certif icate,PrivateKe ySelectionCallb ack,bool,bool,b ool) in assembly D:\Mono-3.2.3\lib\mono\ gac\Mono.WebSer ver2\0.2.0.0__0 738eb9f132ed756 \Mono.WebServer 2.dll, referenced in assembly D:\Mono-3.2.3\lib\mono\ gac\xsp2\2.10.2 .0__0738eb9f132 ed756\xsp2.exe
Handling exception type MissingMethodEx ception
Message is Method not found: 'Mono.WebServer .XSPWebSource.. ctor'.
IsTerminating is set to True
System.MissingM ethodException: Method not found: 'Mono.WebServer .XSPWebSource.. ctor'.
Server stack trace:
at (wrapper managed-to-native) System.Runtime. Remoting.Remoti ngServices:Inte rnalExecute (System.Reflect ion.MethodBase, object,object[],object[]&)
at System.Runtime. Remoting.Remoti ngServices.Inte rnalExecuteMess age (System.Marshal ByRefObject target, IMethodCallMess age reqMsg) [0x00000] in <filename unknown>:0
Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke (System.Runtime .Remoting.Proxi es.RealProxy rp, IMessage msg, System.Exceptio n& exc, System.Object[]
& out_args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingM ethodException: Method not found: 'Mono.WebServer .XSPWebSource.. ctor'.
Server stack trace:
at (wrapper managed-to-native) System.Runtime. Remoting.Remoti ngServices:Inte rn
alExecute (System.Reflect ion.MethodBase, object,object[],object[]&)
at System.Runtime. Remoting.Remoti ngServices.Inte rnalExecuteMess age (System.Mar
shalByRefObject target, IMethodCallMess age reqMsg) [0x00000] in <filename unknow
n>:0
Exception rethrown at [0]:
at System.Runtime. Remoting.Proxie s.RealProxy.Pri vateInvoke (System.Runtime .Rem
oting.Proxies.R ealProxy rp, IMessage msg, System.Exceptio n& exc, System.Object[]
& out_args) [0x00000] in <filename unknown>:0
--------------------------------------------------------------------------------------