Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Exception thrown when creating an instance of a web service

Posted on 2008-06-22
5
Medium Priority
?
417 Views
Last Modified: 2008-06-23
Hi,

I have a peculiar problem. When running my Windows Forms application (C# 2.0) from within VS2005, any call to my Web Service works as it should.
However, when running my compiled .exe, an exception is thrown (see below). The .exe file is built using NAnt.. so my first guess would be that I'm perhaps missing some dll.. but I can't seem to find a solution.

Any help is highly appretiated.
Exception:    vid System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   vid System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   vid System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   vid System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
   vid System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
   vid System.Web.Services.Protocols.SoapClientType..ctor(Type type)
   vid System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
   vid ShrinkMyPhoto.Service.se.diod.services.MailService..ctor()
   vid ShrinkMyPhoto.Service.ChooseImageSizeService.SendEmail(String user, String email, String regkey, List`1 images, String mailfrom, String mailto, String mailsubject, String mailbody)

Open in new window

0
Comment
Question by:oxyoo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 10

Author Comment

by:oxyoo
ID: 21842312
The exception is thrown when I try and create an instance of the web service.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 21844878
1) I haven't seen that exception, but there doesn't appear to be any real exception message with the stack trace.

2) Is ShrinkMyPhoto.Service.ChooseImageSizeService your web service?

3) What is happening in the SendEmail method?
0
 
LVL 10

Author Comment

by:oxyoo
ID: 21845213
2) ShrinkMyPhoto.Service is a class library. ChooseImageSizeService is an ordinary class.

3) Within the SendEmail method, what I do is that I create an object of my Web Service
do some image serialization and then call my web service method.

The thing is that when I'm debugging, it won't get pass my first line of code which is:
MailService mailService = new MailService();

Now, MailService is my Web Service, which means that I can't event create an instance
of it.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 21845335
Can you answer #1 better, and give the full exception message, and not the stack trace?
0
 
LVL 10

Author Comment

by:oxyoo
ID: 21845431
Sorry about that. I'm feeling a bit dense here, thought I'd outputed the exception message but apparently I had not.
I fixed that and now it's telling me a dll file missing, Should be ok now as soon as I add a reference to it.

Thanks for your time.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question