By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

Npgsql mono under Windows Integration failed

P: 1
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: 5d8b90d52f46fda7
monodis Npgsql.dll
Version: 2.1.3.0

Mono.Security.dll
sn -T Mono.Security.dll
Public Key Token: 0738eb9f132ed756
monodis Mono.security.dll
Version: 2.0.0.0
3. Using VS2005 wich support the Framework 2.0 only, created a sample website d:\Samples\WebSiteHelloFromMono 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\WebSiteHelloFromMono.dll -r:System.Data -r:System.Web.Services -r:System.Web -r:System.Web.Extensions *.cs
6. Back to VS2005, I deleted the bin\WebSiteHelloFromMono.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 'WebSiteHelloFromMono' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
D:\Samples\WebSiteHelloFromMono\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\WebSiteHelloFromMono.dll -r:System.Data -r:Npgsql.dll -r:System.Web.Services -r:System.Web -r:System.Web.Extensions *.cs
8. I've launched the following commands to register the Npgsql.dll and Mono.Security.dll (Even I dot not believe on this action, just I executed the googlizers adivses))
d:\mono3.2.3\bin\gacutil -i d:\Npgsql-2.1.2-net20\Npgsql.dll
d:\mono3.2.3\bin\gacutil -i d:\Npgsql-2.1.2-net20\Mono.Security.dll
10. From the WebSiteHelloFromMono 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,S ecurityProtocol
Type,X509Certificate,PrivateKeySelectionCallback,b ool,bool,bool) in assembly D:\Mono-3.2.3\lib\mono\gac\Mono.WebServer2\0.2.0.0__0738eb 9f132ed756\Mono.WebServer2.dll, referenced in assembly D:\Mono-3.2.3\lib\mono\gac\xsp2\2.10.2.0__0738eb9f132ed756 \xsp2.exe
Handling exception type MissingMethodException
Message is Method not found: 'Mono.WebServer.XSPWebSource..ctor'.
IsTerminating is set to True
System.MissingMethodException: Method not found: 'Mono.WebServer.XSPWebSource..ctor'.

Server stack trace:
at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:InternalE xecute (System.Reflection.MethodBase,object,object[],object[]&)
at System.Runtime.Remoting.RemotingServices.InternalE xecuteMessage (System.MarshalByRefObject target, IMethodCallMessage reqMsg) [0x00000] in <filename unknown>:0

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]
& out_args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: 'Mono.WebServer.XSPWebSource..ctor'.

Server stack trace:
at (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:Intern
alExecute (System.Reflection.MethodBase,object,object[],object[]&)
at System.Runtime.Remoting.RemotingServices.InternalE xecuteMessage (System.Mar
shalByRefObject target, IMethodCallMessage reqMsg) [0x00000] in <filename unknow
n>:0

Exception rethrown at [0]:

at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke (System.Runtime.Rem
oting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]
& out_args) [0x00000] in <filename unknown>:0
--------------------------------------------------------------------------------------
Apr 26 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.