PTTracker runs fine if I stay with the default start up project PTWin. But when I switch to PTServiceClient as the startup project, I get the following exception imemdiately:
I'm running Windows XP SP2, CSLA Version 2.1 c# version & VSTS (2005)
Thanks in advance
System.Web.Services.Protocols.SoapException was unhandled
Message="System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Invalid token for impersonation - it cannot be duplicated.\n at System.Security.Principal.WindowsIdentity.CreateFromToken(IntPtr userToken)\n at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info)\n at System.Security.Principal.WindowsIdentity..ctor(SerializationInfo info, StreamingContext context)\n --- End of inner exception stack trace ---\n at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)\n at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)\n at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)\n at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)\n at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)\n at System.Runtime.Serialization.ObjectManager.DoFixups()\n at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)\n at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)\n at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)\n at Csla.Server.Hosts.WebServicePortal.Deserialize(Byte[] obj) in C:\\ExpertBizObjs\\csla20cs\\csla20cs\\Csla\\DataPortal\\Hosts\\WebServicePortal.cs:line 274\n at Csla.Server.Hosts.WebServicePortal.Fetch(Byte[] requestData) in C:\\ExpertBizObjs\\csla20cs\\csla20cs\\Csla\\DataPortal\\Hosts\\WebServicePortal.cs:line 190\n --- End of inner exception stack trace ---\n at PTService.GetProjectList() in c:\\ExpertBizObjs\\csla20cs\\ProjectTracker20cs\\www\\PTWebService\\App_Code\\PTService.cs:line 49\n --- End of inner exception stack trace ---"
Source="System.Web.Services"
Actor=""
Lang=""
Node=""
Role=""
StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at PTServiceClient.PTService.PTService.GetProjectList() in C:\ExpertBizObjs\csla20cs\ProjectTracker20cs\PTServiceClient\Web References\PTService\Reference.cs:line 129
at PTServiceClient.MainForm.MainForm_Load(Object sender, EventArgs e) in C:\ExpertBizObjs\csla20cs\ProjectTracker20cs\PTServiceClient\MainForm.cs:line 23
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at PTServiceClient.Program.Main() in C:\ExpertBizObjs\csla20cs\ProjectTracker20cs\PTServiceClient\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Not sure is this applies when using the PTServiceClient but I had a similar problem a while back when using Remoting.
I had both the .Net framework 1.1 and 2.0 installed on my remoting server and the virtual directory I created to _host_ remoting pointed to the 1.1 framework instead of the 2.0 framework. When you create a virtual directory in IIS, the default will point to the 1.1 framework. I had to manually set it to use the 2.0 framework - and that was it :)
Again, I might totally be in the left field here when using PTServiceClient.
Thanks - what you suggest is a good start. I just purchased the BO book & am not expert enough yet to know which config settings shoudl be checked/changed. Might you be able to give me an even more specific helping hand?
David
Copyright (c) Marimer LLC