When I try to run my Project (with duplex Net TCP Connection), wich is working with NET 4.0 verry well, on MONO, I got the following Exception:
Exception Object of type 'System.ServiceModel.MonoInternal.DuplexServiceRuntimeChannel' doesn't match target type 'System.ServiceModel.IClientChannel' at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00078] in /mcc/mono/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:243
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /mcc/mono/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at System.ServiceModel.ClientRealProxy.DoInvoke (IMessage inputMessage) [0x0003a] in /mcc/mono/mono/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs:100
at System.ServiceModel.ClientRealProxy.Invoke (IMessage inputMessage) [0x00000] in /mcc/mono/mono/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs:86
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x0009c] in /mcc/mono/mono/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs:193
has anyone any Idea what I'm doing wrong?
Related
I delpoyed my web application (which uses LDAP) on windows server 2016. It is throwing below error. Though I am able to access same ADLDS instance using ADSI or C# console application (created utility to test connectivity). But not sure why its throwing error with web application. Please suggest.
Server Error in '/' Application.
**While trying to resolve a cross-store reference, the SID of the target principal could not be resolved. The error code is 1722.**
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.DirectoryServices.AccountManagement.PrincipalOperationException: While trying to resolve a cross-store reference, the SID of the target principal could not be resolved. The error code is 1722.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[PrincipalOperationException: While trying to resolve a cross-store reference, the SID of the target principal could not be resolved. The error code is 1722.]
System.DirectoryServices.AccountManagement.ADStoreCtx.ResolveCrossStoreRefToPrincipal(Object o) +570
System.DirectoryServices.AccountManagement.ADUtils.DirectoryEntryAsPrincipal(DirectoryEntry de, ADStoreCtx storeCtx) +133
System.DirectoryServices.AccountManagement.ADDNLinkedAttrSet.get_CurrentAsPrincipal() +86
System.DirectoryServices.AccountManagement.PrincipalCollectionEnumerator.MoveNext() +252
System.DirectoryServices.AccountManagement.PrincipalCollectionEnumerator.System.Collections.IEnumerator.MoveNext() +9
System.Linq.<SelectManyIterator>d__22`3.MoveNext() +65
System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +264
System.Linq.GroupedEnumerable`3.GetEnumerator() +72
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +63
System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) +392
System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection) +15
Plastin.Common.Security.ADLDSClaimsProvider.SetApplicationClaims() +1012
Plastin.Common.Security.ADLDSClaimsProvider.Initialise() +174
Plastin.Common.Security.ADLDSClaimsProvider..cctor() +238
[TypeInitializationException: The type initializer for 'Plastin.Common.Security.ADLDSClaimsProvider' threw an exception.]
lambda_method(Closure , IBuilderContext ) +81
Microsoft.Practices.ObjectBuilder2.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context) +35
Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +10
Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +198
Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +209
Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +165
[ResolutionFailedException: Resolution of the dependency failed, type = "Plastin.Common.Security.IClaimsProvider", name = "(none)".
Exception occurred while: Calling constructor Plastin.Common.Security.ADLDSClaimsProvider().
Exception is: TypeInitializationException - The type initializer for 'Plastin.Common.Security.ADLDSClaimsProvider' threw an exception.
-----------------------------------------------
At the time of the exception, the container was:
Resolving Plastin.Common.Security.ADLDSClaimsProvider,(none) (mapped from Plastin.Common.Security.IClaimsProvider, (none))
Calling constructor Plastin.Common.Security.ADLDSClaimsProvider()
]
Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +329
Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) +15
Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(IUnityContainer container, ResolverOverride[] overrides) +72
Plastin.Common.Security.AuthenticationManager.Authenticate(String resourceName, ClaimsPrincipal incomingPrincipal) +149
Plastin.Portal.MvcApplication.Application_PostAuthenticateRequest() +70
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +87
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +21
System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +56
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Finally we fixed this issue and my apologies I am getting late to answer this question. After lots of debugging we identified that our web application was throwing this error while getting members of ADLDS group. It was unusual as same application was working on other server. So we decided to captured network traffic using Wireshark. Wireshark capture indicated that connectivity between LDAP server and application server was blocked over SMB port 445. So we get our Network team to open port 445 which fixed the issue.
This error seems very generic error and could be other reasons for this error in your scenario but using network traffic capturing tool (like wireshark) at early stage of investigation might help you to troubleshoot these kind of issue quickly.
When I run my ASP.NET MVC 4 website on my Fedora 20 workstation with xsp4 (from MonoDevelop or directly) I'm getting the following exception:
System.Web.HttpRuntime.FinishWithException (wr={Mono.WebServer.XSPWorkerRequest}, e={System.Web.HttpException: ---> System.Web.HttpException: The pre-application start initialization method Start on type System.Web.WebPages.PreApplicationStartCode threw an exception with the following error message: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for <Module> ---> System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/etc/mono/registry" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00064] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:113
at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:80
at System.IO.DirectoryInfo.Create () [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/DirectoryInfo.cs:141
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00039] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:98
at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.IO/Directory.cs:80
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x0004a] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:136
--- End of inner exception stack trace ---
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, Boolean is_volatile) [0x00057] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:138
at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:116
at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, Boolean createNonExisting) [0x000cc] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:412
at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, Boolean writable) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs:836
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, Boolean writable) [0x0001e] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:278
at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs:262
at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
at Microsoft.Web.Infrastructure.RegistryKeyWrapper.OpenSubKey (System.String name) [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.KillBitHelper.GetKillBittedVersions () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.KillBitHelper.IsThisAssemblyKillBitted () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.KillBitHelper.ThrowIfKillBitIsSet () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.ModuleInitializer+CriticalInitializer.CheckKillBit () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.ModuleInitializer+CriticalInitializer.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Web.Infrastructure.ModuleInitializer.Initialize () [0x00000] in <filename unknown>:0
at <Module>..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Web.WebPages.PreApplicationStartCode.Start () [0x0002b] in /builddir/build/BUILD/mono-3.4.0/external/aspnetwebstack/src/System.Web.WebPages/PreApplicationStartCode.cs:40
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:238
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /builddir/build/BUILD/mono-3.4.0/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x0004f] in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:561
--- End of inner exception stack trace ---
at System.Web.Compilation.BuildManager.CallPreStartMethods () [0x0007e] in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:564
at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00059] in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs:408
--- End of inner exception stack trace ---}) in /builddir/build/BUILD/mono-3.4.0/mcs/class/System.Web/System.Web/HttpRuntime.cs:674
I've checked it and there is no registry file or folder in /etc/mono/. I also can't find it in any subfolder, how can I resolve this question?
I'm running Fedora 20 with the latest 3.15.6 kernel
$ mono --version
Mono JIT compiler version 3.4.0 (tarball Fri Jun 27 17:26:36 UTC 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
$ xsp4 --version
xsp4.exe 3.0.0.0
Copyright (C) 2002-2011 Novell, Inc.
Minimalistic web server for testing System.Web
I have another setup in Ubuntu 14.04 LTS and that one works, so it might be something with the mono version, or maybe I'm missing some library?
Turns out simply creating the folder using mkdir
sudo mkdir /etc/mono/registry
and setting the right permissions using chmod
sudo chmod uog+rw /etc/mono/registry
does the trick.
However I still don't understand where such a folder is hidden in Ubuntu and why it doesn't need to be created there, as well as why it isn't created automatically during the installation.
You can set MONO_REGISTRY_PATH to point to a directory that you control:
bash
mkdir my-registry
MONO_REGISTRY_PATH=`pwd`/my-registry
xsp4
I created a new project of type Asp.net MVC 4
I installed the package via Ninject.MVC3 NuGet Install Package Ninject.MVC3
When running the project, security error:
Error
Server Error in '/MediumTrustSample' Application.
Security Exception
Description: The application attempted to perform an operation not
allowed by the security policy. To grant this application the
required permission please contact your system administrator or change
the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the
permission of type 'System.Security.Permissions.ReflectionPermission,
mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.
Source Error:
Line 20:
DynamicModuleUtility.RegisterModule(typeof(OnePerRequestModule)); Line
21:
DynamicModuleUtility.RegisterModule(typeof(HttpApplicationInitializationModule));
Line 22: bootstrapper.Initialize(CreateKernel); Line 23:
} Line 24:
Source File: C:\Users\Riderman_2\Documents\Visual Studio
2010\Projects\MediumTrustSample\MediumTrustSample\App_Start\NinjectMVC3.cs
Line: 22
Stack Trace:
[SecurityException: Request for the permission of type
'System.Security.Permissions.ReflectionPermission, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed.]
System.Security.CodeAccessSecurityEngine.SpecialDemand(PermissionType
whatPermission, StackCrawlMark& stackMark) +0
System.Security.CodeAccessPermission.Demand(PermissionType
permissionType) +30
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks) +281
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
+38 Ninject.Infrastructure.Language.ExtensionsForMemberInfo.GetParentDefinition(MethodInfo
method, BindingFlags flags) in ExtensionsForMemberInfo.cs:145
Ninject.Infrastructure.Language.ExtensionsForMemberInfo.IsDefined(PropertyInfo
element, Type attributeType, Boolean inherit) in
ExtensionsForMemberInfo.cs:173
Ninject.Selection.Heuristics.StandardInjectionHeuristic.ShouldInject(MemberInfo
member) in StandardInjectionHeuristic.cs:47
Ninject.Selection.<>c_DisplayClass3.b_2(IInjectionHeuristic h) in Selector.cs:92 System.Linq.Enumerable.Any(IEnumerable1
source, Func2 predicate) +149
Ninject.Selection.Selector.b_1(PropertyInfo
p) in Selector.cs:92
System.Linq.WhereEnumerableIterator1.MoveNext() +156
System.Collections.Generic.List1.InsertRange(Int32 index,
IEnumerable1 collection) +552
Ninject.Selection.Selector.SelectPropertiesForInjection(Type type) in
Selector.cs:89
Ninject.Planning.Strategies.PropertyReflectionStrategy.Execute(IPlan
plan) in PropertyReflectionStrategy.cs:60
Ninject.Planning.<>c__DisplayClass3.<GetPlan>b__1(IPlanningStrategy s)
in Planner.cs:68
Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map(IEnumerable1
series, Action1 action) in ExtensionsForIEnumerableOfT.cs:23
Ninject.Planning.Planner.GetPlan(Type type) in Planner.cs:70
Ninject.Activation.Context.Resolve() in Context.cs:180
Ninject.KernelBase.<Resolve>b__7(IContext context) in
KernelBase.cs:375
System.Linq.WhereSelectEnumerableIterator2.MoveNext() +238
System.Linq.Enumerable.SingleOrDefault(IEnumerable1 source) +299
Ninject.Planning.Targets.Target1.GetValue(Type service, IContext
parent) in Target.cs:179
Ninject.Planning.Targets.Target1.ResolveWithin(IContext parent) in
Target.cs:147
Ninject.Activation.Providers.StandardProvider.GetValue(IContext
context, ITarget target) in StandardProvider.cs:97
System.Linq.WhereSelectArrayIterator2.MoveNext() +110
System.Linq.Buffer1..ctor(IEnumerable1 source) +488
System.Linq.Enumerable.ToArray(IEnumerable1 source) +104
Ninject.Activation.Providers.StandardProvider.Create(IContext context)
in StandardProvider.cs:81 Ninject.Activation.Context.Resolve() in
Context.cs:157 Ninject.KernelBase.<Resolve>b__7(IContext context)
in KernelBase.cs:375
System.Linq.WhereSelectEnumerableIterator2.MoveNext() +238
System.Linq.d_b11.MoveNext() +296
System.Linq.Enumerable.Single(IEnumerable1 source) +282
Ninject.ResolutionExtensions.Get(IResolutionRoot root, IParameter[]
parameters) in ResolutionExtensions.cs:37
Ninject.Web.Mvc.Bootstrapper.Initialize(Func`1 createKernelCallback)
in Bootstrapper.cs:72
MediumTrustSample.App_Start.NinjectMVC3.Start() in
C:\Users\Riderman_2\Documents\Visual Studio
2010\Projects\MediumTrustSample\MediumTrustSample\App_Start\NinjectMVC3.cs:22
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.272
Question
How to use Ninject.MVC3 with MediumTrust?
Go and get the medium trust version: https://github.com/ninject/ninject/downloads
When I try to host a WCF service, that works perfectly in Windows, in a mono console application I get the following error (*):
An element with the same key already exists in the dictionary.
I don't get at all why this is happening or where I need to look to fix this. Anyone who has experienced this or can point me in the right direction?
I am using Mono 2.10.8 on a Mac running Os X 10.6.8.
*Stacktrace:
at System.Collections.ObjectModel.KeyedCollection`2[System.Type,System.ServiceModel.Description.IOperationBehavior].InsertItem (Int32 index, IOperationBehavior item) [0x0003a] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/corlib/System.Collections.ObjectModel/KeyedCollection.cs:168
at System.Collections.Generic.KeyedByTypeCollection`1[System.ServiceModel.Description.IOperationBehavior].InsertItem (Int32 index, IOperationBehavior kind) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.Collections.Generic/KeyedByTypeCollection.cs:70
at System.Collections.ObjectModel.Collection`1[System.ServiceModel.Description.IOperationBehavior].Add (IOperationBehavior item) [0x0000c] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs:74
at System.ServiceModel.Description.ContractDescriptionGenerator.GetOrCreateOperation (System.ServiceModel.Description.ContractDescription cd, System.Reflection.MethodInfo mi, System.Reflection.MethodInfo serviceMethod, System.ServiceModel.OperationContractAttribute oca, System.Type asyncReturnType, Boolean isCallback, System.Type givenServiceType) [0x00511] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:350
at System.ServiceModel.Description.ContractDescriptionGenerator.FillOperationsForInterface (System.ServiceModel.Description.ContractDescription cd, System.Type exactContractType, System.Type givenServiceType, Boolean isCallback) [0x00131] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:240
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContractInternal (System.Type givenContractType, System.Type givenServiceType, System.Type serviceTypeForCallback) [0x001ed] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:190
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType, System.Type serviceTypeForCallback) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:136
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type givenContractType, System.Type givenServiceType) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:131
at System.ServiceModel.Description.ContractDescriptionGenerator.GetContract (System.Type contractType) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs:101
at System.ServiceModel.Description.ContractDescription.GetContract (System.Type contractType) [0x00017] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs:66
at System.ServiceModel.ServiceHost.AddServiceEndpoint (System.Type implementedContract, System.ServiceModel.Channels.Binding binding, System.Uri address, System.Uri listenUri) [0x00022] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHost.cs:96
at System.ServiceModel.ServiceHost.AddServiceEndpoint (System.Type implementedContract, System.ServiceModel.Channels.Binding binding, System.Uri address) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHost.cs:85
at ConsoleApplication3.Program.Main (System.String[] args) [0x0002b] in /Users/steven/Software/ABC Cloud/NooSphere/Mono.Host/Main.cs:16
This was a bug in Mono and has been fixed in mono-2.10.9 (Mac only updated) and Mono for Android 4.2.7
I've just downloaded FitNesse WebTest and ran into this issue after starting FitNesse and SeleniumRC.
start browser
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:4444
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at Selenium.HttpCommandProcessor.DoCommand(String command, String[] args)
at Selenium.HttpCommandProcessor.GetString(String commandName, String[] args)
at Selenium.HttpCommandProcessor.Start()
at Selenium.DefaultSelenium.Start()
at com.neuri.webfixture.PlainSeleniumTest.startBrowser(String browser, String rcServer, Int32 rcPort, String seleniumURL)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at fitlibrary.Method.Invoke(Object[] theParameters)
at fitlibrary.Method.Invoke(Fixture theFixture, IEnumerable theCells)
at fitlibrary.FlowFixtureBase.ExecuteMethod(Method theMethod, CellRange theCells)
at fitlibrary.FlowFixtureBase.ProcessFlowRows(Parse theRows)
Any help would be appreciated to get past this as it's driving me mad.
Sounds like you haven't started the selenium server, start it using
java -jar c:\selenium\selenium-server.jar
assuming you have installed selenium in the default location.