CF program in PC, HELP!!!

  • Thread starter Thread starter Daimy
  • Start date Start date
D

Daimy

I've made a compact framework program.
It will invoke some web service methods.
The program can be run perfectly in PocketPC.NET.
But it can NOT be run in PC.
When it invokes web service methods, error will occur.

Can you help me ?

Thanks!
 
what about sharing the error type ? message ? stack trace ? and other tidbit
of useful information for debugging ?!
 
I need to write a program that can be run in both PocketPC and PC.
Thank you for your help!

************** Exception Text **************
System.InvalidOperationException: Method WSvc_PL.AddNewFromNewfile can not
be reflected. ---> System.IO.FileNotFoundException: File or assembly name
System.Web.Services, or one of its dependencies, was not found.
File name: "System.Web.Services"
at System.Reflection.CustomAttribute.GetDataForPropertyOrField(Boolean&
isProperty, Object& value, Type& type, Boolean isLast)
at System.Reflection.CustomAttribute.GetObject()
at
System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttri
bute caItem, Type caType)
at System.Reflection.CustomAttribute.GetCustomAttributes(MemberInfo
member, Type caType, Boolean inherit)
at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type
attributeType, Boolean inherit)
at
System.Web.Services.Protocols.LogicalMethodInfo.GetCustomAttributes(Type
type)
at
System.Web.Services.Protocols.SoapReflector.GetSoapMethodAttribute(LogicalMe
thodInfo methodInfo)
at
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs)

=== Pre-bind state information ===
LOG: DisplayName = System.Web.Services, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac
(Fully-specified)
LOG: Appbase = C:\Debug\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: System.Web.Services, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=969db8053d3322ac
LOG: Attempting download of new URL
file:///C:/Debug/System.Web.Services.DLL.
LOG: Attempting download of new URL
file:///C:/Debug/System.Web.Services/System.Web.Services.DLL.
LOG: Attempting download of new URL
file:///C:/Debug/System.Web.Services.EXE.
LOG: Attempting download of new URL
file:///C:/Debug/System.Web.Services/System.Web.Services.EXE.

--- End of inner exception stack trace ---
at
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo
methodInfo, Boolean client, XmlReflectionImporter xmlImporter,
SoapReflectionImporter soapImporter, String defaultNs)
at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
at OneSail.Demo01.PresentationLayer.WSvc_PL_Web.WSvc_PL..ctor() in
\\daimy\Projects\Demo01\PresentationLayer\Demo01App\Web
References\WSvc_PL_Web\Reference.cs:line 30
at OneSail.Demo01.PresentationLayer.FormMain.Download_Click(Object
sender, EventArgs e) in
\\daimy\Projects\Demo01\PresentationLayer\Demo01App\FormMain.cs:line 432
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(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.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
 
I don't think you can. The PocketPC app requires the CF and the PC app requires the full framewor

----- Daimy wrote: ----

I need to write a program that can be run in both PocketPC and PC
Thank you for your help

************** Exception Text *************
System.InvalidOperationException: Method WSvc_PL.AddNewFromNewfile can no
be reflected. ---> System.IO.FileNotFoundException: File or assembly nam
System.Web.Services, or one of its dependencies, was not found
File name: "System.Web.Services
at System.Reflection.CustomAttribute.GetDataForPropertyOrField(Boolean
isProperty, Object& value, Type& type, Boolean isLast
at System.Reflection.CustomAttribute.GetObject(
a
System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttr
bute caItem, Type caType
at System.Reflection.CustomAttribute.GetCustomAttributes(MemberInf
member, Type caType, Boolean inherit
at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Typ
attributeType, Boolean inherit
a
System.Web.Services.Protocols.LogicalMethodInfo.GetCustomAttributes(Typ
type
a
System.Web.Services.Protocols.SoapReflector.GetSoapMethodAttribute(LogicalM
thodInfo methodInfo
a
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInf
methodInfo, Boolean client, XmlReflectionImporter xmlImporter
SoapReflectionImporter soapImporter, String defaultNs

=== Pre-bind state information ==
LOG: DisplayName = System.Web.Services, Version=1.0.5000.0, Culture=neutral
PublicKeyToken=969db8053d3322a
(Fully-specified
LOG: Appbase = C:\Debug LOG: Initial PrivatePath = NUL
Calling assembly : (Unknown)
==

LOG: Publisher policy file is not found
LOG: Host configuration file not found
LOG: Using machine configuration file fro
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config
LOG: Post-policy reference: System.Web.Services, Version=1.0.5000.0
Culture=neutral, PublicKeyToken=969db8053d3322a
LOG: Attempting download of new UR
file:///C:/Debug/System.Web.Services.DLL
LOG: Attempting download of new UR
file:///C:/Debug/System.Web.Services/System.Web.Services.DLL
LOG: Attempting download of new UR
file:///C:/Debug/System.Web.Services.EXE
LOG: Attempting download of new UR
file:///C:/Debug/System.Web.Services/System.Web.Services.EXE

--- End of inner exception stack trace --
a
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInf
methodInfo, Boolean client, XmlReflectionImporter xmlImporter
SoapReflectionImporter soapImporter, String defaultNs
at System.Web.Services.Protocols.SoapClientType..ctor(Type type
at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor(
at OneSail.Demo01.PresentationLayer.WSvc_PL_Web.WSvc_PL..ctor() i
\\daimy\Projects\Demo01\PresentationLayer\Demo01App\We
References\WSvc_PL_Web\Reference.cs:line 3
at OneSail.Demo01.PresentationLayer.FormMain.Download_Click(Objec
sender, EventArgs e) i
\\daimy\Projects\Demo01\PresentationLayer\Demo01App\FormMain.cs:line 43
at System.Windows.Forms.MenuItem.OnClick(EventArgs e
at System.Windows.Forms.MenuItemData.Execute(
at System.Windows.Forms.Command.Invoke(
at System.Windows.Forms.Control.WmCommand(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.WndProc(Message& m
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg
IntPtr wparam, IntPtr lparam
 
I was experimenting the same problem... three days stuck trying everything and, finally i have managed to make the application run on both platforms!!
I used wsdl.exe to actually get the proxy file for the web service. I modified it deleting for every method the properties 'Use=...' and 'ParameterStyle=...' and it just happened to work. I dont know if i will have any future problem with this but right now im so happy...

Actually it will be nice if anyone explains me the theory of why this solves the problem.
 
Back
Top